PDA

View Full Version : Communicating between SWFs



beczesz
March 3rd, 2009, 10:40 AM
Hi!
I have a loader swf, from which I want to transmit some parameters.
adaLoader = new Loader();
adaLoader.load(new URLRequest("game.swf?id=2");
In the game (receiver) project I get this variable with:
this.loaderInfo.parameters.id
and it works well.

But if I have mxml at the main class of the project, how can I do this thing???

I tried this, but it doesn,t work:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:cmp="*" layout="absolute" creationComplete="initVars()" >
<mx:Script> <![CDATA[
[Bindable]
public var str:String;

// Assign values to new properties.
private function initVars():void {
str = Application.application.parameters.isti;
}
]]></mx:Script>
</mx:Application>

watcher
March 3rd, 2009, 11:23 AM
But if I have mxml at the main class of the project, how can I do this thing???

:)
this should be moved to Flex forum..

but since there is no such forum on kirupa, and Flex is a bit different, what to do with you (http://kanuwadhwa.wordpress.com/2007/09/20/communication-between-swf-files/)? :P