[flexcoders] Setting a chromeColor within a skin?

2011-08-02 Thread lanekelly5
I created a skin that is a copy of the TabBarButtonSkin and I see where there's 
a property set:  useChromeColor = true;

I have some CSS that uses a different chromeColor for the selected tab vs the 
unselected tab and I'm wondering how that value gets integrated into the skin.  
I don't see chrome used anywhere else in that skin file other than that one 
line.  There's no fill or anything that uses the chromeColor.

Since I'm not sure how to access the compound CSS rule (the selected tab's 
chromeColor) from setStyle(), I figured that maybe I would set the chromeColor 
in the skin for the specific states I want.

I guess I should have indicated upfront that I need this chromeColor to change 
at runtime, so I can't hardcode it into the CSS.



[flexcoders] White button label color - disabled state problem

2011-08-02 Thread lanekelly5
For some reason if I make the text of a button white, the alpha.disabled 
property in the SparkSkin container of my custom button skin doesn't behave 
properly.  I can set the alpha.disabled=.99 on the SparkSkin and the white 
text is really hard to read.  I would expect that it would make the disabled 
button look almost exactly like the enabled button (it does if the label text 
is black and not white).  Is there some weird blending mode going on under the 
hood with a label on the button skin?

If I set alpha.disabled=1 on the SparkSkin component of my custom button skin, 
then the disabled and enabled buttons look the same with white text.



[flexcoders] Re: Simultaneous HTTPService limitation?

2011-08-02 Thread georgemeng2011
Thank you! 

Good to know there is such limit.

George

--- In flexcoders@yahoogroups.com, Alex Harui aharui@... wrote:

 I think there is an upper-bound on the number of requests you can make per 
 frame for Flash and maybe for AIR too.
 
 
 On 7/29/11 7:23 PM, georgemeng2011 georgemeng2000@... wrote:
 
 
 
 
 
 
 I have an flex application sends HTTPService multiple times to server, 
 however, not all get return.
 
 My server is Coldfusion, I have turn following in Coldfusion:
 
 Maximum number of simultaneous Template requests  400
 Maximum number of simultaneous Flash Remoting requests  400
 Maximum number of simultaneous Web Service requests  400
 Maximum number of simultaneous CFC function requests  400
 Maximum number of running JRun threads  1600
 Maximum number of queued JRun Threads  1
 
 However, when I send 500 request, I always get about 360 result/fault back, 
 any ideas?
 
 Flex AIR application code:
 
 ?xml version=1.0 encoding=utf-8?
 s:WindowedApplication
 xmlns:fx=http://ns.adobe.com/mxml/2009;
 xmlns:s=library://ns.adobe.com/flex/spark
 xmlns:mx=library://ns.adobe.com/flex/mx
 creationComplete=init()
 width=830
 height=433
 fx:Script
 ![CDATA[
 import mx.rpc.events.FaultEvent;
 import mx.rpc.events.ResultEvent;
 import mx.rpc.http.HTTPService;
 private var _index:int = 0;
 private function init():void
 {
 for ( var i:int = 0; i  500; i++ )
 {
 var ws:HTTPService = new HTTPService();
 ws.useProxy = false;
 ws.url = http://CFServer/Hello.cfm;;
 ws.addEventListener(FaultEvent.FAULT, result );
 ws.addEventListener(ResultEvent.RESULT, result);
 ws.send();
 }
 }
 private function result(e:Event):void
 {
 _index++;
 trace( _index.toString() + e.type );
 }
 ]]
 /fx:Script
 /s:WindowedApplication
 
 Coldfusion Code: Hello.cfm
 
 cfoutputHello World/cfoutput
 
 Thanks!
 
 George
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





[flexcoders] HTTPService timeout?

2011-08-02 Thread georgemeng2011

Hello,

I have very simple code to call a simple PHP page. PHP page will insret
2000 records to mysql table, takes about 2 minutes.

On PHP side, it is fine, I tested the php page within browser, it ran
for 2 minutes and stoped. (I have configured on PHP to run longer than
normal.)

One Flex side, I call PHP page using HTTPService with requestTimeout =
300 to avoid timeout. Here is the code:

 var ws:HTTPService = new HTTPService();
 ws.requestTimeout = 300;
 ws.useProxy = false;
 ws.url = http://localhost:85/test.php
