Im having a problem with a mov embedding in a swf file. What i want to achieve is to trigger a function when the swf file has stopped playing. For some odd reason i cant figure this out. My code is this:
import fl.motion.MotionEvent;
stop();
var pictLdr:Loader = new Loader();
var pictURL:String = "trafik1.swf"
var pictURLReq:URLRequest = new URLRequest(pictURL);
pictLdr.load(pictURLReq);
trafik1_mc.addChild(pictLdr);
trafik1_mc.addEventListener(Event.COMPLETE, remove);
function remove(event:Event)
{
trace("t");
trafik1_mc.removeChild(pictLdr);
}
Im having a problem with a mov embedding in a swf file. What i want to achieve is to trigger a function when the swf file has stopped playing. For some odd reason i cant figure this out. My code is this:
Thanks for your reply Terrible. Ive been messing about with it a bit, but it does not seem to work. It seems that your_mc.currentFrame always returns 1. I guess that this is because the progression of frames takes place in the child og your_mc? My problem then, is how to access the timeline of the child of your_mc.
Anyone has an idea of how to get this?
PS. I also am having a bit of problems with lastFrame. Is this a AS3 thing? It doesnt ‘turn blue’ in my Flash document.
Thank you, i changed it now. It does not make any difference though, since your_mc currentFrame is always 1 (and so is totalFrames)?! I need to get to your_mc’s child’s (pictLdr) timeline, and read the frames from there. any ideas?