-
Hello,
I've had no problems getting my flash movie to load variables from outside textfiles. Here is my dilema:
I want to be able to change the url and have the flash update. So for example, if I put in the url:
http://www.mysite.com/main.php?siteid=testsite
I want the flash movie embedded in main.php to update and have the variable siteid = "testsite". Does that make sense?
I can get my flash to update dynamically if I manually edit the variables file, but I'd like to be able to change the content of the variables file from the browser url and have the flash update accordingly.
Thanks for any help you can give me,
solid
-
Hi,
the solution is to have javascript create the html embedding for the movie.
To start with, location.search is a javascript item that would read ?siteid=testsite in your example.
Now, where your stndard html page reads
<object ....><param name=movie value="movie.swf"> .... <embed src="movie.swf" width=....></embed></object>
do a little edit. Start by putting all that stuff on a long line and then add text in bold
<script>
document.write('<object ....><param name=movie value="movie.swf'+location.search+'"> .... <embed src="movie.swf'+location.search+'" width=....></embed></object>');
</script>
Be sure that the single quotes you add come in matching pairs
Musicman
-
Is there anything special I need to do inside of my flash movie? I am currently using loadvariables and the name of the file that the flash is embedded in.
solid
-
Senior Member
You don't need to do anything special inside the flash movie if you pass the variables into the movie in this method.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|