HelpMissing flash libs?

Posts 18 of 8 · Page 1 of 1
Missing flash libs?
While trying to compile an unmodified version of the game I encountered a problem. I got several errors that I have filtered through and saw the common trend that all of them are in classes that extend Sprite which should be defined in "import flash.display.Sprite;". I can't seem to think of a reason for it to be unable to import these and have searched for a couple hours without finding anything helpful.

Example of a few of the errors (they all follow this pattern):

Error:(47, 59) [WebMain]: Error code: 1061: Call to a possibly undefined method makeLock through a reference with static type Class.
Error:(48, 81) [WebMain]: Error code: 1061: Call to a possibly undefined method makeLockText through a reference with static type Class.
Error:(49, 73) [WebMain]: Error code: 1061: Call to a possibly undefined method makeBuyButtonContainer through a reference with static type Class.
Error:(50, 88) [WebMain]: Error code: 1061: Call to a possibly undefined method makeLimitedBanner through a reference with static type Class.

A snipit of source where the error is occurring (with the red being the error):

public class Animation extends Sprite
{
private const DEFAULT_SPEED:int = 200;
private const bitmap:Bitmap = Animation.makeBitmap();
private const frames:Vector.<BitmapData> = new Vector.<BitmapData>(0);
private const timer:Timer = Animation.makeTimer();

If I am incorrect in anything I have said or you need any more information please let me know!
You're trying to call a non-static function as if it was static. Remove the 'Animation.' part and you should be good to go.

Code:
public class Animation extends Sprite
{
    private const DEFAULT_SPEED:int = 200;
    private const bitmap:Bitmap = makeBitmap();
    private const frames:Vector.<BitmapData> = new Vector.<BitmapData>(0);
    private const timer:Timer = makeTimer();
I seem to have overlooked three errors that are different than the rest. You being the all mighty AS overlord that you are, can you tell me what's wrong with this?

68: import StarBackground.as$923:Star.sqCommands;

86: protected var path_:GraphicsPath = new flash.display.GraphicsPath(StarBackground.as$923:S tar.sqCommands, new Vector.<Number>());

Error:(68, 29) [WebMain]: Error code: 1086: Syntax error: expecting semicolon before colon.
Error:(86, 92) [WebMain]: Error code: 1084: Syntax error: expecting rightparen before colon.
Error:(86, 131) [WebMain]: Error code: 1086: Syntax error: expecting semicolon before rightparen.

Also has this import

import StarBackground.as$923:Star.sqCommands;

This file is StarBackground.as
As of today I just commented out the three lines of errors in StatBackground.as because it didn't seem like it was being used in much of anything. After this it compiled fine but the screen is black. I've tried at this for almost a week now and I just don't think it's something I'll be able to do without seeing someone do it.
Quote Originally Posted by MunAndSun View Post
After this it compiled fine but the screen is black.
This means flash is running into some issue preventing it from loading the game properly. Use a debug projector to find the issue. FlashDevelop (as well as other IDEs, probably) can be linked to the debug projector. What this does is allows the IDE to point you the exact line causing the error.
I am using the debug builder in IntelliJ IDEA and it compiles fine with no errors but will hand at a black screen. I might not be understanding what you are saying completely, but I think I am doing what you said to do.
Quote Originally Posted by MunAndSun View Post
I am using the debug builder in IntelliJ IDEA and it compiles fine with no errors but will hand at a black screen. I might not be understanding what you are saying completely, but I think I am doing what you said to do.
Have you tried opening it through a flash debugger?
Quote Originally Posted by MunAndSun View Post
I am using the debug builder in IntelliJ IDEA and it compiles fine with no errors but will hand at a black screen. I might not be understanding what you are saying completely, but I think I am doing what you said to do.
The blackscreen is caused by a runtime error. You need to run it in debug projector. The compile action (Debug/Release) is irrelevant.
Posts 18 of 8 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?