Google   Web www.flash-here.com
 

Looking for Flash Downloads / Tutorials, but can't find it here?

Give us suggestions and we will try to make it up for you!


We got 1000 visits per day! Contact us to exchange link with us!

Passing Parameter to Flash Movie



Want to alter your flash movie's runtime behavior without re-exporting it? Then you should consider parameter passing in Flash. There are a couple of ways for a flash movie to communicate with external world (javascript, server side scritps...etc). In this tutorial, we will discuss about passing parameter to a flash movie in the way that looks like a cgi query string (no javascript, no server side script).

Let say you have a simple movie with a piece of text on it:

Now you want to make it possible to change the text dynamically (by altering the parameter passing to the movie).

Step 1

Open the fla and replace the text box with a dynamic text, set the variable name to "mytext" in the property panel (note: you should set the variable name not the instance name). Then export your movie.

Step 2

Edit the page that contain the flash movie. Select the flash movie and append "?mytext=something" to the swf file name in Dreamweaver's property panel. (if you want to edit the html code manually, you need to look for the swf file name in both the <OBJECT> and <EMBED> tag.)

Step 3

Test your HTML page! You should see the movie is now showing whatever you put as "something". Test more by changing the "mytext=" parameter in the HTML page.

Thats it! Easy?

 

< Tutorials Index - Download this tutorial - Post suggestions >