Hi there!
I ran into a really strange problem today.
I'm dynamically loading an swf with several MovieClips and an "exported for ActionScript" MovieClip holding several Sub-Movieclips.
So far, so easy, works like a charm (please mind I only post the relevant codeparts for readability).Code:mcl = new Loader(); mcl.contentLoaderInfo.addEventListener( Event.COMPLETE, caveloadcomplete); ... function caveloadcomplete(event : Event) : void { var mc:MovieClip = MovieClip( mcl.content ); MovieClip(mainstage["bgh"]).addChild(mc); var appDomain:ApplicationDomain = mcl.content.loaderInfo.applicationDomain; var maclass:Class = Class( appDomain.getDefinition("movearea") ); cavemas = new maclass(); mainstage.moveareaholder.addChild( cavemas ); }
Now for the strange Part: if I try to do the following:
exactly *nothing* happens. No click events. If I try it this way:Code:cavemas.addEventListener( MouseEvent.CLICK, moveclick );
It produces every single Click Event correctly (n2 is one of cavemas Sub-Movieclips). So it really looks like the MouseEvent doesn't bubble.Code:cavemas["n2"].addEventListener( MouseEvent.CLICK, moveclick );
If I just copy the whole "cavemas" clip to the loading clip, it also works as intended, so I suppose it has got something to do with the dynamic loading and adding of the clip.
If I couldn't explain this clear enough, I found a guy having exactly the same problem, but in another Forum: http://www.actionscript.org/forums/s....php3?t=180594
Any help would be highly appreciated, thank you in advance for your time!




Reply With Quote