Hey Gustavo,
It looks like your class name is Button. Your constructor is called
"button". Rule of thumb when dealing with classes: all classes are to be
capitalized. Try fixing that and it should work fine :)
Cheers,
- Nick
Gustavo Duenas wrote:
Ok, coder I'm trying to set up a menu using an array as I used to in
flash 8, but this is as3, and I didn't figured out how hard this would
be this is the class for the buttons.as:
I'm trying to wrapped a textfield in order to write in the loop the
strings on the array(I'm quite a newbie...Am I?).
code for the button AS:
package classes.objects
{
import flash.display.SimpleButton;
import flash.text.TextField;
public class Button extends SimpleButton
{
private var _label:TextField = new TextField();
public function button(){
this._label;
}
}
}
but it seems an error in the code like like I have no return value for
the function button (I'm clueless)
and this is the loop in my main as application.
public function buttons():void{
for (var i:uint=0; i<myArray.length; i++){
var myButtons:Button = new Button();
addChild(myButtons[i]);
myButtons.x=100+i;
myButtons.y=0;
}
if one of you could help me out I'd apreciate I have to run faster to
the nearest library and bought a book about flex,
This is my very first AS3 project in flex.
Regards
Gustavo Duenas
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com