Missing namespace in your <mx:Application> tag. Try:
<mx:Application creationComplete="drawer()" xmlns:mx="
http://www.adobe.com/2006/mxml" >
Name spacing the mx: prefix of the Flex components is required in every
<mx:Application> tag (and top level tag in all Flex components). Flex
Builder 2 automatically includes the mx: namespacing in every MXML file it
creates.
Adrian is right that future Flex questions should be posted to the
flexcoders list.
hth,
g
On 9/18/06, Caruso Canepari <[EMAIL PROTECTED]> wrote:
Hi, I get this error:
The prefix "mx" for element "mx:Application" is not bound."
The code is this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application creationComplete="drawer()">
<mx:Script>
<![CDATA[
import flash.display.*;
import flash.events.*;
public function drawer():void{
var mySprite:Sprite = new Sprite();
mySprite.graphics.beginFill(0xffcc00);
mySprite.graphics.drawCircle(30,30,30);
var lab:TextField = new TextField();
lab.text = "hello";
lab.x = 300;
lab.y = 300;
mySprite.addChild(lab);
addChild(mySprite);
}
]]>
</mx:Script>
</mx:Application>
Bjorn Schultheiss <[EMAIL PROTECTED]> ha scritto:
Use the onCreationComplete event
For example
onCreationComplete="drawer()">
__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto
spazio gratuito per i tuoi file e i messaggi
http://mail.yahoo.it
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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