Add something to symbol in dynamicly loaded swf (ActionScript 3)
Posted
by
user1468671
on Stack Overflow
See other posts from Stack Overflow
or by user1468671
Published on 2012-06-20T09:15:05Z
Indexed on
2012/06/20
9:15 UTC
Read the original article
Hit count: 186
I have a program written in Flash Builder with Flex 4.6 sdk and swf movie with some symbols inside. Those symbols moving around the stage.
What I need is load that swf in my program and replace one of those symbols to my bitmap and show whole swf in flashContainer.
There is my code for now:
var swfLoader:Loader = new Loader();
var bgUrl:URLRequest = new URLRequest("testMovie.swf");
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(event: Event) : void {
var movie: MovieClip = event.target.content;
var headClass: Class = movie.loaderInfo.applicationDomain.getDefinition("headSymbol") as Class;
var head:MovieClip = new headClass() as MovieClip;
head.addChild(bmp);
flashContainer.source = movie;
});
but in flashContainer showed old movie.
If I do
flashContainer.source = head;
then only head with my bmp appears.
Need help. And sorry for my bad English.
© Stack Overflow or respective owner