Bookmarking a Flash Scene

  • RockmanTV
  • Proficient
  • Proficient
  • RockmanTV
  • Posts: 348

Post 3+ Months Ago

I'm trying to bookmark flash scenes, but I'm having trouble with the php variable to flash variable. I've tried using the loadVariable function in flash but it doesn't seem to work?

for example this:

This PHP code is on my index.php site:

Code: [ Select ]
<?php
$bookmark = "Hithere";
?>
  1. <?php
  2. $bookmark = "Hithere";
  3. ?>


For some reason the loadvariable function doesn't work with it.

How do I pass my php variable ($bookmark) to Flash so that I can store "Hithere" in a variable inside the flash movie?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

well, you have to use some kind of language within the flash document to get the php. are you doing anything already?

i'm pretty sure that if you check out "loadVariables", you'll come across something useful...

Code: [ Select ]
loadVariables("index.php","target","GET");


or something like that
  • RockmanTV
  • Proficient
  • Proficient
  • RockmanTV
  • Posts: 348

Post 3+ Months Ago

roarmeow wrote:
well, you have to use some kind of language within the flash document to get the php. are you doing anything already?

i'm pretty sure that if you check out "loadVariables", you'll come across something useful...

Code: [ Select ]
loadVariables("index.php","target","GET");


or something like that


Yea I've been using the actionscript function loadVariables. However, as you can see there's the GET or POST argument at the end. The variables I have aren't form variables they're just regular variables. I used to $COOKIE[] global to read in the data from the cookie and store it in a variable, and I want to pass that variable to my flash movie. Will look more into loadVariables though, it's seems like it's the only function that will work.
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

attach it as a query string at the end of the src value in the embed code ;)

All variables attached there are automatically imported to the _root timeline of Flash.

Code: [ Select ]
src='myFile.swf?goScene=whatever'


You would of course need to have the PHP modify that goScene=whatever part.

Unless I am misunderstanding then loadVariables is your best bet... though if you want you can look into the LoadVars() object... which is the more capable and updated loadVariables() (though sometimes loadVariables() is all you need to get the job done)

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 18 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.