|
metadata
When I get to step 11, and try to test the ship velocity movie, it says that my ship should move back and fourth across the screen… This is not happening for me, and several other people in the chat room are having the same problem.
any help would be appreciated.
|
|
|
metadata
“The class or interface ‘Ship’ could not be loaded.” What should I do now?
|
|
|
metadata
check if your class name “name.as” is the same as your object ship
|
|
|
metadata
Ship.as and symbol is Ship
Here are my errors i copied the code exactly from the tutorial any suggestions\>?
1017: The definition of base class MovieClip was not found.
5000: The class ‘Ship’ must subclass ‘flash.display.MovieClip’ since it is linked to a library symbol of that type.
class Ship extends MovieClip
{
var velocity;
function onLoad(){
velocity = 10;
}
function onEnterFrame()
{
\_x = \_x + velocity;
}
}
|
|
|
metadata
nm got it I hadnt properly difined my symbol then had case mismatch in the class Ship
|
|
|
metadata
|
|
|
metadata
> “The class or interface ‘Ship’ could not be loaded.”
That happens to my ship too. Also, the background doesn’t scroll:
“The class ‘Background’ needs to be defined in a file whose relative path is ‘Background.as’.”
Halp?
|
|
|
metadata
You have defined a class “Background”, correct?
Remove the code from where it is currently and put it in its own .as file named “Background.as”.
|
|
|
metadata
I have the same problem my ship just moves across the screen and I cant control it, here is my code:
class Ship extends MovieClip
{
var velocity;
function onLoad()
{
velocity = 10;
}
function onEnterFrame()
{
if( Key.isDown(Key.RIGHT) )
{
\_x = \_x + velocity;
}
if( Key.isDown(Key.LEFT) )
{
\_x = \_x – velocity;
}
if( Key.isDown(Key.UP) )
{
\_y = \_y – velocity;
}
if( Key.isDown(Key.DOWN) )
{
\_y = \_y + velocity;
}
}
}
Please help me!
|
|
|
metadata
You must make sure you place the files in the same directory as the .FLA file.
|
|
|
metadata
To anyone else having this problem, remember, the file/class names ARE case-sensitive. If your Ship is named ‘Ship’ then your file MUST be named ‘Ship.as’
|
|
|
metadata
I found the problem i needed to save it.
|
|
|
metadata
The class or interface ‘Ship’ could not be loaded. this is what it keeps saying i looked at other reply’s none worked. PLEASE HELP ME!!!!!
|
|
|
metadata
Did you name it Ship or ship
AS2 is case sensitive
|
|
|
metadata
WOW you need to save it. Thanks mokira. WTF flash.
|
|
|
metadata
|
|
|
metadata
> *Originally posted by **[IsMiseLisa](/forums/11/topics/23706?page=1#posts-4570207):***
>
> I’m too stupid for this. Also having the same issue. Everything is saved and everything is case sensitive…and I’m still getting this error? FML.
Use [this forum](http://www.kongregate.com/forums/4-programming) and post the relevant code with proper format (read the stickies).
|