On Apr 7, 2005 6:18 AM, kredding.geo <[EMAIL PROTECTED]> wrote:
> I am trying to use an example from the Flex Help to setup listeners
> for buttons. I cannot figure out how to get this code to work. If I
> just use the AS code, I get "cannot find this method" errors. If I
[snip]
First, declare some variables:
var clear_button:mx.controls.Button;
var stopDrawing_button:mx.controls.Button;
var startDrawing_button:mx.controls.Button;
var canvas_mc:MovieClip;
Next, you need to take the return value of createClassObject. For example,
clear_button = mx.controls.Button(
this.createClassObject(mx.controls.Button, "clear_button",
this.getNextHighestDepth(), {_x:10, _y:10, label:'clear'}));
The cast to Button is required.
After doing this your code compiles and runs but nothing shows up. :)
You can figure out that part (I wouldn't know what exactly you're
trying to do).
Manish
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/