Re: [flexcoders] Re: Can someone rewrite this...

2010-04-16 Thread Joe Cabezas
Gordon: that solution (the age switch) is what i proposed before, in the fisrt reply, :D PD: Adobe Flex SDK Team?, wow!, nice work adobe! :D 2010/4/16 Gordon Smith > > > If age were an int rather than a Number (which it probably should be) > then you could use a switch: > > > > switch (age) >

Re: [flexcoders] Re: Reuse a LabelFunction

2010-04-16 Thread Alex Harui
Amy is saying you could write your function like this: private function labelFunctionTest( itm:Object, col:DataGridColumn) :String { return df.format(itm[col.dataField]); } Which is correct and probably the easiest way to go. If you want to subclass you would do something like this: publi

[flexcoders] Re: Reuse a LabelFunction

2010-04-16 Thread Amy
--- In flexcoders@yahoogroups.com, Angelo Anolin wrote: > > Hi Amy, > > But as you can see in the function, I am specifying the Datafieldname from > the object which was passed. > > How can I make it more generic so that I can re-use it in other datagrid > columns?  I hope you could provide

[flexcoders] Re: MXML Component Call Event in Parent

2010-04-16 Thread Amy
--- In flexcoders@yahoogroups.com, "valdhor" wrote: > > By doing it with the click event on the child you are tight coupling the > child to the parent. > > By using the bubbling event you are loose coupling and free to use the > component anywhere. > > If you are comfortable with tight coupl

RE: [flexcoders] Re: Can someone rewrite this...