http://localhost:85/test.php ;
 ws.addEventListener(FaultEvent.FAULT, fault );
 ws.addEventListener(ResultEvent.RESULT, result);
 ws.send();

However, after 30 seconds, it return fault event. I really don't
understand.

Can anyone let me know how I do this correctly?

Thank you!

George







[flexcoders] mx:Datagrid nowto detect drop column

2011-08-02 Thread bu4fred
I would like to move cell contents around in a datagrid (or AdvancedDatagrid if 
necessar) but so far all I can do is detect the row of the drop target.

II need to get both the row and column index of the source and destination of 
the drag-n-drop action.

Any suggestions please???



[flexcoders] Flex View States

2011-08-02 Thread nikunj_n123
Hello All,

My Application has a Tree, and all the elements of the tree belong to the same 
state.
I want a new form to be launched each time I click an item of the tree.
But since all the items belong to the same state, my forms are never recreated.

P.S - I have to use states because there are other views in my application 
besides the tree.


And help/pointers are much appreciated.

Thanks and Regards



Re:[flexcoders] mx:Datagrid nowto detect drop column

2011-08-02 Thread j2me_soul
I finish my job like yours to calculate the mouse point belongs to which cell 
using RowHeigh CellWidth then operate the dataPrivoder to do anything


At 2011-08-02 23:02:08,bu4fred fred.se...@adventistcare.org wrote:
 

I would like to move cell contents around in a datagrid (or AdvancedDatagrid if 
necessar) but so far all I can do is detect the row of the drop target.

II need to get both the row and column index of the source and destination of 
the drag-n-drop action.

Any suggestions please???





Re: [flexcoders] HTTPService timeout?

2011-08-02 Thread Rishi Tandon
Have you check the network monitor in flash builder 4?

Sent from my iPhone

On Aug 2, 2011, at 5:16 PM, georgemeng2011 georgemeng2...@gmail.com wrote:

 Hello,
 
 I have very simple code to call a simple PHP page. PHP page will insret 2000 
 records to mysql table, takes about 2 minutes.
 
 On PHP side, it is fine, I tested the php page within browser, it ran for 2 
 minutes and stoped. (I have configured on PHP to run longer than normal.)
 
 One Flex side, I call PHP page using HTTPService with requestTimeout = 300 to 
 avoid timeout. Here is the code:
 
 var ws:HTTPService = new HTTPService();
 ws.requestTimeout = 300;
 ws.useProxy = false;
 ws.url = http://localhost:85/test.php;;
 ws.addEventListener(FaultEvent.FAULT, fault );
 ws.addEventListener(ResultEvent.RESULT, result);
 ws.send();
 
 However, after 30 seconds, it return fault event. I really don't understand.
 
 Can anyone let me know how I do this correctly?
 
 Thank you!
 
 George
 
  
 
  
 
 


[flexcoders] Flash Builder, The user operation is waiting for background work to complete

2011-08-02 Thread dorkie dork from dorktown
Occasionally something happens to Flash Builder where everytime I save I get
the dialog,
The user operation is waiting for background work to complete. I've tried
restarting and it doesn't seem to make a difference.
Usually I end up closing all the editors and all the projects, cleaning them
and restarting FB and restarting the OS and usually one of those things
works and sometimes none of them work. I have 8GB of memory and a 2011 mac.

Is there a way to turn this message off or determine what's causing it?


Re: [flexcoders] White button label color - disabled state problem

2011-08-02 Thread Alex Harui
Are you using embedded fonts?  I don’t remember if Spark controls need embedded 
fonts for alpha to work correctly.


On 8/2/11 12:44 PM, lanekelly5 lkel...@gmail.com wrote:






For some reason if I make the text of a button white, the alpha.disabled 
property in the SparkSkin container of my custom button skin doesn't behave 
properly.  I can set the alpha.disabled=.99 on the SparkSkin and the white 
text is really hard to read.  I would expect that it would make the disabled 
button look almost exactly like the enabled button (it does if the label text 
is black and not white).  Is there some weird blending mode going on under the 
hood with a label on the button skin?

If I set alpha.disabled=1 on the SparkSkin component of my custom button skin, 
then the disabled and enabled buttons look the same with white text.






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui