[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 396
  • Last Modified:

Passing Object from one .swf file to another

Hi,

I am new to action script 3.0

I am working on existing flash project which is calling internaly swf files one after the other.

I have code available.

In my website I have all the .swf files are available

In SaveForm.swf file below code is used

Settings.getInstance().dispatchEvent(new SiteEvent(SiteEvent.JUMP_TO_PAGE, true, true, { page: 13 } ));

which is taking to the another ShareForm.swf file


This is in method submitData()

Also in the same SaveForm.swf, I have another object UserData, where all user data is saved

private function saveUserData():void {
      var my_message:String = 'Hello';

      // setup User Data object
      //popAlert("Dinesh3",yourfirstname);
      //popAlert(titleList.value,yourfirstname);
      UserData2.getInstance().setTitle(String(titleList.value));
      trace("--------------->"+typeof(titleList.value))
      popAlert("Dinesh4",yourfirstname);
      trace("Dinesh 5");
      UserData2.getInstance().setFirstname(yourfirstname.text);
      UserData2.getInstance().setLastname(yourlastname.text);
      UserData2.getInstance().setEmail(youremail.text);
      UserData2.getInstance().setCountry(_selectedCountry);                  
}
 

I wanted to recive UserData2 object values in my ShareForm.swf

All object values are accepting in method jumpToPageHandler() ShareForm for example
youremail.text = UserData2.getInstance().getEmail();

What code I should write in both files so, that I should receive UserData2 object values in ShareForm.swf

I am not sure why this is not working in existing code, I can see this bit is working on production, but cannot see any code in code avalible

so, I have to pass these values like this only

Please guide me. I am attaching both .fla files action script. Please find it attached.

Many Thanks,
SaveForm.as
ShareForm.as
0
tia_kamakshi
Asked:
tia_kamakshi
  • 2
  • 2
1 Solution
 
dgofmanCommented:
Where FLA file?
0
 
dgofmanCommented:
For passign data between SWF you must use LocalConnection. I don't see you are using in your AS files

http://fcontheweb.com/articles/localconnection/
0
 
tia_kamakshiAuthor Commented:
Thanks dgofman,

I will try this tommorow and come back to you.

Thanks again
0
 
tia_kamakshiAuthor Commented:
Hi dgofman,

Just for information, I have not yet tested this. I will test and come back to you today or by tommorow.

Sorry about delay

Thanks again for your help
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now