Quick script help.
- Started
- Last post
- 9 Responses
- nooner
i have a movie clip.
i want it to load a jpg
onClipEvent (load) {
this.holder_mc.loadMovie("hummin...
}the name of the MC is holder_mc
is onClipEvent the wrong handler there?
nooner
- krust0
u know theres a space between the j and the pg
?
- alloyd0
holder_mc.onLoad=function(){};
onClipEvent was pretty much deprecated as of Flash 6...
- alloyd0
oh yeah, attach that code to a frame and not on the mc instance..
- nooner0
thanks!
- VonS0
Make a function out of it and call it with any event you need - like button clicks, onLoad events and so on.
go to the first first frame and enter this:
function loadPic(myMC, pic){
myMC.loadMovie(pic);
}then, whenever you want to load a pic, type this:
loadPic(hoder_mc, "mypic.jpg");
use the function with multiple holder_mcs and multiple pics, if you want.
Hope this helps,
VS
- nooner0
so i just used
_root.holder_mc.loadMovie("hummi...
on the first frame in the timeline.
works fab locally but doesn't online???
anyone? i saved the .jpg out of fireworks.
- VonS0
make sure that hummingbird.jpg and your swf are in the same folder//check your paths ...
- nooner0
they are. ?
- nooner0
_root.holder_mc.load Movie("hummingbird.jpg");
i inserted the complete url and it worked. thanks to all who helped.
later