I think this has changed.
loaderInfo class has been added in ActionScript 3.0, unfortunately I need to complete project in AS2.0.
If anyone has an example of this working - ie flash file created in CS3, AS2.0 using FlashVars, I'd greatly appreciate knowing!!
The FlashVars help section requires updating to cater for new code written by CS3 when publishing HTML and Flash.
HTML published automatically by CS3 as 'Flash only' includes an Active Content script which appears to work around blockers and the annoying 'click here to activate content' message in browser.
As such, if you wish to make use of the new script AND use FlashVars, the FlashVars parameter and name/value pairs need to be added:
(a) as arguments to the AC_FL_RunContent function call
(b) as parameters of the <object> tag
(c) as attributes of the <embed> tag
I am also having a problem getting using FlashVars to work with CS3 and AS 3.0. I don't get the solution presented here.
I have a Flash file that I mastered in AS 2.0 that used FlashVars successfuly. I just rewrote to AS 3.0 with CS3, and cannot get FlashVars to work.
1) When using an external package class, how do you pass a FlashVar into the class? Is it really the same as passing a var onto the main timeline?
2) In any case, I also tried placing all my AS 3.0 on the main timeline (stripped of package form), and still don't get success with FlashVar.
Can someone post a concrete example of getting FlashVars to work with AS 3.0?
I don't know if this helps any. This is what I have used.
in Flash CS3
//bank = 5000;
bank = root.loaderInfo.parameters.bank; //Pulls the variable from mysql db
in php file
$q = "SELECT (chips) FROM st_users WHERE uid='$user'";
$qr = mysql_query($q);
$bankarray = mysql_fetch_array($qr, MYSQL_ASSOC);
$bank = $bankarray['chips'];