The problem is probably the <mx:Fade> that you have, we don’t allow faceless components to be declared at any level other than under the root tag.  I would just move your script blocks and the Fade outside the Canvas.

 

You raise an interesting usability issue with how the default Application looks, I know we’ve been looking into that.

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of Jignesh Dodiya
Sent: Friday, November 11, 2005 12: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

 

 





--
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




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to