•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 397,816 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,575 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1672 | Replies: 3
![]() |
| |
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:
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.
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.
piratemon.day.be - My grass is always greener
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 943
Reputation:
Rep Power: 5
Solved Threads: 47
You can pass query string data into flash movies. That is; if you put something like:
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/flas...ng/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..
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/flas...ng/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..
If it only works in Internet Explorer; it doesn't work.
The thing you could do could be done as Matt said. Here's another thread, not exactly same but will give you a drift http://www.daniweb.com/techtalkforums/thread58249.html
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
- Javascript MP3 Player (JavaScript / DHTML / AJAX)
- Need A Special Coloumn For Flash Action Scripting (DaniWeb Community Feedback)
- Flash Pages (Search Engine Optimization)
- how can i make php alert pop ups just like in javascript. (PHP)
- swfObject unloads when i call javascript (Graphics and Multimedia)
- embPerl or PHP (Perl)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: how to get to next record on click of a button.
- Next Thread: disable javascript through javascript in firefox



Hybrid Mode