Passing Object from one .swf file to another

Posted on 2011-10-23
Last Modified: 2013-11-11

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
      trace("Dinesh 5");

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,
Question by:tia_kamakshi
    LVL 29

    Expert Comment

    Where FLA file?
    LVL 29

    Accepted Solution

    For passign data between SWF you must use LocalConnection. I don't see you are using in your AS files

    Author Comment

    Thanks dgofman,

    I will try this tommorow and come back to you.

    Thanks again

    Author Comment

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
    I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
    The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
    The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now