Can I handle an event inside a loaded swf file(using swf loader) using MAT开发者_运维百科E when my main application fires the event ? i want to make a remote service call based on the data i get from the main applications event , and then populate my loaded swf .
It really depends how things are loaded. By default, no, Mate cannot do this because of the way events work; they go up the display list, and not down to the children.
The only way I can think of doing this is to wait for the swf to finish loading and then listen for the even on the root application (in Flex do FlexGlobals.topLevelApplication.addEventListener
). However, this is a huge hack and shouldn't be done. The real problem here is how your application is architected, and you should look into how to solve the issue at its core.
精彩评论