all groups > flash actionscript > december 2004 >
You're in the

flash actionscript

group:

Using Java to control flash movie


Re: Using Java to control flash movie David Stiller
12/15/2004 5:01:23 PM
flash actionscript:
To do this, you'll have to grab that query string and use it to write
out the <object>/<embed> tags, perhaps with PHP, ASP, or JavaScript ( ...
not Java! -- different language altogether).

JavaScript's location object will give you what you need; specifically,
the location object's "search" property. In HTML, for example, simply put
....

<script>
document.write(document.location.search);
</script>

.... into an otherwise empty HTML document. Test this page in a browser and
you'll see nothing. But if you append a query string to the end of your
file name in the address bar -- say, whatever.html?myVar=jammies -- you'll
see "?myVar=jammies".

This String (complete with question mark) is all you need to tack on to
your SWF reference in the <object> and <embed> tags. You'll have to use
JavaScript (or, again, some server side language) to write out those tags.

e.g.
document.write("<param name=movie value=\"sample.swf" +
document.location.search + "\">");


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

Using Java to control flash movie rwills
12/15/2004 9:21:10 PM
I have an autoresponse email that goes out and would like to have a link on
that email which, when clicked, will open a browser window and take the user to
my flash site and also advance the current movie to a particular point on the
timeline. Does anyone have any suggestions as to how I can implement that or if
it is not even a possibility? Thanks, Ryan
Re: Using Java to control flash movie TimSymons
12/15/2004 9:24:20 PM
You can attach a '?frame=someNumber' to the end of the URL and then use that variable within your Flash file to automatically jump your movie to the correct frame number or better yet frame label.

AddThis Social Bookmark Button