A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [F8] Instance Reference from within a custom class

Threaded View

  1. #1
    http://pat.theorigin.net cresquin's Avatar
    Join Date
    Jun 2003
    Location
    Los Angeles, CA
    Posts
    685

    [RESOLVED] Instance Reference from within a custom class

    I created a custom class, ThisTest:
    Code:
    class ThisTest{
    	function ThisTest(){
    		trace("This: " + this); 
    	}
    }
    and put the following code on the frame of a new fla.

    Code:
    import ThisTest;
    anInstance = new ThisTest();
    the output window shows:
    Code:
    This: [object Object]
    instead of what I expected:
    Code:
    This: anInstance
    Duh, generic objects return Object to normal this calls...

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