Using CSS3 for plugin?

For developers using the Construct 2 Javascript SDK

Post » Wed Jun 06, 2012 6:34 am

Hi,

I'd like to work on a scale-9 plugin (what is scale-9? this might help), and found out there's a jquery and css3 way. Is it possible to implement them with C2 JS SDK?

thanks
B
21
S
5
G
5
Posts: 58
Reputation: 5,232

Post » Wed Jun 06, 2012 1:39 pm

Sure, you just need nine images which are stretched differently. Is there any part in particular you're stuck on?
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Wed Jun 06, 2012 4:35 pm

You can create this type of effect in C2 with sprites-


Capx

This particular example doesn't work with negative dimensions, but it is possible..I have an example somewhere but cant find it.chrisbrobs2012-06-06 16:36:08
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Wed Jun 06, 2012 5:09 pm

@Ashley

Awesome :). I haven't bumped into a problem yet, I was just getting started and tried to search for any working example out there. As for C2 related plugin, can you suggest what plugin you think can be a reference for me to start with scale-9? Thanks

@chrisbrobs

Thanks for the example.. The thing is, I would like the sprite to be in a single 'container' much like the tile background plugin.. you can scale all you want but the image is not stretched (due to scale-9 rules). With your example, I will need to do those manually, which I'm avoiding :)
B
21
S
5
G
5
Posts: 58
Reputation: 5,232

Post » Thu Jun 07, 2012 8:42 am

@soybean

@Pode is a CSS master, you might search his plugins.
B
97
S
22
G
177
Posts: 4,113
Reputation: 103,531


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 1 guest