Welcome to Dream.In.Code
Getting Help is Easy!

Join 109,551 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,255 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



How to pass variables between multiple swf files?

 
Reply to this topicStart new topic

How to pass variables between multiple swf files?

Jonson
post 5 Aug, 2008 - 08:55 PM
Post #1


New D.I.C Head

*
Joined: 17 Apr, 2008
Posts: 36

Hi guys, here is my code:

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?



User is offlineProfile CardPM

Go to the top of the page


BetaWar
post 6 Aug, 2008 - 04:02 PM
Post #2


#include <soul.h>

Group Icon
Joined: 7 Sep, 2006
Posts: 1,266



Thanked 38 times

Dream Kudos: 775
My Contributions


Is the second SWF being imported to the first? Or is it just being displayed on the same webpage?
User is offlineProfile CardPM

Go to the top of the page

Jonson
post 6 Aug, 2008 - 06:07 PM
Post #3


New D.I.C Head

*
Joined: 17 Apr, 2008
Posts: 36

same window.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 9/7/08 10:38PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month