kevincro Posted March 26, 2008 Share Posted March 26, 2008 I need to know if it's possible to pass a variable through a link contained in a flash animated menu. below is the type of variable I'm trying to send $id = $userdata['user_level']; <a href="../home.php?item_id=$id"> Quote Link to comment Share on other sites More sharing options...
puritania Posted March 26, 2008 Share Posted March 26, 2008 Is the link is in the flash movie (as html-text) ? Quote Link to comment Share on other sites More sharing options...
kevincro Posted March 26, 2008 Author Share Posted March 26, 2008 Honestly I don't know much at all about Flash. I bought a program that you can use button templates to make the menu. I had to upload an .swf file and an html file. I'm not sure if this answers your question though. Quote Link to comment Share on other sites More sharing options...
soycharliente Posted March 26, 2008 Share Posted March 26, 2008 $id = $userdata['user_level']; <a href="../home.php?item_id=$id"> There is nothing wrong with that code. Using data saved in a php variable for insertion in a link is very common. What exactly are you having trouble with. You're being quite vague IMO. Quote Link to comment Share on other sites More sharing options...
kevincro Posted March 26, 2008 Author Share Posted March 26, 2008 My vagueness is really more ignorance than anything else. In the program I'm using I have to enter the url associated with each button. Then the program outputs an swf file and an html file. The HTML contains the following code: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="126" height="207"> <param name="BGCOLOR" value="#61678"> <param name=movie value="usermenua.swf"> <param name=quality value=high> <embed src="usermenua.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="126" height="207" bgcolor="#61678"> </embed> </object> I assume this code points the browser to the swf file. I don't see any way of including the php variable into the links in the flash menu. Quote Link to comment Share on other sites More sharing options...
soycharliente Posted March 26, 2008 Share Posted March 26, 2008 I don't think so. What are you trying to do by having a PHP variable put into the link inside the Flash menu? Quote Link to comment Share on other sites More sharing options...
MatthewJ Posted March 26, 2008 Share Posted March 26, 2008 Yes, you can call a dynamic link from within a flash movie... but not without using some actionscript to "catch" the variable inside the swf... The html page you uploaded is merely a holder for the swf file. This link may help explain it a bit better http://www.kirupa.com/forum/showthread.php?t=101228 Quote Link to comment Share on other sites More sharing options...
kevincro Posted March 26, 2008 Author Share Posted March 26, 2008 Yes, you can call a dynamic link from within a flash movie... but not without using some actionscript to "catch" the variable inside the swf... The html page you uploaded is merely a holder for the swf file. Okay, thanks I just wanted to know if it were possible before I started looking through Flash manuals. Quote Link to comment Share on other sites More sharing options...
soycharliente Posted March 26, 2008 Share Posted March 26, 2008 MatthewJ is right. I think ActionScript can read in an XML file. You could dynamically generate an XML file that your SWF would use to read in the links for. 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.