• ARCHIVES 
  • » [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

Pages: 12

[u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

myparis
» FTalker
FTalk Level: zero
118
0
1969-12-31

[u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

[u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie content. This tutorial is useful to your profile if you are using flash and if you want to make its content dynamic. [u][b]Requirements:[/b][/u] 1. Adobe Flash CS3 2. Some basic knowledge about Actionscript 2.0 [b][u]Step 1:[/u][/b] Open your Adobe Flash CS3 and create a new Flash file. Setup the size of the stage in any size you want. [img]http://i173.photobucket.com/albums/w76/myparis16/p1.jpg[/img] [u][b]Step 2:[/b][/u] Create a new text field in your stage. Drag the Text Tool in the stage and set its size. [img]http://i173.photobucket.com/albums/w76/myparis16/p2.jpg[/img] Click on the newly created text field,on the [b]Properties Panel[/b] Select the [b]Dynamic Text[/b] and give it an instance name of [b]text1[/b] [img]http://i173.photobucket.com/albums/w76/myparis16/p3.jpg[/img] [u][b]Step 3:[/b][/u] Put some Actionscript. Click the first frame of the movie [img]http://i173.photobucket.com/albums/w76/myparis16/p4.jpg[/img] and press F9 to show the Actions Panel. [img]http://i173.photobucket.com/albums/w76/myparis16/p5.jpg[/img] type in this codes: [img]http://i173.photobucket.com/albums/w76/myparis16/p6.jpg[/img] EXPLANATION: -The first line [quote][color=blue]stop[/color]();[/quote] commands the movie from stop playing, because i will not make the movie loop even though its just 1 frame. -In the second line [quote][color=blue]var[/color] varString1;[/quote] declaring a new variable named varString1. This variable will hold any string to be past from outer to inner swf movie. -The last line [quote][color=blue]_root[/color].text1.text = [color=blue]_root[/color].varString1;[/quote] [color=blue]_root[/color] code determines that the object or variable is located at the root frame of the movie. Here we set the content of the Text Field object [b]text1[/b] to the content of the variable [b]varString1[/b]. Now Test your movie (ctrl + enter). The ouput should be like this: [img]http://i173.photobucket.com/albums/w76/myparis16/p7.jpg[/img] The text said [i]undefined[/i] because the variable varString1 still contains nothing. Save your work. [b][u]Step 4:[/u][/b] In the publish settings (Ctrl+Shift+F12) choose the formats. [img]http://i173.photobucket.com/albums/w76/myparis16/p8.jpg[/img] Click [b]Publish[/b]. It will now generate a html code like this: [quote]<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="400" height="100" id="tuts" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="false" /> <param name="movie" value="tuts.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="tuts.swf" quality="high" bgcolor="#ffffff" width="400" height="100" name="tuts" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>[/quote] Now add the [b]FlashVars[/b] property. in the <object> tag add a <param> tag like this [quote]<param name="[b]FlashVars[/b]" value="[b]varString1[/b]=[color=red]HelloWorld[/color]">[/quote] and in the <embed> tag add a new attribute [b]FlashVars[/b] like this: [quote]<embed [b]FlashVars[/b]="[b]varString1[/b]=[color=red]HelloWorld[/color]" />[/quote] The Final code should look like this after adding the [b]FlashVars[/b] Property [quote]<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="400" height="100" id="tuts" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="false" /> <param name="movie" value="tuts.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="[b]FlashVars[/b]" value="[b]varString1[/b]=[color=red]HelloWorld[/color]"> <embed src="tuts.swf" [b]FlashVars[/b]="[b]varString1[/b]=[color=red]HelloWorld[/color]" quality="high" bgcolor="#ffffff" width="400" height="100" name="tuts" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>[/quote] Now test your work. If you run the swf movie in the browser the output should be like this: [img]http://i173.photobucket.com/albums/w76/myparis16/p9.jpg[/img] If you want to merge it on a Js File and if you want to pass an variable from a Js File just [b]concatenate[/b] the Js variable in the code, like this: [quote]var swf_kow = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" width=\"400\" height=\"100\" id=\"tuts\" align=\"middle\"> <param name=\"allowScriptAccess\" value=\"sameDomain\" /> <param name=\"allowFullScreen\" value=\"false\" /> <param name=\"movie\" value=\"tuts.swf\" /> <param name=\"quality\" value=\"high\" /> <param name=\"bgcolor\" value=\"#ffffff\" /> <param name=\"[b]FlashVars[/b]\" value=\"[b]varString1[/b]="+[color=red]pageViewerFName[/color]+"\"> <embed src=\"tuts.swf\" [b]FlashVars[/b]=\"[b]varString1[/b]="+[color=red]pageViewerFName[/color]+"\" quality=\"high\" bgcolor=\"#ffffff\" width=\"400\" height=\"100\" name=\"tuts\" align=\"middle\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /> </object>";[/quote] If you use more than 1 variable and want to pass more values, make it like this: in the <object> tag [quote]<param name="[b]FlashVars[/b]" value="[b]varString1[/b]=[color=red]HelloWorld[/color][b]&[/b][b]varString2[/b]=[color=red]HelloToo[/color]">[/quote] and in the <embed> tag [quote]<embed [b]FlashVars[/b]="[b]varString1[/b]=[color=red]HelloWorld[/color][b]&[/b][b]varString2[/b]=[color=red]HelloToo[/color]" />[/quote] use the [b]&[/b] to separate different variables Thats it. sample preview: [url=http://profiles.friendster.com/myparis]http://profiles.friendster.com/myparis[/url] Just look in my banner or in the comments area it looks like this [img]http://i173.photobucket.com/albums/w76/myparis16/p10.jpg[/img] correct me if something wrong here... hope it helps..

Last edited by myparis (2008-03-17 09:56:19)

bobcbar
» FTalkElite
FTalk Level: zero
5223
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

Nice tutorial for those with Adobe! thanks for sharing.
lilprincess950
» FTalkManiac
FTalk Level: zero
771
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

Nice tutorial,very helpful to me.
mudpoet
» FTalkAddict
FTalk Level: zero
393
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

tnx for this tuturial im gonna try this... :D [url=http://theftalk.com/?r=68104][img]http://addons.friendstertalk.com/member68104-black.gif[/img][/url]
eehjhay
» FTalkWhiz
FTalk Level: zero
2692
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

Nice. Im really lazy to study flash tutorials. But I really like to learn lol. Hope you can share more tutorials that include actionscripts. :D
slashedkite
» FTalkManiac
FTalk Level: zero
973
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

nice tutorial.. i can learn with this thing..
ezekielclarion
» FTalker
FTalk Level: zero
296
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

this tutorial rocks!!
jologz29
» n00b
FTalk Level: zero
90
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

nice tutorial bro. thanks! =D
myparis
» FTalker
FTalk Level: zero
118
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

tnx for the response guys :) [quote=eehjhay]Nice. Im really lazy to study flash tutorials. But I really like to learn lol. Hope you can share more tutorials that include actionscripts. :D[/quote] sure, ill post another flash tuts if i have time, tnx again [u][b]First Post Updated[/b][/u]
bobskie
» FTalkAddict
FTalk Level: zero
596
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

tnx for sharing bro...i tested it in my new flash banner,and it works..hehe.. keep it up :thumbsup: btw..how can i put dis script into the comment area??

Last edited by bobskie (2008-03-18 10:00:34)

Chezter18
» Banned
FTalk Level: zero
237
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

wow great... ahmmm 75% understand..........
SCHiZOPHRENIC SUNSHiNE
» n00b
FTalk Level: zero
56
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

hey cool tenks for d tut man i will try dis tomorrow. btw, lerv yer vector art.
myparis
» FTalker
FTalk Level: zero
118
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

[quote=bobskie]tnx for sharing bro...i tested it in my new flash banner,and it works..hehe.. keep it up :thumbsup: btw..how can i put dis script into the comment area??[/quote] oh great my tutorial works, hehe.. sir thats another tutotial i will post later. :) _______________________________________________ [quote=SCHiZOPHRENIC SUNSHiNE]hey cool tenks for d tut man i will try dis tomorrow. btw, lerv yer vector art.[/quote] tnx.. ahm my friend made that vector art, here he is http://profiles.friendster.com/bangz2 i like your artworks.. :D

Last edited by myparis (2008-03-18 12:43:39)

bobskie
» FTalkAddict
FTalk Level: zero
596
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

nice one :thumbsup:..im gana w8 for that :lol: .. btw.dnt call me sir =D \m/
kangkong10
» FTalkManiac
FTalk Level: zero
617
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

thanks for this tutorial.. and i try this also later.. keep on sharing dude...
myparis
» FTalker
FTalk Level: zero
118
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

[quote=bobskie]nice one :thumbsup:..im gana w8 for that :lol: .. btw.dnt call me sir =D \m/[/quote] maybe ill post that tutorial next day because I'm kinda busy.. haha.. I'm used calling my buddies [b]"sir"[/b] here in ftalk..:lol:
bobskie
» FTalkAddict
FTalk Level: zero
596
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

ok sir...no problem =D
angelalaine
» FTalkManiac
FTalk Level: zero
860
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

Oh shoot I dont have adobe :D
AnimE_GuL
» FTalker
FTalk Level: zero
108
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

[align=center][b][color=#ff6699]nice tutorial... kip up d good work! =) :thumbsup:[/color][/b][/align]
myparis
» FTalker
FTalk Level: zero
118
0
1969-12-31

Re: [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

[quote=angelalaine]Oh shoot I dont have adobe :D[/quote] You can download it at http://www.adobe.com/ just register and download the free trial. Then if you have it i will give you a crack
  • ARCHIVES 
  • » [u][b]Introduction:[/b][/u] [b]FlashVars[/b] is a property of Adobe Flash Player to import variables into the top level of movie when first instantiated. This is useful to make a dynamic swf movie con

Pages: 12

Board footer

© 2024 F Talk

Current time is 07:31

[ 10 queries - 0.053 second ]
Privacy Policy