A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Flash to PHP

  1. #1
    Junior Member
    Join Date
    Apr 2004
    Location
    Poland
    Posts
    6

    Flash to PHP

    I've a coordinates.php:
    PHP Code:
    <?
    $coordinates = "80";
    ?>
    and in first frame in flash:
    loadVariablesNum ("coordinates_read.php", 0);
    _root.MC.onEnterFrame = function() {
    this._x = coordinates;
    };
    This should work like that: php send varible to flash and flash set MC coordinate at 80... but it doesn't working properly...

  2. #2
    psx = new Moderator();
    Join Date
    Jan 2001
    Posts
    923
    I moved your thread to the scripting & backend forum.

    Hopefully to answer your question (my php is rusty..) try this:

    Code:
    <? 
    echo "coordinates=80";
    ?>
    And then in flash (assuming mx):
    Code:
    myLV = new LoadVars();
    myLV.onLoad = function(success) {
         if(success==true) {
              _root.MC._x = this.coordinates;
         }
    }
    myLV.load("coordinates_read.php");

    psx

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