PDA

View Full Version : Calling Classes


sophali
05-11-2008, 11:25 AM
I'm new to actionscript 3 and am trying to call a class from my main movie. The class is called Slide.as and movie called Slide.fla for some reason it is not working what is the code that I am supposed to put in to call a class? I keep getting "1061: Call to a possibly undefined method next through a reference with static type Slide.

wvxvw
05-11-2008, 11:47 AM
The error message says that you're trying to call non-existing / private / protected method on object of type Slide.
- check the syntax.
- be sure to make the method public.

sophali
05-11-2008, 12:59 PM
Thanks I've got that working now! But (and sorry to be a pain)now when I try and import that fla movie to the main movie I am getting Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

This is the code I have:

startSlidingPuzzleGame("SlidingPuzzle");

function startSlidingPuzzleGame(slidingPuzzleGame:String) {
var gameLoader:Loader = new Loader();
gameLoader.load(new URLRequest("SlidingPuzzle.swf"));
addChild(gameLoader);
}

Any more ideas?

wvxvw
05-11-2008, 02:54 PM
It says URL Not Found, this is what it means... no SlidingPuzzle.swf file in the directory where you're running your flash app.