tags:

views:

66

answers:

1

Hi. 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.

A: 

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

ufk