#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    CA
    Posts
    2
    Rep Power
    0

    Javascript and Flash


    Does anyone know if it's possible to trap events and obtain input data from Flash using JavaScript? There's one caveat, I don't want to add any code to Flash to send the data to JS.
  2. #2
  3. No Profile Picture
    Beelzebub
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    The nether regions...ok, San Diego
    Posts
    164
    Rep Power
    13
    You can access any variable in flash with javascript, without the flash knowing it. You can change the variable, too. Just name your movie in the object and embed tags. Then you can access them...
    flashVar_name = document.myMovie.getVariable("var_name");
    document.myMovie.setVariable("var_name", "var_value");
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    CA
    Posts
    2
    Rep Power
    0

    Smile Thanks... Some more Questions though


    This definitely helps. Now, is there a way to obtain the list of variables I can retrieve? Basically, my Javascript is going to be blind. I have no idea what the flash app has as far as variables.

    Also, is there a way to get the event of a clicked button or a selection from a drop down list? Again, without previously knowing what's available. I know i can do this in html using JS by trapping events. Was wondering if I can use JS to do the same with Flash.
  6. #4
  7. No Profile Picture
    Beelzebub
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    The nether regions...ok, San Diego
    Posts
    164
    Rep Power
    13
    Those are excellent questions, kinda rare on this forum
    I'll do some experimenting and get back to you. Try posting this question on were-here forums, they are more flash oriented...
    http://www.were-here.com

IMN logo majestic logo threadwatch logo seochat tools logo