A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: reading a php variables value from a flash file on the same page.

  1. #1

    reading a php variables value from a flash file on the same page.

    I have this below php script. It's looking for what the value of the wordpress page title wp_title(''); is and then setting the value of $area to it.

    PHP Code:
        if ( 
    $soundset "about" ) { 
    $area "about";
        } elseif ( 
    $soundset "main" ) {
    $area "main";
        } elseif ( 
    $soundset "voices" ) {
    $area "voice";
        } elseif ( 
    $soundset "fun" ) {
    $area "fun";

    This is working fine.

    In my flash file on the first frame of the movie. I have this actionscript.

    Actionscript Code:
    _global.myArea = $area;

    I'm trying to read in the value of $area so it can populate this piece of actionscript where _global.myArea is.

    Actionscript Code:
    this.note1.loadSound("../../sounds/" + _global.myArea + "/note1.mp3", true);

    I can't seem to figure out how to get flash to read a variable that is in the php page the swf is running on.

    Can someone point me in the right direction?

  2. #2
    Registered User
    Join Date
    Feb 2001

    communication between flash and the html container can be done with either
    - setting flashvars from the html side or
    - calling a javascript inside the html from within flash.
    Since the value does not change once the page has loaded, try the first way. You will have to find out how WP embeds flash


Tags for this Thread

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