actionscript 3 - AS3 Error Call to a possibly undefined method for Underline Function -


i have problem as3. want call underline() method (movie clip class) in code there error.

here error: 1180: call possibly undefined method underline.

here code:

import flash.display.*; import flash.events.*; import flash.text.*; import flash.filesystem.*; import flash.data.*; import flash.errors.*; import flash.utils.timer;    var underline:movieclip = new underline(); underline.x = temptext.x + temptext.width / 3; underline.y = temptext.y + temptext.height / 2 + 5; textcontainer.addchild(underline); 

this code works on as2 doesn't work on as3 solution?? please help, problem drive me crazy"

as goldroger said, underline here class, , must inherit movieclip class (extend). also, when creating new class, there must constructor function exact same name class.

example:

public class underline extends movieclip {     public function underline()     {         //constructor code, initialize here     } } 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -