burnem
asked on
Automatically Load Dynamic Image
Hi all-
I'm using the following code to load a dynamic image based off of a php variable that is passed in the <object> tag
========================== ====
image1.onLoad = function () {
loadMovie(txtImageURL,"ima ge1");
};
image1.onRelease = function () {
loadMovie(txtImageURL,"ima ge1");
};
==========================
Here is the issue... the onRelease function works and will swap out the image with the one I want, whereas the onLoad does absolutely nothing. The script is on the first frame of the movie, so I have tried to make it an onEnterFrame as well as a "root.onLoad" to no avail... any ideas??
Thanks
brendan
I'm using the following code to load a dynamic image based off of a php variable that is passed in the <object> tag
==========================
image1.onLoad = function () {
loadMovie(txtImageURL,"ima
};
image1.onRelease = function () {
loadMovie(txtImageURL,"ima
};
==========================
Here is the issue... the onRelease function works and will swap out the image with the one I want, whereas the onLoad does absolutely nothing. The script is on the first frame of the movie, so I have tried to make it an onEnterFrame as well as a "root.onLoad" to no avail... any ideas??
Thanks
brendan
this works:
_root.onLoad = function()
{
loadMovie(txtImageURL,"ima ge1");
}
_root.onLoad = function()
{
loadMovie(txtImageURL,"ima
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This handler can be used only with movie clips for which you have a symbol in the library that is associated with a class. If you want an event handler to be invoked when a specific movie clip loads, for example when you use MovieClip.loadMovie() to load a SWF file dynamically, you must use onClipEvent(load) instead of this handler. The latter handler is invoked when any movie clip loads.