A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: AS 2.0 Extending the Error class -- classpath problem?

  1. #1
    Senior Member
    Join Date
    Sep 2000
    Location
    San Francisco
    Posts
    196

    AS 2.0 Extending the Error class -- classpath problem?

    Hi all,
    I'm trying to implement my own custom Error class within a class I wrote called ASImage.

    ASImageException.as:
    Code:
    class ASImageException extends Error {
    	public function ASImageException() {
        	_level2.createTextField(errMsg,101010,Stage.height/2,Stage.width/2,100,50);
      		_level2.errMsg.text = "Error in class :: ASImage \n Target must be of type MovieClip \n ";
    	}
    }
    I'm not sure if I need a constructor for this custom error class, regardless my ASImage class cannot find the ASImageException class( debugger say class ASImageException class cannot be loaded.) I have tried importing the ASImageException from within the ASImage Class but it doesnt help. I have the classpath for the .fla that is implementing the ASImage class set to a directory that contains the ASImage.as and the ASImageException.as file. It finds the ASImage class no problem, but it cannot seem to find the ASImageException class eventhough its in the same directory, I find this strange. I must be missing somthing very simple.

    Any Ideas? I hope that made at least partial sense.
    ~Dev

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Location
    San Francisco
    Posts
    196

    Whoops

    Opps I found the problem. I had a space in my ASImageException class filename. It was ASImageException .as

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center