dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: sending variables between .swf files

  1. #1

    sending variables between .swf files

    I am making a site that is in Hebrew and English. It contains two .swf files. The 1st .swf file allows the user to choose whether he wants the site in Hebrew or English. When he goes to the 2nd .swf file via a link I would like the 2nd .swf file to already know what language the user chose. How would I do this? using getURL and variables? this is all too advanced for me and I haven't found a tutorial that really explains it or that I can comprehend.

    MANY, MANY THANKS,

    Leao

  2. #2
    Junior Member
    Join Date
    Aug 2009
    Posts
    2
    You may want to look in to the ExternalInterface class. It's how you interact directly to and from JavaScript.

    So you might set up a function from the first, that defines the users language in Javascript from the first swf and it could either write it within the 2nd swf's params or again, passes it via and ExternalInterface listener.

  3. #3
    Senior Member vinayak.kadam's Avatar
    Join Date
    Oct 2006
    Location
    gotoAndPlay("Pune");
    Posts
    831
    Well, just to be little clear... ExternelInterface Class allows you to pass values to and fro between Flash and JavaScript.

    - Declare a vraible in JavaScript
    - Set that variable with the value user selected from 1st SWF
    - Read that value from the 2nd SWF and work accordingly

    All this can be done using ExternalInterface class!
    As ever,
    Vinayak Kadam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center