开发者

flex swfloader: is it possible to add classes and functions to the loaded flash file?

开发者 https://www.devze.com 2022-12-14 02:15 出处:网络
I have a flex application that loads swf files and displays them using the SWFLoader object. is there a way to provide different classes and functions for the swf application to use?

I have a flex application that loads swf files and displays them using the SWFLoader object. is there a way to provide different classes and functions for the swf application to use?

for example. if the swf file that i'm loading has the following function:

function testme(): void {
  trace('test');
}

can i somehow override that function with something else so if the flash file will actually execute the function it will execute mine ?

i want to create a wrapper flex application to specific flash applications that i made 开发者_如何学编程and i don't want to modify the original flash too much.


i searched all over the net and i did not find a a way to override function for a loaded swf file. after some consideration it seems that if there was an option to do that, please could easily hack flash files and change them to suite their needs.

it is possible to load a class from a different swf file. then instead of trying to override the functions i wanna use. I'll just load them from the appropriate class and then use them.

more info at: http://stackoverflow.com/questions/1948104/actionscript-project-compiled-as-swf-how-can-i-load-it-with-flex-and-use-the-fun

0

精彩评论

暂无评论...
验证码 换一张
取 消