Re: [SPAM] [flexcoders] How to call a Actionscript function in a UI child from UI father ?

2009-10-20 Thread Alen Balja
Also you would want to make all functions public that are to be accessed by
outside objects. I see you marked getFileSize as private.

On Thu, Oct 15, 2009 at 10:11 AM, Tracy Spratt tr...@nts3rd.com wrote:



  Don’t use binding braces in actionscript (the event handler declaration
 is actionscript)



 Try:

 click=getFileSize(data.filesize)



 That assumes the data object is created and has that property.



 Tracy Spratt,

 Lariat Services, development services available
   --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *polo_enzo
 *Sent:* Wednesday, October 14, 2009 2:11 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [SPAM] [flexcoders] How to call a Actionscript function in a UI
 child from UI father ?






 when I try to call the getFileSize with the param: {data.filesize}, it does
 not work ? I am quite new in Flex Technology... Can somebody tell me what is
 wrong ?

 --- FlickrRIA.mxml
 mx:Script
 ![CDATA[

 private function getFileSize(filesize:String):void {
 imageText.text = filesize;
 }

 ]]
 /mx:Script

 --- FlickrThumbnail.mxml
 mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
 width=125 height=125
 horizontalAlign=center
 horizontalScrollPolicy=off verticalScrollPolicy=off
 paddingBottom=5 paddingLeft=5 paddingRight=5 paddingTop=5



 mx:Image
 width=75 height=75
 source={data.thumbnail.url}
 click=getFileSize({data.filesize})/
 mx:Text
 id=imageText
 text={data.credit} /

 /mx:VBox

 thx,
   



RE: [SPAM] [flexcoders] How to call a Actionscript function in a UI child from UI father ?

2009-10-14 Thread Tracy Spratt
Don't use binding braces in actionscript (the event handler declaration is
actionscript)

 

Try:

click=getFileSize(data.filesize)

 

That assumes the data object is created and has that property.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of polo_enzo
Sent: Wednesday, October 14, 2009 2:11 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] How to call a Actionscript function in a UI
child from UI father ?

 

  


when I try to call the getFileSize with the param: {data.filesize}, it does
not work ? I am quite new in Flex Technology... Can somebody tell me what is
wrong ?

--- FlickrRIA.mxml
mx:Script
![CDATA[

private function getFileSize(filesize:String):void {
imageText.text = filesize;
} 

]]
/mx:Script 

--- FlickrThumbnail.mxml
mx:VBox xmlns:mx=http://www.adobe. http://www.adobe.com/2006/mxml
com/2006/mxml 
width=125 height=125
horizontalAlign=center
horizontalScrollPolicy=off verticalScrollPolicy=off
paddingBottom=5 paddingLeft=5 paddingRight=5 paddingTop=5



mx:Image 
width=75 height=75
source={data.thumbnail.url} 
click=getFileSize({data.filesize})/
mx:Text 
id=imageText 
text={data.credit} /

/mx:VBox

thx,