I am trying to create a textfield when you click inside a canvas at
the x and y coordinates and it continues not to work.  My
understanding is that the canvas extends movieclip so I could add a
textfield to it.  It would help to possibly get a better understanding
of how this all works.

Here is my code:

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";>

<mx:Script>
<![CDATA[
function onMouseDownEvent()
{
var point = {x:mouseX, y:mouseY};
canvasText.createTextField("mytext",0,point.x,point.y, 40, 40,
{text:'this is a test'});
};


]]>
</mx:Script>

<mx:Canvas id="canvasText" mouseDown="onMouseDownEvent();" width="300"
height="300"/>
</mx:Application>

I also cannot define properties when the app starts for instance
canvasText.mytext.border can not be defined in the function.  I
modified this slightly and it work well in flash.  Please help.  Thanks.





 
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/
 



Reply via email to