A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Problem with "Label" class

  1. #1
    A Flurry of Activity
    Join Date
    Aug 2005
    Posts
    103

    Problem with "Label" class

    My code:
    Code:
            mx.accessibility.LabelAccImpl.enableAccessibility();
    	xlabel = new Label();
    	xlabel.text = "x";
    	xlabel.move(100,0,0);
    Does not do anything at all <_<

    The help files in flash MX weren't very helpful.

    Is there anything else I have to do to make my label appear? i'm trying to add the "x" "y" and "z" labels to a graph I've made, but they must dynamically change location with the program. (for testing, I have it at 100)

    Probably a quick fix, and I'll be on my way.
    maximum width 300 no more maximum hieght 40 no more not interchangable

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    Remove this line from the code:
    code:

    xlabel = new Label();


    as this is not how you initialize a component. You do it by placing it on the stage or using createClassObject().

    Just make sure the component is on the stage, and its instance name is xlabel.

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