1 Reply Latest reply on Mar 6, 2007 5:03 PM by tonyhigham

    Object creation and swf playing

      Suppose I was playing a Flash movie and I use actionscript for some animation or the creation of a text box. Suppose also that the movie has a movie progress bar, like those in Quicktime or Windows media player. Now here is the question: If during the movie and object is created, and then the user decides to move the progress bar back to replay part of the movie - specifically they will be replying the part in which the object was created - what happens? In other words, does a second instance of the object get created, or does the first get deleted by flash and a new object created. I am asking, because I have no problem writing action script as long as the movie goes forward like at a Theater. But if you wish they the option to begin to mess with a progress bar, then what do you do? Does one need to check for object creation if they go back? ANY HELp would be appreciated.
        • 1. Re: Object creation and swf playing
          Good question. Basically, it depends on where your object was created. If you create the object on the root timline, it will be persistent, for instance. The only way it will be automatically deleted is if it is the child of a clip that doesnt exist earlier in the time line. For example, say you have a movieclip on the stage on frame 2 that, but not on frame 1. In this mc you create a new object, so its path would be _root.frame2_mc.myObject. If you take the playhead to frame 1, frame2_mc and all its children, including myObject, will be deleted.

          That being said, if you create a persistent object in frame 2 of your movie with a script on the root timeline and go back to frame 1 the object will still exist; however, when you get back to frame 2, unless you have some sort of conditional in place to account for it, the object will be recreated and overwritten.

          Hope that helps. If it needs clarification (quite possible!), let me know. :)