Willem,. Here is the full scenario. I have a swfLoading class which loads SWF for me. Once the swf is loaded say a ball. I want to click on different colors and change the color of the stripes on the ball.
Now, with what you said I can access things once they are loaded. The load complete function is in my swfLoading class. But at that time, I do not want to change the colors. But I need to change the colors of the ball at some later time. On Tue, Mar 9, 2010 at 5:07 PM, Glen Pike <[email protected]> wrote: > You would probably want to either set a flag, or store a variable in your > class / outside your event handler function that is null before the content > is loaded. In other functions that manipulate that clip, you should test > that the variable is not null before manipulating it. > > Alternatively, you would write a beautiful class that encapsulated all of > this after reading up on OOP in AS3. but for GTD, the above may do. > > > > Fahim Akhter wrote: > >> I posted it on flexcoders accidently. Then had to update the question >> there >> too. I apologize for that. >> >> Hmm what if I do not want to reference it from inside that event >> Listener but a another movie clip who would be later its parent? >> >> On Tue, Mar 9, 2010 at 4:24 PM, Geografiek <[email protected]> >> wrote: >> >> >> >>> No you can't reference something that is not ther yet. >>> You need to add an eventlistener to imageloader to listen for the loading >>> to complete. >>> Inside that event listener you can call >>> imageLoader.content.testMovie.gotoAndStop(2) >>> HTH >>> Willem van den Goorbergh >>> ps please post your questions to 1 list only >>> >>> >>> On 9-mrt-2010, at 12:12, Fahim Akhter wrote: >>> >>> I'm using AS3 here is a little more detail. >>> >>> >>>> I'm loading an swf say "test.swf" which gets loaded in imageLoader , so >>>> I >>>> can get its content by : >>>> >>>> imageLoader.content >>>> >>>> So if I wanted one of the movieClips inside it I would do this : >>>> >>>> imageLoader.content.testMovie.gotoAndStop(2); >>>> >>>> But when I do this, since the movie is not loaded the file is not >>>> compiled >>>> and gives me an error your referring to something that is not there. How >>>> else am I supposed to reference a content that will be loaded later? >>>> >>>> >>>> >>>> On Tue, Mar 9, 2010 at 3:30 PM, Geografiek <[email protected]> >>>> wrote: >>>> >>>> Hi Fahim, >>>> >>>> >>>>> Can be anything. >>>>> To give you something to proceed we really need more information. >>>>> What are you doing exactly? (what is the code you use to tell the >>>>> symbol >>>>> to >>>>> do an action) >>>>> What would you expect to happen? >>>>> What is actually happening (error codes etc.) >>>>> Willem van den Goorbergh >>>>> >>>>> >>>>> On 9-mrt-2010, at 9:59, Fahim Akhter wrote: >>>>> >>>>> Hi, >>>>> >>>>> >>>>> >>>>>> I have a swf which I load using a customized swf loader. The problem >>>>>> I'm >>>>>> facing is after I load the swf, I want to tell one of its symbol to do >>>>>> an >>>>>> action. But this does not seem to work . Any word on that? >>>>>> >>>>>> >>>>>> >>>>> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= >>> Geografiek is a Dutch, Utrecht-based map and chart design company. >>> Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 >>> or >>> cell phone: (+31)6-26372378 >>> or by fax: (+31)302719687 >>> snail mail: Hooghiemstraplein 89 3514 AX UTRECHT >>> Visit our website at: http://www.geografiek.nl >>> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= >>> >>> >>> >>> >>> _______________________________________________ >>> Flashcoders mailing list >>> [email protected] >>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >>> >>> >>> >> _______________________________________________ >> Flashcoders mailing list >> [email protected] >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> >> >> > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

