| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Feb 2006
Posts: 6
|
Hi i'm currently struggling right now to move a swf loaded from a loader object into a display object. I'm trying to move the loaded swf into a MovieClip so i can use it's properties, but can't figure out how, nor can i find documentation on it anywhere ...
here's the general code: loader = new Loader(); loader.addEventListener(Event.INIT, onLoadStart); loader.addEventListener(Event.COMPLETE, onLoadComplete); private function onLoadComplete(event:Event):void { output_swf.addChild(loader); Console.trace('loading swf to layer ' + info.contentType); } but at that point, the output_swf currentFrame property is always at 1 ... so i know the loader must be part of the output_swf .... any ideas? |
|
|
|
|
|
#2 |
|
lala
Join Date: Feb 2002
Location: on the road
Posts: 2,859
|
where do you create the output swf and do you ever add that to the display tree?
|
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Feb 2006
Posts: 6
|
i figured it out.
on the COMPLETE event, i had to make sure i was casting the content as a movieclip. var clip:MovieClip = MovieClip(loader.getChildAt(0)); someplace.addChild(clip); clip.gotoAndStop(5) |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to deal with callbacks in class files by using composition of MovieClip? | mediaholic | ActionScript 2.0 | 7 | 11-07-2005 04:14 PM |
| printJob Class, particular frame only | seeFresh | ActionScript 2.0 | 2 | 10-06-2005 10:59 AM |
| sigh, the damned mac | olganunes | ActionScript 1.0 (and below) | 0 | 07-13-2001 08:23 PM |