Groups | Blog | Home
all groups > flash actionscript > may 2007 >

flash actionscript : Button Optimization Possibility?


Beedy
5/19/2007 7:01:43 PM
I have a large navigation, which consists of mc's with buttons inside. These
buttons of course have the actions onRollover, etc. Everything works great when
I rollover everything and does as it should. When I move the mouse a little
fast over parts of the navigation, some mc's stick in certain states, rather
than completing their action and then the new button rolled over running it's
new action. Rolling over something else eventually unsticks it. It is kind of
like the code to execute can only go so fast as the mouse and sometimes gets
left behind. Is there a way to optimize the AS with True statements or maybe
Trace? or something to prevent these issues? I am not a huge AS pro and looked
at the help files concerning these but still wasn't quite sure. It isn't a huge
problem, but a bit annoying and seems a bit sloppy and I just wondered if
anybody knows a method in which I can prevent this or get the AS to run
smoother.
joeschmoesdf
5/19/2007 11:31:11 PM
Make sure to use the onRollOut function

EX:

hitspot.onRollOut = function(){
gotoAndPlay(6);
Beedy
5/21/2007 3:11:29 PM
Thanks for your response. Ok just to think out loud here and also to possibly
help anybody else, I have the actions on the buttons themsleves. The reason for
this is because at different points in the timeline The instance of the button
when clicked will take the peron to different parts of the timeline. Now I am
also familiar with the method you suggested in which then the actions are
called upon in the frame rather than on the button. I have not actually tried
this yet, but wanted to pose the question which could I then place these
different calls on the frame of that specific timeline rather than on the
button obviously with better operating capability than my initial question to
optimize? I will give it a shot and post my success or failures. Thanks again
Joe!
Beedy
5/23/2007 2:51:06 AM
Ok Joe I have tried the other method. Unfortunately it has caused even worse
problems. I have double checked all instance names and code however there are
more 'collisions' in which buttons do not react the way they are supposed to.
It actually is more like the other buttons actions (if crossing from one button
to the next ) overrides the other buttons actions. Would you have any other
suggestions?
AddThis Social Bookmark Button