|
-
telling movie clip to grow
Hi, I'm a designer with very limited skills with regard to Action Script. I have a movie which has several movie clips that loop, and what I want to do is create an invisible button that, when you roll over them, tells my movie clips to grow approx. 20% in physical size, but keep looping as normal. I also want my nav, which is a separate movie clip, to 'light up' on the respective item. The looping movie clips are basically representative of each item in the nav. Can someone here give me a clear idea of what it would take to accomplish this? Peace. dsr
-
mixmasterdsr...in general, the most common way seems to be increasing both the _xscale and _yscale of the mcs. The light up may happen with some alpha increasing...all this needs to happen in either an onEnterFrame or a setInterval
Code:
mc.onRollover=function(){
grow(this)
}
function grow(mc){
mc.onEnterFrame=function(){
mc._xscale+=10
mc._yscale+=10
mc._alpha+=5
if(mc._xscale>=120){
delete this.onEnterFrame;
}
}
}
that's the untested, general idea....
-
did not work, please help!
Hi again,
I tried using this code, but it didn't work. Since I'm basically new to AS, I'm not sure if I applied your reasoning correctly, and I may need a bit of help with the proper way to use it - Flash gave me an error,
Statement must appear within on handler
function grow(mc){.
I'm no doubt doing something wrong. The way my movie is set up is the Nav is a movie clip which is 'talking' to the movie clip I want to grow in size on rollover. The movie clip that should grow is called Sara. In the nav, I'm already pointing to another movie clip, which is the main timeline, like so:
on (press) {
_root.MainMovie.gotoAndPlay("5");
}
So, presumably all I need to add to this is,
on (rollOver) {
_root.Sara._xscale+=10
_root.Sara._yscale+=10
}
Any help would be greatly appreciated, hope this all makes sense.!
-
One thing I forgot to mention, I need the growing movie clip to 'shrink' back to it's default size on roll-out. And on roll-over, the movie clip shouldn't exceed 120%. Can anyone here help a guy out with this code? The code mlecho posted looks like it should work, but it's not... help a retard! Thanks!
-
You get an error because the code is being put on the button, the code given was supposed to go on a frame in the main timeline that will be used when the rollover happens. Replace the "mc" with the instance name of your movieclip which can be given in the properties.
To shrink, just use -= 10.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|