Hey all,
I have extended a RadioButton into a custom class in order to store some extra info. I want to dynamically add these RadioButtons to the stage to create a dynamic menu box. So I started simple in order to make sure I knew how to do this.
Here's the error (I love Flash IDE error reporting):
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at fl.controls::RadioButton/drawLayout()
at fl.controls::LabelButton/draw()
at fl.controls::RadioButton/draw()
at fl.core::UIComponent/callLaterDispatcher()
Here's the code:
MuscleMenuRadioButton class
PHP Code:
package com.gs.muscleman
{
import flash.display.MovieClip;
import fl.controls.RadioButton;
import flash.events.Event;
public dynamic class MuscleMenuRadioButton extends RadioButton{
private var findingNumber:String = new String();
public function MuscleMenuRadioButton(_labeler:String, _findingNumber:String){
super();
this.label = _labeler;
this.findingNumber = _findingNumber;
}
public function getFindingNumber():String{
return this.findingNumber;
}
}
}
And my actionscript on first frame of movie:
PHP Code:
import com.gs.muscleman.MuscleMenuRadioButton;
var Abutton:MuscleMenuRadioButton = new MuscleMenuRadioButton("A Button","F-34939");
stage.addChild(Abutton);
Abutton.x = 50;
Abutton.y = 100;
Does anyone see what is going on here? Any help would be greatly appreciated.
Thanks in advance,
Wrathgrapes