1 Reply Latest reply on Nov 24, 2011 5:50 AM by Ned Murphy



      Hello everybody,


      I hope I am right in this forum.


      I just started with Flash and find it an amazing tool for webapplications.

      As a beginner I started to do a webside what went quite well so far.


      On the test side (checking my AS code) I have three buttons.


      When you press a button01, object01 is moving on the stage by Movement tween. When you press button02 the object01 is leaving the stage and object02 is moving in (it was hard enough to figure that out ... :-). the same goes for button03 and object03. Whenever you press a button the last object leaves the stage first before the next object moves in.

      So far so good.


      While testing the script I realized that the whole thing gets messed up if you dont wait till the end of the movement of the objects.

      Instead of the expected moevement there is no movement at all. I press button01 nad object02 is "Jumping" not moving in. Its nervewrecking and I dont find a solution so far.


      I include a sample of my script with further informations and hope someone can help.


      Script on the button objects (Not on the frame), the frames to go are different for each button of course.



      on (release){

      FrameCount = 1;

      if (FrameAim == 0){

      gotoAndPlay (2);


      if (FrameAim == 80){

      gotoAndPlay (80);


      if (FrameAim == 135){

      gotoAndPlay (135);


      FrameAim = 25;




      This is the script on the last frame of every "segment" of the movie. (3 buttons, 3 segments)



      if (FrameCount == 2){

      gotoAndPlay (55);


      if (FrameCount == 3){

      gotoAndPlay (110);



        • 1. Re: optiontips.in
          Ned Murphy Adobe Community Professional & MVP

          It is not really clear what you are trying to accomplish with the code you show since you do not explain what the different variables and frame numbers mean.  But if you are just starting to learn Flash, there are two things I will recommend.  The first one is to get away from using Actionscript 2 and head into using Actionscript 3.  There is no reason to limit yourself to the past.  If you do not have a Flash version that supports AS3 and that's why you are pursuing AS2, then it will be best if you break away from bad practices from the start not put code on objects.  Assign instance names to your buttons and assign code to them in the timeline.