A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Button vs SimpleButton

  1. #1
    Junior Member
    Join Date
    Dec 2008
    Location
    Swansea, UK
    Posts
    12

    Button vs SimpleButton

    Im following a tutorial code and trying to use same method to create zoom buttons for my imageViewer.

    While trying to import the SimpleButton class, it gives me errors:

    1046: Type was not found or was not a compile-time constant: SimpleButton.
    1180: Call to a possibly undefined method SimpleButton.
    1172: Definition flash.controls:SimpleButton could not be found.1172:

    the source code is:

    private var bZoomIn:SimpleButton;
    private var bZoomOut:SimpleButton;
    bZoomIn = new SimpleButton();
    bZoomOut = new SimpleButton();
    import flash.controls.SimpleButton;


    What could be wrong ?

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    import flash.display.SimpleButton;
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Junior Member
    Join Date
    Dec 2008
    Location
    Swansea, UK
    Posts
    12
    Quote Originally Posted by cancerinform
    import flash.display.SimpleButton;
    Then it gives me errors:

    1119: Access of possibly undefined property label through a reference with static type flash.display:SimpleButton.

    1061: Call to a possibly undefined method move through a reference with static type flash.display:SimpleButton.

    1119: Access of possibly undefined property label through a reference with static type flash.display:SimpleButton.

    1061: Call to a possibly undefined method move through a reference with static type flash.display:SimpleButton.


    With sources:

    bZoomIn.label = "+";
    bZoomIn.move(240,25);
    bZoomOut.label = "-";
    bZoomOut.move(300,25);

  4. #4
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Check the language reference for the SimpleButton class. Bookmark that site. It's the most important site if you develop Flash applications.

    http://help.adobe.com/en_US/AS3LCR/Flash_10.0/

    You cannot use the same methods as for the component button.
    - The right of the People to create Flash movies shall not be infringed. -

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