Looks like it's the scope. mcClip isn't accessable inside the function
you are calling. Try setting the function noramlly and then use delegate
to attach it to the onLoadComplete listener.

Jim

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marco
Tabini
Sent: 18 March 2006 04:06
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Cannot stop loaded movie

Sorry, that was just a bad copy-and-paste job. Moving the listener to 
before the clip is loaded doesn't change anything. Good catch, though :)


Marco

Marc Hoffman wrote:
> Try adding the listener to ld before loading the clip.
> 
> At 07:07 PM 3/17/2006, you wrote:
>> To add to the weirdness: this problem only presents itself if I
create 
>> the project in Flash 8, so I wonder whether I'm hitting my head 
>> against the new security model. Again, any help would be much 
>> appreciated.
>>
>>
>> Marco
>>
>> Marco Tabini wrote:
>>> Hello--
>>> I am trying to control a movie I load from a remote location. I've 
>>> narrowed down my code to the smallest possible number of lines:
>>> ld = new MovieClipLoader();
>>> ld.loadClip(url, mcClip);
>>> obj = new Object();
>>> obj.onLoadComplete = function()
>>> {
>>>     mcClip.gotoAndStop (10);
>>> }
>>> ld.addListener(obj)
>>> This code, placed in the actions panel of the root, works with the 
>>> exception of the onLoadComplete function. The mcClip is simply an 
>>> instance of a movie clip symbol (with no code) placed on the stage. 
>>> The loaded movie is just a collection of frames, with no actions 
>>> associated to it.
>>> The really bizarre thing is that this works just fine if I run the 
>>> code from inside Flash: the movie loads and then it jumps to frame 
>>> 10, where it stops.
>>> If I run the SWF inside the standalone player (or inside a browser 
>>> plugin on Windows, but not on a Mac), the external movie loads but 
>>> keeps looping and there seems to be no way to stop it.
>>> I cannot make sense of this. I've tried searching through the list, 
>>> but either this is so obviously wrong that nobody ever had the 
>>> problem, or I just don't know what to search for :)
>>> I'd appreciate any pointers!
>>> Thanks,
>>>
>>> Marco
>>> _______________________________________________
>>> Flashcoders@chattyfig.figleaf.com
>>> To change your subscription options or search the archive:
>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>> Brought to you by Fig Leaf Software
>>> Premier Authorized Adobe Consulting and Training
>>> http://www.figleaf.com
>>> http://training.figleaf.com
>> _______________________________________________
>> Flashcoders@chattyfig.figleaf.com
>> To change your subscription options or search the archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Adobe Consulting and Training
>> http://www.figleaf.com
>> http://training.figleaf.com
> 
> 
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
> 
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to