Search  

FLASH ACTIONSCRIPT INTERFERING WITH ANIMATION ON TIMELINE

HomeForumsHelp NeededFlash actionscript interfering with animation on timeline

Hi

I was just wondering if anyone has come across this issue. Basically i have 3 buttons on stage. each with this simple piece of code to animate the buttons:

button1.onRollOver = function () { this._width = 104; this._height = 194; this._alpha = 100; }; button1.onPress= function () { gotoAndPlay (2); }; button1.onRollOut = function () { this._width = 102; this._height = 190; this._alpha = 50; };

When a button is pressed it goes to another frame which plays a fade out animation on the buttons. Whats happening on my timeline is that for some reason the when you rollover the active buttons and select one, all the buttons that you rollover stay on stage and dont fade out as its supposed to in the animation? I tried doing up another quick test and using simple square shapes and i got it that to work, but i cant seem to fix this on my actual project file. I do have other scripts running so it could be that they are interfering with the overall thing. Has anyone come across this that could help me solve this? Thanks in advance!

Cheers!

Posted about 1 month ago
46827 redpanda608
27 posts
Bought between 1 and 9 items

Try this:

button1.onPress = function () { this.gotoAndPlay(2); }

Without the “this.” you are telling flash to gotoAndPlay on the mainTimeLine. If that doesn’t work try replacing “this.” with “button1.” that way flash has no way of miss understanding what movie clip you are calling.

Posted about 1 month ago
Try this:

button1.onPress = function () { this.gotoAndPlay(2); }

Without the “this.” you are telling flash to gotoAndPlay on the mainTimeLine. If that doesn’t work try replacing “this.” with “button1.” that way flash has no way of miss understanding what movie clip you are calling.

Hi couldnt seem to get this to work…. all the animation and Scripts are on the main timeline.

Posted about 1 month ago
46827 redpanda608
27 posts
Bought between 1 and 9 items

Oh okay, I though you had your animations inside of the button movie clips. I can’t say that I have had this problem before and as far as I can tell from what you posted it should work.

I would be willing to take a look at your files for you if you want.

Send them to redpanda608@hotmail.com

Posted about 1 month ago

Hi Thats, cool i found a work around. For some reason the rollover actions were freezing the buttons from animating out, so what i did was just move the animation to a different scene and it worked out. Thanks for taking the time to help me out though!!

Posted about 1 month ago
46827 redpanda608
27 posts
Bought between 1 and 9 items

No Prob :), Let me know if I can ever help you out with anything ells.

Posted about 1 month ago