You need to move the <mx:Fade> outside of the canvas.
It's a nonvisual component, so it shouldn't be a child of the Canvas
component.
Phil
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jignesh Dodiya
Sent: Friday, November 11, 2005 3:44 PM
To: [email protected]
Subject: Re: [flexcoders] regarding Canvas container in flex-2
thanx phil.......
itz simple code..............
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml " xmlns="*"> <mx:Script><![CDATA[
private function text1()
{
text2.text = "hellow this is Jignesh";
}
]]>
</mx:Script>
<mx:Button id="m_btn" label="button" click="text1();" />
<mx:TextArea id="text2" borderThickness="5" effectStart="true " alpha="50" backgroundColor="#00ff00" text="this text going to be clear" />
<mx:Fade id="myFade" duration="15000" />
<mx:Image source="m_photo.jpg" creationCompleteEffect="{myFade}" />
</mx:Application>
works fine but if i use (or as per default in flex-2 alfa-1)<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns=" *"><mx:Canvas width="100%" height="100%" >
<mx:Script><![CDATA[
private function text1(){
text2.text =
"hellow this is Jignesh";}
]]>
</mx:Script> <mx:Button id="m_btn" label="button " click="text1();" /> <mx:TextArea id="text2" borderThickness=" 5" effectStart="true" alpha="50" backgroundColor=" #00ff00" text="this text going to be clear"/> <mx:Fade id="myFade" duration="15000 " /> <mx:Image source="m_photo.jpg" creationCompleteEffect=" {myFade}" /></mx:Canvas>
</mx:Application>
it gives error as "COMPONENT DECLARATION ARE NOT ALLOWED HERE"
thats why i m confused............
On 11/12/05, Philip
Costa <[EMAIL PROTECTED]> wrote:
What code are you writing in the canvas tags?Phil
From: [email protected] [mailto: [email protected]] On Behalf Of Jignesh Dodiya
Sent: Friday, November 11, 2005 3:20 PM
To: [email protected]
Subject: [flexcoders] regarding Canvas container in flex-2
--hi...i m having one silly question but important....when i write my code within <mx:Canvas ..... </mx:Canvas>i get the error "COMPONENT DECLARATION ARE NOT ALLOWED HERE"if i remove Canvas container it works fine..and by default in Flex-2 alfa-1 we get<mx:Application><mx:Canvas>....code ..... </mx:Canvas></mx:Application>so i m bit confused.....anybody else did experience such problem???
--
jignesh dodiya
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
jignesh dodiya
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

