Amps Posted October 31, 2007 Share Posted October 31, 2007 Hey people, Is there any method of hiding the echo function so it is not visible? Im passing php variables to a flash movie using echo("&var1=$var1&") which works as intended but the code is visible on the screen. Thanks. Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted October 31, 2007 Share Posted October 31, 2007 Use print instead of echo. Quote Link to comment Share on other sites More sharing options...
Amps Posted October 31, 2007 Author Share Posted October 31, 2007 Um, print is the same as echo... I need it to pass variables to flash but be invisible. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted October 31, 2007 Share Posted October 31, 2007 what do you mean teh code is visible on screen? do you mean you can see php code in your markup? or do you mean you want to hide all teh flash vars being sent to the swf? If its the latter I suggest that you look a retrieving data within the swf using xml (the xml can be generated by a php script called by the swf) to generate the info. It could be that you place all the data you need in a session variable, call the php script that generates the data and then clear those session vars - unless someone knows what the session vars are called they will be unable to see what info is being sent... Quote Link to comment Share on other sites More sharing options...
Amps Posted October 31, 2007 Author Share Posted October 31, 2007 Example: I have a index.php page with lots of variables like $var1 = "Whatever"; I pass the variables to flash using echo("&var1=$var1&") I have a flash movie on that page which is displaying these variables then BUT since im using echo the variable is ALSO displayed on the body of the page. Quote Link to comment Share on other sites More sharing options...
trq Posted October 31, 2007 Share Posted October 31, 2007 Dont use the same page to create the php variables as your using to embed the flash file into. Been a while since Iv'e done much flash but you should simply call a php script via something like... LoadVars('yourscript.php','GET'); Quote Link to comment Share on other sites More sharing options...
Amps Posted October 31, 2007 Author Share Posted October 31, 2007 I know I could put them on a different page, I was just wondering if there was another way. I suppose thats all I can do now anyway, thanks for your help people. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.