i've been doing some research on fs command, but i haven't found a true answer to my problem. What i would like to do is load an image into a flash file using the loadMovie("image.jpg") command. I want to do this so i could use the same flash container on each of my pages, but change the image that appears each time. Any ideas how i could do this?

I guess i was looking for something like this:

<script language = "JavaScript"><!--
function PassFlash(){
    window.document.movie.SetVariable("text", "hello");
}
//-->
</script>

But the only problem with this script is that i need to assign a button with this variable name and i need to click it to make the image load. This is also an old script (for an older version of Flash Player). All i want to do is have the image load when i start the page.

Thankyou in advance.

You can pass query string data into flash movies. That is; if you put something like:

mymovie.swf?myar=hello&

Wherever you'd normally write the name of a movie (i.e. in the object tag value and/or embed tag src); then that variable "myvar" will be available from the _root object within flash (in this case; _root.myvar will be equal to "hello")

this page explains it in a bit more detail:
http://www.permadi.com/tutorial/flashQueryString/index2.html

that's probably the cleanest way to do what you're trying to do. Let me know if it works; I've not used Flash versions past about 6... but, I don't see any reason why they'd remove this feature in a present version..

Have the dynamic page, php, jsp or even javascript write the file name to the init parameters for the flash movie embed tag...then the flash move can load whatever file is indicated as it init parameters...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.