2 Replies - 5915 Views - Last Post: 06 August 2008 - 06:07 PM

#1 Jonson  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 17-April 08

How to pass variables between multiple swf files?

Post icon  Posted 05 August 2008 - 08:55 PM

Hi guys, here is my code:

import be.wellconsidered.services.WebService;
import be.wellconsidered.services.Operation;
import be.wellconsidered.services.events.OperationEvent;

var ws2 = new WebService("http://mcccu-pc12/ChineseCheckerWebsite/WebService.asmx?WSDL");
var userName : Operation = new Operation(ws2);

var timer1 : Timer = new Timer(1000,0);
timer1.addEventListener(TimerEvent.TIMER, theTimer1); 
timer.start();

userName.addEventListener(OperationEvent.COMPLETE, getUserName);
userName.getUserName2();

function getUserName(e :OperationEvent):void 
{ 
	var tf3 : TextFormat = new TextFormat();
	tf3.size = 20; 
	tf3.color =  0xFF0000;
	loginName_txt.setStyle("textFormat" , tf3)
	loginName_txt.text = e.data.toString();
}

create_Button.addEventListener(MouseEvent.CLICK, onCreate);
var loader:Loader = new Loader();

function onCreate(evt:Event):void
{
	timer1.stop();
	create_Button.enabled = false;
	var swf:URLRequest =new URLRequest("GameCreate.swf"); 
	loader.load(swf);
	addChild(loader);
	loader.x = 255;
	loader.y = 200;	
} 




How do i pass my variable timer1 and e.data.toString() to another SWF file after after i pressed create_Button in 1st SWF?

Is This A Good Question/Topic? 0
  • +

Replies To: How to pass variables between multiple swf files?

#2 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1155
  • View blog
  • Posts: 7,167
  • Joined: 07-September 06

Re: How to pass variables between multiple swf files?

Posted 06 August 2008 - 04:02 PM

Is the second SWF being imported to the first? Or is it just being displayed on the same webpage?
Was This Post Helpful? 0
  • +
  • -

#3 Jonson  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 17-April 08

Re: How to pass variables between multiple swf files?

Posted 06 August 2008 - 06:07 PM

same window.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1