Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OnClipEvent???

Status
Not open for further replies.

mike314

Programmer
Jun 24, 2003
143
US
Got a quick one here. I got a jpeg I want to open when the Clip Event

here is what I got:

onClipEvent (enterframe) {
loadMovieNum("URL", 0); //url is actually a path
}

I have this inside the movieClip but it doesn't work. Is there a way to
do this for onEnterFrame???
 
I keep getting this error

**Error** Symbol=Symbol 01, layer=Layer 1, frame=1:Line 1: Clip events are permitted only for movie clip instances
onClipEvent (enterframe) {
 
forgot to mention, I have that above code in both the movieclip and the instance of that movieclip that is on the stage, but I didn't give that instance a name.

i'm lost!!!!!!!!!!
 
ok here is a better explanation, I just want to load a jpeg into a plain movieclip. Now what I mean by plain movieclip is a movieclip that once you create it by doing Insert --> New Symbol, so now its in the library,

drag it onto the stage and inside that instance I put that onClipEvent code. I just want a jpeg to load in that movieclip when you enterframe 1.

thanks!
 
Sounds like you have placed the code [bold]inside[/bold] of your movie clip. If it is inside the movieclip it should just be:

Code:
loadMovieNum("URL", 0);
stop(); // needed if the movieclip is looping.

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
I actually have it in two places, inside the movieclip when you create it and an instance that is on the stage.

I just want to load a jpg when you enter frame 1.

onEnterFrame doesn't work

function sampler(){
loadMovieNum("URL", 0);
}

instancename.onEnterFrame = sampler();


I tried the stop and it doesn't work, its not that its the fact when I only have the code in the instance flash doesn't find errors but when I test it nothing is there.

wierd???

if there is another way around it please let me know

thanks all help is much appreciated
 
On the clip itself, not within it...

onClipEvent (load) {
loadMovieNum("URL", 0); //url is actually a path
}

But this will load the .jpg on level 0, replacing your main movie... Guess that's not what you want!

Try...

onClipEvent (load) {
this.loadMovie("URL"); //url is actually a path
}

Also make sure the .jpg is not progressive, and that all the files (including the initial .html) are all in the same folder.



Regards. Affiliate Program - Web Hosting - Web Design
After 25,000 posts, banned on FK, but proud not to have bowed down to them!
 
thanks guys for your help,

I'm such an idiot, the url path I was using had a bad image, so I took out the code from inside the movieclip and left the code in the instance and used a valid image and it worked fine.

onClipEvent (enterframe) {
loadMovieNum("URL", 0); //url is actually a path
}


thanks
I am stupid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top