A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Yet another php question...

  1. #1
    Big Baby Fabriq-En-Chine's Avatar
    Join Date
    Sep 2005
    Location
    In My Pants
    Posts
    193

    Yet another php question...

    Sorry if i'm going over old ground here but i've searched the boards and can't seem to find anything that quite covers this...

    i'm using the loadVars() class to import some variables from a php file into flash as follows:

    stop();

    myVars = new LoadVars();
    myVars.load("books/flash_params.php");

    myVars.onLoad = function(success)
    {
    if(success)
    {
    trace(this.pic231);
    trace(this.getBytesTotal());
    trace(this.getBytesLoaded());

    }
    else
    {
    trace("error.");
    }
    }

    where pic231 is a variable name passed into flash from the flash_params.php file.

    The output window tells me it's loaded (getBytesTotal == getBytesLoaded)
    but no variables.... and when i list variables in the debugger i get part of the source of the php file itself rather than the variables that are echo'd from php....

    ...am i missing something really simple here? Has anyone else had the same problem?

    there's a tall glass of ice-cold beer for whoever solves this one

    FEnC

  2. #2
    Big Baby Fabriq-En-Chine's Avatar
    Join Date
    Sep 2005
    Location
    In My Pants
    Posts
    193
    I've tried running the php file in a browser - copying the output into a text file and then importing that textfile into flash using the loadVars() set up above and it works fine!

    So it's all about the php file that's being called by flash...

    ...any ideas anyone? Any common problems that i'm missing?

  3. #3
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi,

    you should just call your movie in the browser

    Musicman

  4. #4
    Big Baby Fabriq-En-Chine's Avatar
    Join Date
    Sep 2005
    Location
    In My Pants
    Posts
    193
    I saw in another post that you need to run this in a browser because of the php - but the problem was internet explorer caching the page!!!!! When i had the correct set up it was reloading an older page by the looks of things and leaving me looking like a fool!

    My computer had a lucky escape just then, it was about to go sailing out of the window...

    musicman, thank you for taking the time to reply - you're a star, if you hadn't had said 'browser' it wouldn't have clicked...

    so where do i send the beer?

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