2010-04-16 Thread Gordon Smith
If age were an int rather than a Number (which it probably should be) then you could use a switch: switch (age) { case 0: case 1: case 2: return 1; case 3: case 4: case 5: return 2; case 6: case 7: case 8: return 3; case 9: case 10: case 11: case 12: return 4; case 13: case 14: ca

[flexcoders] ColumnChart label issues inside Module

2010-04-16 Thread BillF
Hello, I am having a weird issue when trying to display a chart inside a Module. The horizontal and vertical axis labels do not show up. However, the exact same chart, when displayed inside a standalone Application, displays the labels correctly. Has anyone run into this? Can anyone point

Re: [flexcoders] Re: MXML Component Call Event in Parent

2010-04-16 Thread Angelo Anolin
Valdhor, This gets more interesting and pardon me for my lack of knowledge but I feel a bit blurred at what you are saying here. Isn't it that the component is already embedded into the parent, and thus, the Click event should be coupled with the embedded component? You mentioned that by loose

Re: [flexcoders] Re: Reuse a LabelFunction

2010-04-16 Thread Angelo Anolin
Hi Alex, Appreciate if you could show a little example. Thanks. Angelo From: Alex Harui To: "flexcoders@yahoogroups.com" Sent: Fri, 16 April, 2010 12:29:57 Subject: Re: [flexcoders] Re: Reuse a LabelFunction   If it were me, I would subclass DataGridColum

Re: [flexcoders] Re: Charts - complex label

2010-04-16 Thread thomas parquier
I de-activated canStagger and auto-rotation... but I remember fonts had to be embedded to get thoses features... but not to get them showing up, sorry. I will quickly set up a sample chart with custom labelrenderer. Did you trace String(data.text) ? --- thomas parquier http://www.web-attitude.fr/r

Re: [flexcoders] How to load a file from a relative path with Air 2.0

2010-04-16 Thread thomas parquier
Couldn't you set File url property from UrlRequest url property ? --- thomas parquier http://www.web-attitude.fr/realisations/ msn : thomas.parqu...@web-attitude.fr softphone : sip:webattit...@ekiga.net téléphone portable : +33601 822 056 2010/4/16 Davis Ford > > > Hi Thomas, yes, I get that,

[flexcoders] Rsl module inheritance and metadata missing

2010-04-16 Thread peter.motzfeldt
Hi, I have a small problem with custom metadata in my Flex project. Our problem is that the custom metadata is not being read correct by the flash.utils.describeType. We have a parent class and multiple child classes, as shown below. We have the mediate metadata in the parent class to avoid dubli

RE: [flexcoders] Re: Uploading An Image Without Browse

2010-04-16 Thread Battershall, Jeff
James, Using RemoteObject I've uploaded bitmap snapshots without previously saving the bytes to disk, using CF as a backend. Not exactly sure how you'd do this with PHP, but I'm sure it's doable. You'd probably have to use some version of AMFPHP. Jeff -Original Message- From: flexco

[flexcoders] Re: Uploading An Image Without Browse

2010-04-16 Thread James
Cheers Jeff. I'm sure that'd work too. I've found a way around it and can now allow users to upload without the browse. The problem is though I now want it to upload the file without it having to save it on the user's machine first. At the moment my code snapshots the html component, saves this

Re: [flexcoders] DataGrid vs List ?

2010-04-16 Thread Alex Harui
DG has headers and stuff so it is heavier and slower. On 4/16/10 8:56 AM, "Angelo Anolin" wrote: Nick, Just my thought. I believe rendering datagrid is much slower than a list even if it is only for a single column. Angelo From: Nick Middleweek To:

Re: [flexcoders] Re: Reuse a LabelFunction

2010-04-16 Thread Alex Harui
If it were me, I would subclass DataGridColumn and add the labelfunction to the subclass. Then it has the DGC’s context like dataField to work with. On 4/16/10 7:40 AM, "valdhor" wrote: If it were me, I would use an item renderer. --- In flexcoders@yahoogroups.com

Re: [flexcoders] swf information.

2010-04-16 Thread Alex Harui
You can get the frameCount from the swfLoader.content if it is a movieClip. The framerate I believe is dictated by the loading SWF. What you can’t know is how it will take because if it has any logic in it, it might double back on itself and take “forever”. On 4/16/10 9:55 AM, "Robert VanCur

[flexcoders] Re: flex as3 programming pdf

2010-04-16 Thread Monette
http://livedocs.adobe.com/flex/3/progAS_flex3.pdf --- In flexcoders@yahoogroups.com, "ew6014" wrote: > > hi guys > > does anyone know where to get the updated version of PROGRAMMING ACTIONSCRIPT > 3.0 FOR FLEX pdf? the latest version i have is 2009. > > does anyone know where to get latest?

[flexcoders] Re: LineSeries Question

2010-04-16 Thread Monette
What I am trying to do is change the color of the datapoint based on a value. This works fine when I hard code a series index. When defining the series I use: series.setStyle("itemRenderer", new ClassFactory(AlertColorRenderer)); to define the color of the datapoints. However, since the series

RE: [flexcoders] Re: Uploading An Image Without Browse

2010-04-16 Thread Battershall, Jeff
Using the FileSystem API and ByteArray you can save/read/upload images automatically, using your middleware of choice without the user having to browse and select the image. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of James

[flexcoders] Re: MXML Component Call Event in Parent

2010-04-16 Thread valdhor
By doing it with the click event on the child you are tight coupling the child to the parent. By using the bubbling event you are loose coupling and free to use the component anywhere. If you are comfortable with tight coupling, by all means use it. My own preference is to use loose coupling a

Re: [flexcoders] swf information.

2010-04-16 Thread Robert VanCuren Jr
You can parse this information from the swf file it self when you load it. I did this once and it was pretty easy. I needed to know the version and frame rate so my flex app could slow down to display as2 swfs. Anyways if you dont want to write it your self there are several libraries. Here is a l

[flexcoders] Re: LineSeries Question

2010-04-16 Thread pullzmag
Do you want to retrieve this id based on the value of that lineseriesitem? If so, then I think this is not a good approach since sometimes you may have two or more lineseriesitems with the same value and therefore you will not be able to get the one you are looking for. --- In flexcoders@yahoog

[flexcoders] LineSeries Question

2010-04-16 Thread Monette
I have the value of the lineseriesitem, it was passed to a class. I would like to retrieve the lineseries id or index that the item came from? Is it possible to get that info from the lineseriesitem? Thanks. MM

Re: [flexcoders] DataGrid vs List ?

2010-04-16 Thread Angelo Anolin
Nick, Just my thought. I believe rendering datagrid is much slower than a list even if it is only for a single column. Angelo   From: Nick Middleweek To: flexcoders@yahoogroups.com Sent: Fri, 16 April, 2010 9:49:03 Subject: [flexcoders] DataGrid vs List ?

Re: [flexcoders] Re: MXML Component Call Event in Parent

2010-04-16 Thread Angelo Anolin
Valdhor, Wouldn't it be enough to set the click event on the appButtonComponent's MXML declaration, like: click="myButtonComp onent_Click( event)" I think I am missing a point here but could you please elaborate further why you would do so in your example? Thanks a lot. Angelo ___

[flexcoders] swf information.

2010-04-16 Thread markflex2007
Hi, I have a problem and need fix ,I need help. I use swfloader load swf file and I need to know how long the swf will play ,how many frames it have and frame rate. Please give me a idea ,Thanks for help Mark S

[flexcoders] Re: MXML Component Call Event in Parent

2010-04-16 Thread valdhor
I would still be inclined to set an event listener in the parent... http://www.adobe.com/2006/mxml"; xmlns:appButtonComponent="*" layout="vertical" initialize="init();" verticalScrollPolicy="off" horizontalAlign="left"> --- In flexcoders@yah

[flexcoders] DataGrid vs List ?

2010-04-16 Thread Nick Middleweek
Hi, Just curious... But why would you use a List control when you can use a DataGrid with one Column? Are there benefits over specifically using a List? It seems that a DG is a List but supports multiple columns... Thanks, Nick

[flexcoders] Re: Reuse a LabelFunction

2010-04-16 Thread valdhor
If it were me, I would use an item renderer. --- In flexcoders@yahoogroups.com, Angelo Anolin wrote: > > Hi Amy, > > But as you can see in the function, I am specifying the Datafieldname from > the object which was passed. > > How can I make it more generic so that I can re-use it in other dat

Re: [flexcoders] How to load a file from a relative path with Air 2.0

2010-04-16 Thread Davis Ford
Hi Thomas, yes, I get that, but this isn't a deployed application...this is running a FlexUnit4Runner that tests methods in various As3/M2MXML classes running inside the project. I don't want to install the app to run unit tests, and I don't want to have to have my test data deployed in a director

Re: [flexcoders] Re: Reuse a LabelFunction

2010-04-16 Thread Angelo Anolin
Hi Amy, But as you can see in the function, I am specifying the Datafieldname from the object which was passed. How can I make it more generic so that I can re-use it in other datagrid columns?  I hope you could provide some samples. thanks. Angelo From: Am

Re: [flexcoders] Re: MXML Component Call Event in Parent

2010-04-16 Thread Angelo Anolin
Hi Valdhor, Thanks for the advice. I have created a sample button component and a parent component to implement this. Parent.mxml http://www.adobe.com/2006/mxml"; xmlns:appButtonComponent="*" layout="vertical" initialize="init();" verticalScrollPolicy="off" horizontalAlign=

[flexcoders] Re: EPUB reader in Flex

2010-04-16 Thread zdenekmikan
Thank you very much, this link seems to be useful. Zdenek M --- In flexcoders@yahoogroups.com, "valdhor" wrote: > > This may or may not help (As I understand it, it needs Flash Builder 4) > > http://opl.rit.edu/projects/page2pub/download > > --- In flexcoders@yahoogroups.com, Zdenek Mikan wro

Re: [flexcoders] How to load a file from a relative path with Air 2.0

2010-04-16 Thread thomas parquier
An installed AIR app is not supposed to reside in bin-debug. You can use File.applicationStorageDirectory, File.desktopDirectory, File.documentsDirectory... with resolvePath(). thomas parquier --- http://www.web-attitude.fr/realisations/ msn : thomas.parqu...@web-attitude.fr softphone : sip:webatt

[flexcoders] Re: Charts - complex label

2010-04-16 Thread pullzmag
Thomas, did you have a chance to look at that project? Thanks --- In flexcoders@yahoogroups.com, thomas parquier wrote: > > There's an issue with canStagger, rotation and fonts of labels along an > axisrenderer. > I look back at a previous work. > > --- > thomas parquier > http://www.web-attitu