Pup_100
September 16, 2004, 5:39am
1
[font=Times New Roman]Is it possible to use the [color=blue]“onClipEvent (load)”[/color] event to load movies at run time?[/font]
[font=Times New Roman] [/font]
[font=Times New Roman]I have the following code on a clip instance, but it will not load the required movie.[/font]
[font=Times New Roman] [/font]
[font=Times New Roman][color=blue]onClipEvent (load) {loadMovie(“go2H.swf”,_root.phil);[/color][/font]
[font=Times New Roman][color=blue]}[/color][/font]
[font=Times New Roman] [/font]
[font=Times New Roman]"go2H.swf” is in the same local directory as the host movie.[/font]
[font=Times New Roman] [/font]
[font=Times New Roman]Thank you for any help.[/font]
[font=Times New Roman] [/font]
system
September 16, 2004, 6:36am
2
Try out this instead of add code directly apply on MC. Add this code to first frame of the movie
//myclip movieclip acts as the event trigger
//_root.holder is the target movieclip
_root.myclip.onLoad = function (){
loadMovie(“mymovie.swf”,_root.holder);
}
system
September 16, 2004, 9:11am
3
No Joy with that I’m afraid abhilashkk, but I did get what I wanted with this code;
[color=blue]_root.onLoad = function (){
loadMovie(“go2H.swf”,_root.phil);
}[/color]
[color=#0000ff][/color]
[color=black]Anyone any idea why this would not work when placed directly on the clip instance?[/color]
system
September 16, 2004, 9:47am
4
Ok…make a change in your code like this… actually my intentions were not bad… :x
onClipEvent (load) {
_root.phil.loadMovie("go2H.swf");
}
system
September 16, 2004, 10:04am
5
Thank you for your help sir, I will give that a go.
system
September 16, 2004, 1:04pm
6
why not just use the loadmovie action in the frame at which you want the movie to load? So just put loadmovie (,) whereever you want on the timeline and it’ll open it up. Just curious why you need all this extra code?
system
September 16, 2004, 1:31pm
7
I was just trying a few things out in MX byersj21. You are right a script in the frame would have worked the same.
system
September 16, 2004, 4:14pm
8
ah… ok… just curious… didn’t know if you were doing something different that would work better or what. Always good to try new things anywayz…