0 Replies Latest reply on Jan 6, 2012 8:50 PM by clammyclam

    Why does using class_blahblah as variable name mess up behavior?

    clammyclam

      So if I have a class called "pic" and in the code I have this:

       

             [Embed("i/pic.png")]public var class_pic:Class;

                                         public var bitmap_pic:Bitmap = new class_pic();

       

      And in the pic class I also have a function like this:

       

          public function ok():void{

                //blah

           }

       

      Normally I can make a variable of this class and call the ok function:

       

           var p:pic = new pic();

           p.ok();

       

      But I couldn't and it drove me crazy figuring out why and it ended up because i was using class_pic in the embed part, if i used classss_pic it worked fine, but class_pic wouldn't let me load the function, but it didn't give any errors.  So I guess I learned the lesson not to use class_ in defining a variable but why not? =\