|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to use onEnterFrame to load a .swf in a movie clip
Hi,
I'm pushing my Flash knowledge and have run into some problems. I have an empty movie clip called container_mc on the first frame of a movie at level 0. I first tried to load a movie into it using a button, with the code on (release) { loadMovie("listeningex1.swf", "_root.container_mc"); } It worked fine. Now I would prefer to have the container_mc load the movie automatically when the main movie opens. I thought I could do it with onEnterFrame, but I'm not sure how to word the code. Can someone help? Thanks. |
|
#2
|
|||
|
|||
|
Hi, you must first select the blank movie clip on stage. Once selected open the actionscript window and enter:
Code:
onClipEvent(load)
{
this.loadMovie("listeningex1.swf");
}
|
|
#3
|
|||
|
|||
|
Quote:
Aha! Thanks a lot. I will try it when I get home from work. ![]() |
|
#4
|
|||
|
|||
|
Well, I selected the movie clip, put the code on it, but I can't get it to work. Any other ideas?
|
|
#5
|
|||
|
|||
|
Hi, ok lets try another approach then :¬) In the first keyframe of container_mc's parent movie, I'm going to assume that's _root for now:
Code:
_root.container_mc.onLoad = function()
{
_root.container_mc.loadMovie("listeningex1.swf");
}
|
|
#6
|
|||
|
|||
|
Oddly enough, that one didn't work, but putting
loadMovie("listeningex1.swf", "_root.container_mc"); in the first frame did. Now to find my next problem ![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > How to use onEnterFrame to load a .swf in a movie clip |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|