| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Senior Member
Join Date: Oct 2002
Location: NY
Posts: 657
|
i recently used flashvars to pass variable into swf from html.
i used javascirpts before since they suggested javascirpts example. flashvar is 100X easier to use and more effective. i could not find toomuch documentation on this matters in this forum. i will post some good links that i found when i goback to my office. my point is...it is very useful. but not many knows about this. if someone should type flashvars in search arg. i want this thread to appear with added link i will put later.. if some one have some other good links..feel free to addthem. thanks.
__________________
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer." Thoreau |
|
|
|
|
|
#2 |
|
Master of Nothing
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
|
Yep I always use FLASHVARS when passing variables to my movie from an object or embed tag.
Code:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="210" HEIGHT="105" id="mp3player" ALIGN=""> <PARAM NAME=movie VALUE="mp3player.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=FlashVars VALUE="mp3name=City_of_New_Orleans.mp3"> <PARAM NAME=bgcolor VALUE=#000000> <EMBED src="mp3player.swf" quality=high bgcolor=#000000 WIDTH="210" HEIGHT="105" NAME="mp3player" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" FLASHVARS="mp3name=City_of_New_Orleans.mp3"> </EMBED> </OBJECT> |
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: May 2003
Posts: 848
|
Colin Moock touches on it in the Definitive Guide.
Macromedia's take is at: http://www.macromedia.com/support/fl.../flashvars.htm And a few others: http://www.impossibilities.com/blog/flashvarstip.php http://www.ultrashock.com/ff.htm?htt.../FlashVars.php You need to be careful because it only applies to the Flash Player 6. |
|
|
|
|
|
#4 |
|
Addicted To FLASH
|
good links Sualdam
thx, never used them b4
__________________
â€* GOD Is Near â€* Questions Don't PM for Questions An eye for an eye, make the whole world blind _____________________________________________GHANDI |
|
|
|
|
|
#5 | |
|
Senior Member
Join Date: Oct 2002
Location: NY
Posts: 657
|
Quote:
__________________
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer." Thoreau |
|
|
|
|
|
|
#6 |
|
Addicted To FLASH
|
do it and send it to Jesse
it it worth to be there, he will post it
__________________
â€* GOD Is Near â€* Questions Don't PM for Questions An eye for an eye, make the whole world blind _____________________________________________GHANDI |
|
|
|
|
|
#7 |
|
Registered User
Join Date: Feb 2005
Location: Manchester, UK
Posts: 20
|
Here's some javascript to help putting in flashvars , it makes the whole process a lot easier.
http://www.centralquestion.com/archi...lash_flas.html |
|
|
|
|
|
#8 |
|
Registered User
Join Date: Jun 2005
Posts: 2
|
I just found out that Flash isn't too happy if you try to assign the scope of a variable from HTML.
For example, I wanted to create a _global variable named "myVar". If I placed a dynamic text box on the stage at frame 1 with the variable set to "_global.myVar", I could see the assignment. The same text box copied and pasted to frame 2 showed nothing! I ended up having to write something like the following script to get my ActionScript to work: ActionScript Code:
Folks, please let me know if anyone else has run into this, or if I am just crazy. |
|
|
|
|
|
#9 |
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,878
|
Howdy and Welcome...
![]() What's not happy is not the FlashVars but the variable name you are using for the textField... You should use instance name rather than the variable name if you are using FMX and above... For example, remove the _global.myVar in the variable name field, and give that textField an instance name of content_txt and add this line at the bottom of that if statement... ActionScript Code:
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer http://CyanBlue.FlashVacuum.com http://www.FlashVacuum.com http://tutorials.FlashVacuum.com Do NOT PM, Email or Call me... Your question belongs right in this forum...
|
|
|
|
|
|
#10 |
|
Registered User
Join Date: Jun 2005
Posts: 2
|
That is a very valid point. However, my ultimate usage had nothing to do with textfields at all, I was trying to use the variable in my script. I just had the text field example as a troubleshooting measure.
Flash just didn't seem to like me setting FlashVars="_global.myVar=whatever" (Please assume the correct syntax for the OBJECT tag throughout this paragraph). It worked well when I set FlashVars="myVar=whatever", and then assigned it to a _global scope in my first frame with the code from my previous post. Also, it acted the same way with the src="myMovie.swf?myVar=whatever" method. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|