SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2005
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pass variables to Flex program loaded with SWFLoader

    Hello all

    I am very new to flex and have encountered something that I need assistance with. I am loading a flex application into another flex application using the SWFLoader. I would like to pass some variables to the application I am loading.

    Any ideas?

    Thanks!
    AFrieze
    Criticism may not be agreeable, but it is necessary.
    It fulfils the same function as pain in the human body.
    It calls attention to an unhealthy state of things.
    ----Winston Churchill

  2. #2
    SitePoint Wizard jim_morrison3's Avatar
    Join Date
    Apr 2004
    Location
    UK
    Posts
    2,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're trying to access any variables of the loaded swf then you can always access it using the instance name of the loaded swf file, therefore if you have a public variable called myVar in the your loaded swf (say loadedSWF), then you can always access it by loadedSWF.myVar.
    Good Luck!
    There are things known and Things unknown
    And in between are the Doors.
    I love hand Coding.

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2005
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply jim, Unfortunately that's not quite what I am attempting to do. The inner flex program needs some information to initialize properly. Things like account_key, width, height, etc...

    Andrew
    Criticism may not be agreeable, but it is necessary.
    It fulfils the same function as pain in the human body.
    It calls attention to an unhealthy state of things.
    ----Winston Churchill

  4. #4
    SitePoint Wizard jim_morrison3's Avatar
    Join Date
    Apr 2004
    Location
    UK
    Posts
    2,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In that case pass the variables when the swfloader's "complete" event is fired.
    Good Luck!
    There are things known and Things unknown
    And in between are the Doors.
    I love hand Coding.


Bookmarks

Posting Permissions

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