Error Message
-
mrnothersan
- Posts: 226
- Joined: 24 Jan 2010, 18:38
Error Message
Hello,
When I try and make an object for my room and attach this ActionScript code to it: myContainer.loadMovie("test.swf"); --it comes up with this Compiler Error message: Statement must appear within on/onClipEvent handler.
Could somebody help me with this error?
Thanks
Dominic
When I try and make an object for my room and attach this ActionScript code to it: myContainer.loadMovie("test.swf"); --it comes up with this Compiler Error message: Statement must appear within on/onClipEvent handler.
Could somebody help me with this error?
Thanks
Dominic
Timeline?
This is on the time line no?
Or is it on a movieclip somewhere.?
~Parker
Or is it on a movieclip somewhere.?
~Parker
-
mrnothersan
- Posts: 226
- Joined: 24 Jan 2010, 18:38
-
mrnothersan
- Posts: 226
- Joined: 24 Jan 2010, 18:38
Re: Error Message
Could somebody please answer this?mrnothersan wrote:Hello,
When I try and make an object for my room and attach this ActionScript code to it: myContainer.loadMovie("test.swf"); --it comes up with this Compiler Error message: Statement must appear within on/onClipEvent handler.
Could somebody help me with this error?
Thanks
Dominic
-
mrnothersan
- Posts: 226
- Joined: 24 Jan 2010, 18:38
-
coolboy714cp
- Posts: 323
- Joined: 06 Feb 2010, 02:45
- Contact:
I assume it is in the MovieClip. That error just means you have to put a handler into the coding.
Try this code:
Make sure the files are located in the same exact directory.
~Cool Boy 714
Try this code:
Code: Select all
onClipEvent (load) {
myContainer.loadMovie("test.swf")
}~Cool Boy 714
-
mrnothersan
- Posts: 226
- Joined: 24 Jan 2010, 18:38
-
mrnothersan
- Posts: 226
- Joined: 24 Jan 2010, 18:38
That doesn't workcoolboy714cp wrote:I assume it is in the MovieClip. That error just means you have to put a handler into the coding.
Try this code:
Make sure the files are located in the same exact directory.Code: Select all
onClipEvent (load) { myContainer.loadMovie("test.swf") }
~Cool Boy 714