[flexcoders] Re: dynamic dimension of the page

2009-07-01 Thread anitha2324
Hi thanks alot , 

It is a great , i have found a great information in your reply as well as in 
the link , i have downloaded the examples and i have tested them. that is what 
i was looking for ...



Thank.




















--- In flexcoders@yahoogroups.com, danapayne dana.pa...@... wrote:

 You have to add a constraintcolumns and/or constraintrows block and then 
 identify individual constraint column and/or rows (give them an id). You can 
 then tie elements to those constraints but you're still using top, left, 
 bottom, etc. and then the number of pixels away separated by a colon, it's 
 just that you're not limited to the parent containers borders.
 
 Here's a link to an Adobe article on how to use them:
 http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Enhanced_Constraints
 
 Dana
 
 --- In flexcoders@yahoogroups.com, anitha2324 anitha2324@ wrote:
 
  Thanks alot for the reply , 
  
  but how i can avoid using (left,top,bottom) , what are the advance 
  constraint?
  
  
  
  
  --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
  
   Try to avoid using left, right, top,bottom.  You can use advanced 
   constraints if you need to, but try using %width/%height only first
   
   Alex Harui
   Flex SDK Developer
   Adobe Systems Inc.http://www.adobe.com/
   Blog: http://blogs.adobe.com/aharui
   
   From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
   Behalf Of anitha2324
   Sent: Saturday, June 27, 2009 12:11 AM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] dynamic dimension of the page
   
   
   
   
   
   Hi All,
   
   I am making a flex web page the following is some part of this page
   
   mx:VBox id=boxPersonalImages
   verticalGap=0
   height=80%
   width=60%
   
   left=10
   bottom=160
   horizontalAlign=left
   
   containers:CoverFlowContainer id=SildeOfImges
   width=100%
   height=100%
   horizontalGap=60
   borderStyle=none
   segments=6
   reflectionEnabled=false
   /containers:CoverFlowContainer
   
   /mx:VBox
   
   
   mx:Image id=AdsImagesComponent
   width=25%
   height=25%
   right=10
   top=150/
   mx:VBox width=100%
   height=20%
   id=hMsg
   backgroundColor=#FF
   horizontalCenter=10
   bottom=150
   mx:TextArea id=customerMessageTextAreaComponent
   width=100%
   height=100%
   fontSize=36
   textAlign=center
   fontFamily=Times New Roman
   wordWrap=true
   editable=false borderStyle=none/
   /mx:VBox
   
   
   mx:VBox height=10%
   width=50%
   id=hLog2
   left=30
   bottom=25
   mx:Label id=shortCodeLabelComponent
   width=100%
   height=10%
   fontSize=50
   color=#00/
   /mx:VBox
   mx:VBox height=10%
   width=35%
   id=hLog
   left=2%
   bottom=25
   mx:Image id=operatorLogoImageComponent
   width=110
   height=75/
   
   /mx:VBox
   
   , actually i have completed the page and i have run it on my stystem and 
   it works fine , but when i run in another pc
   the page did not display correctly and some part of this plage has not 
   been displayed because the resolution of this screen is different from 
   the resolution of my screen , so how i do fix this issue
   so that my page can be displayed correctly regardless of the screen 
   resolution , I have tried to use the % like height=34% but not all the 
   properties are accepting the % (such top , right)
   
   any one can help to solve this issue
  
 





[flexcoders] Re: item renderer in ComboBox not consistent

2009-07-01 Thread Mic
Hi Jeff, what this does is set the background color of the renderer's VBox and 
therefore the line shading to gray if the label text begins with an asterisk 
 we want to highlight these paricular rows in the list. I know what you are 
saying about creationComplete() only running once, but I was thinking the 
renderer would have to redo itself on a scroll because the viewable area had 
changed.

--- In flexcoders@yahoogroups.com, Jeffry Houser j...@... wrote:

 
  It looks like you are trying to change the background color of the 
 label so that you have alternating colors, is that correct? 
  This won't work due to render recycling.  Renderers are re-used.  There 
 is not a single renderer for every item in your dataProvider.  
 CreationComplete complete only runs once. 
 
  You might try code like this on the dataChange event.  Or using 
 updateComplete. 
 
  Or google it and discover the alternatingItemColors style: 
 http://blog.flexexamples.com/2007/08/17/alternating-row-colors-in-a-flex-list-control/
 
 Mic wrote:
  I thought this might work --- fine until I start scrolling when it gets 
  totally out of wack. The trace does fire occasionally while scrolling but 
  not consistently. Appreciate some hints. TIA,
 
  Mic.
 
  ?xml version=1.0 encoding=utf-8?
  mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; 
  horizontalScrollPolicy=off
  mx:Script
  ![CDATA[
  private function labelComplete():void{
  trace(Here);
  if(label1.text.substr(0,1) == *){
  this.setStyle(backgroundColor, 0xe8e8e3);
  }else{
  this.setStyle(backgroundColor, 0xFF);
  }   
  }   
  ]]
  /mx:Script
  mx:Label id=label1 text={data.cmplx_nm}
  creationComplete=labelComplete()  /
  /mx:VBox
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Alternative FAQ location: 
  https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
  Search Archives: 
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
 
 
 
 

 
 -- 
 Jeffry Houser, Technical Entrepreneur
 Adobe Community Expert: http://tinyurl.com/684b5h
 http://www.twitter.com/reboog711  | Phone: 203-379-0773
 --
 Easy to use Interface Components for Flex Developers
 http://www.flextras.com?c=104
 --
 http://www.theflexshow.com
 http://www.jeffryhouser.com
 --
 Part of the DotComIt Brain Trust





[flexcoders] Re: ListEvent itemRenderer field null when parent is out of view

2009-07-01 Thread Tim Hoff

Here's another work-around Brian:

public function handleTreeItemChange(event:ListEvent):void
{
   callLater(getItemRenderer);
}

public function getItemRenderer():void
{
  debugTextArea.text = ListEvent's itemRenderer:  +
testTree.itemToItemRenderer(testTree.selectedItem);
}

-TH

--- In flexcoders@yahoogroups.com, lachance.brian lachance.br...@...
wrote:

 Hi, Tim,

 Thanks for the tip! I hadn't thought of that as a direct workaround
 of sorts, but that does open the doors for another way to get it to
 work, I think :)

 It's not-so-much accessing the data that's the problem with this bug
 (which I probably should have explained), but rather some of the
 fields of the itemRenderer--specifically, the depth field. I guess I
 could, instead of relying on that field, just traverse the tree
 upwards from the selectedItem and calculate the depth manually in the
 bug case.

 Thanks again, Tim!
 -Brian



 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
 
  Hi Brian,
 
  Nice post. Yeah, that is wierd; looks like a bug. You can get around
  it for now, by looking at the data instead:
 
  public function handleTreeItemChange(event:ListEvent):void
  {
  debugTextArea.text = ListEvent's selectedItem:  +
  testtree.selectedit...@label mailto:testtree.selectedit...@label ;
  }
 
  -TH
 
  --- In flexcoders@yahoogroups.com, lachance.brian
lachance.brian@
  wrote:
  
   Hi, Group!
  
   I'm having some trouble with the Tree component in the Flex
framework:
  
   When browsing a Tree with an XML-based dataProvider, I seem to be
   unable to retrieve the itemRenderer field of the ListEvent event
that
   gets fired when the selected item changes (ListEvent.CHANGE). The
   itemRenderer field is expected to not be null, but, I'm apparently
   expecting the wrong thing.
  
   Has anyone ever ran into this issue? I've searched the Adobe JIRA
   system and Google (and this list!), and I've yet to find a helpful
   result. There were some previous bugs in the bug repository, but
they
   were transferred over from an old system. I've submitted the
request
   for more information, so we'll see where that goes.
  
   An example MXML file follows below. To see the bug, scroll down
   through the XML list until the parent item is out of view. Then,
   select one of the children currently in view and press the
left-key
   to try to go to the parent item. Notice that the itemRenderer is
   null, and this is where my problem arises.
  
   Thank you in advance for any help you're able to provide!
  
   MXML file:
   http://pastebin.com/fd4614a
  
   P.S. This is my first time posting on a newsgroup, so I hope that
   the formatting and whatnot worked out in an acceptable way. I
   apologize if that's not the case.
  
 





[flexcoders] Re: itemrenderer in datagrid does not refresh

2009-07-01 Thread Tim Hoff

Sorry if this comes through twice.  Instead of using the
creationComplete and dataChange events, add this to the itemRenderer's
script:

override public function set data(value:Object):void
{
  super.data = value;

  if ( value != null ) checkEmail();
}

-TH

--- In flexcoders@yahoogroups.com, kshah0...@... kshah0...@...
wrote:

 I tried it but no luck:

 Here is the code:

 ?xml version=1.0 encoding=utf-8?
 mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100%
 creationComplete=checkEmail() dataChange=checkEmail()
 mx:states
 mx:State name=redo
 mx:RemoveChild target={emailButton}/
 mx:SetProperty target={butt}
 name=width value=70/

 /mx:State
 mx:State name=undo
 mx:RemoveChild target={reemailButton}/
 mx:SetProperty target={butt}
 name=width value=70/
 /mx:State
 /mx:states

 mx:Script
 ![CDATA[
 import mx.rpc.events.ResultEvent;
 import mx.controls.Alert;

 private function checkEmail():void
 {
 if(data != null  data.STATUS != null  data.STATUS.length  0 
data.STATUS == 'V')
 {

 reemailButton.visible = true;
 currentState='redo';
 }
 else if(data.STATUS == 'O')
 {
 emailButton.visible = true;
 currentState='undo';
 }

 else
 emailButton.visible = false;




 trace(email:  + data.STATUS +  :  + emailButton.visible);
 }
 public function sendMail():void
 {
 //var u:URLRequest = new URLRequest(mailto:; + data.email);
 //navigateToURL(u,_self);
 userLogin.send();
 //Alert.show(mailto:  + data.email);
 }

 public function sendMail2():void
 {
 //var u:URLRequest = new URLRequest(mailto:; + data.email);
 //navigateToURL(u,_self);
 userLogin2.send();
 //Alert.show(mailto:  + data.email);
 }

 [Bindable]
 private var loginResult:String;

 public function getLoginResult(event:ResultEvent):void{
 loginResult = event.result.toString();
 Alert.show(loginResult);
 //parentDocument.genericlist.removeAll();
 // parentDocument.xmlforGrid.send();
 }


 [Bindable]
 private var loginResult9:String;

 public function getLoginResult9(event:ResultEvent):void{
 loginResult9 = event.result.toString();
 Alert.show(loginResult9);
 // parentDocument.genericlist.removeAll();
 // parentDocument.xmlforGrid.send();

 }
 ]]
 /mx:Script

 --- In flexcoders@yahoogroups.com, Jeffry Houser jeff@ wrote:
 
 
  Implement the onDataChange event in your itemRenderer .
 
  kshah0097@ wrote:
   I have a external Itemrenderer that I am using in a Datagrid.
Everytime I search the datagrid by filterfunction, the itemrenderer does
not refresh or displays out of order.
  
   Any ideas on how I can prevent this from happening?
  
  
  
  
  
   
  
   --
   Flexcoders Mailing List
   FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Alternative FAQ location:
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-\
1e62079f6847
   Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
Links
  
  
  
  
  
 
  --
  Jeffry Houser, Technical Entrepreneur
  Adobe Community Expert: http://tinyurl.com/684b5h
  http://www.twitter.com/reboog711 | Phone: 203-379-0773
  --
  Easy to use Interface Components for Flex Developers
  http://www.flextras.com?c=104
  --
  http://www.theflexshow.com
  http://www.jeffryhouser.com
  --
  Part of the DotComIt Brain Trust
 





[flexcoders] Button with skin

2009-07-01 Thread christophe_jacquelin
Hello,

I am searching example on how to make a gradient skin on a button with an image 
for the button.

Thank you,
Christophe,




Re: [flexcoders] The Blueprint Eclipse plug-in is live on Adobe Labs

2009-07-01 Thread Sam Lai
I'm surprised at the lack of reaction for this on this list.

I'm impressed - looks to be quite useful; just need to add it into my workflow.

The examples are good when dealing with completely unfamiliar classes,
but I often forget what a certain property/method in a certain class
does/returns, and the code hinting/completion in FB3 isn't very
helpful most of the time.

It would be neat if there could be a quick shortcut button to switch
between examples and a condensed version of the flex class reference
(allow me to select if multiple classes are relevant), similar to how
Netbeans and to a lesser extent Eclipse Java works. That would save me
a lot of time going back and forth between FB3 and my browser as I do
now.

2009/6/23 jrunrandy ranie...@adobe.com:
 If you get a minute, please check out Blueprint, which we released on
 Adobe Labs a couple of weeks ago. Blueprint is an innovative code-centric
 search application, initially delivered as an Eclipse plug-in.

 It is a custom search tool that searches only for code (for now, it
 searches just for MXML and ActionScript). So, for example, if you
 search for DataGrid, it returns a set of code examples that use the
 Flex DataGrid control. But what's really cool is that you can easily
 highlight, copy, and paste chunks of code right into your
 application, all without leaving Flex/Flash Builder.

 For more information, see the Blueprint page
 (http://labs.adobe.com/technologies/blueprint/) on Adobe Labs

 (FYI, Blueprint now works for Flex Builder 3 and Flash Builder 4)

 Regards,
 Randy Nielsen
 Flex Doc Manager




 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links






[flexcoders] LCDS and JMS topics

2009-07-01 Thread niamath basha
hi all,
I have an Active MQ server which will publish messages ( STOCK.NYSE.GOOG,
STOCK.NYSE.IBM.)
and in Flex (using LCDS) i have to dynamically subscribe for STOCK.NYSE.GOOG
or STOCK.NYSE.IBM
i hve to get data for the subscribed topics only but now i am not able to
subscribe for specific topic
i can just subscribe to STOCK so by this i will get all messages published
on STOCK.

With Regards,
Niamath Basha


Re: [flexcoders] Re: item renderer in ComboBox not consistent

2009-07-01 Thread Jeffry Houser


 Use the dataChange event.  Even if the data changes, the renderer is 
not re-created and creationComplete will not run again. 


Mic wrote:

Hi Jeff, what this does is set the background color of the renderer's VBox and 
therefore the line shading to gray if the label text begins with an asterisk 
 we want to highlight these paricular rows in the list. I know what you are 
saying about creationComplete() only running once, but I was thinking the 
renderer would have to redo itself on a scroll because the viewable area had 
changed.

--- In flexcoders@yahoogroups.com, Jeffry Houser j...@... wrote:
  
 It looks like you are trying to change the background color of the 
label so that you have alternating colors, is that correct? 
 This won't work due to render recycling.  Renderers are re-used.  There 
is not a single renderer for every item in your dataProvider.  
CreationComplete complete only runs once. 

 You might try code like this on the dataChange event.  Or using 
updateComplete. 

 Or google it and discover the alternatingItemColors style: 
http://blog.flexexamples.com/2007/08/17/alternating-row-colors-in-a-flex-list-control/


Mic wrote:


I thought this might work --- fine until I start scrolling when it gets totally 
out of wack. The trace does fire occasionally while scrolling but not 
consistently. Appreciate some hints. TIA,

Mic.

?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalScrollPolicy=off
mx:Script
![CDATA[
private function labelComplete():void{
trace(Here);
if(label1.text.substr(0,1) == *){
this.setStyle(backgroundColor, 0xe8e8e3);
}else{
this.setStyle(backgroundColor, 0xFF);
}   
}   
]]
/mx:Script
mx:Label id=label1 text={data.cmplx_nm}
creationComplete=labelComplete()  /
/mx:VBox





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links




  
  

--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links




  


--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust



[flexcoders] Re: Reading a 2D barcode

2009-07-01 Thread markgoldin_2000
A quick Googling:
http://www.download3k.com/System-Utilities/Automation-Tools/Download-bcWebCam-Read-Barcode-with-Web-Cam.html

That means that yes, you can read barcodes with a web cam and the barcode gets 
entered into an active appication's active field. Just like if you would read a 
barcode with a keyboard scanner.

HTH

--- In flexcoders@yahoogroups.com, Clint Tredway grum...@... wrote:

 I have been looking for an actionscript library to read 2D barcodes but I
 have not run across one yet. Does anyone know of a library, and if so, do
 you mind sharing?
 
 Thanks!
 
 -- 
 When you choose hope, anything is possible.
 -Christopher Reeve





[flexcoders] Can I abort a print job after start() has returned?

2009-07-01 Thread Jeffrey EF Friedl
Using flash.printing.PrintJob, after start() I check to see whether the user 
has set the exact printing parameters needed for a successful print, and if 
not, I'd like to abort the print and send the user an Alert about the print 
requirements.

However, I can't figure out how to kill the print job, other than to let it 
time out. I'd think there'd be a printJob.abort() or the like, but I don't see 
it.

I'd appreciate pointers to set me on the proper path.
Thanks,
   Jeffrey



Re: [flexcoders] Audio recording using AIR

2009-07-01 Thread Jeffry Houser


I'm not sure of complete specifics, but I thought Ribbit supported 
something like this  Wasn't sure if they support computer mics or you 
have to use a phone. 
AudioSpike may support something like this, I'm not sure. 
I thought Digimix also did this sort of thing, but I have no idea if it 
ever got a release.



Kevin Carlson wrote:



Hello,

I'd like to develop an AIR application which allows users to make 
audio recordings on their PC with a USB microphone, then either store 
the audio files locally (for later upload) or stream using Flash Media 
Server or Red5.


Is this feasible?  Any commercial products to facilitate this? 


Thanks!
Kevin







--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust



[flexcoders] How apply a closeButtonSkin style to flex Application

2009-07-01 Thread j2me_soul
I use Flash make a Flex skin.
Everythins is fine, but only the closeButtonSkin style can't apply to the 
Titlewindow component.
I import the Flex skin swc into the project. The CSS is produced automatically. 
I didn't change anything.
The code is:
TitleWindow
{
 borderSkin: Embed(skinClass=Panel_borderSkin);  
 closeButtonSkin: Embed(skinClass=Panel_closeButtonSkin);  
 controlBarBackgroundSkin: Embed(skinClass=Panel_controlBarBackgroundSkin);   
}


 
 


 inline: Panel  Window.PNG

[flexcoders] Re: how can you make the icon in an AdvancedDataGridGroupItemRenderer accept clicks?

2009-07-01 Thread valdhor
I'm glad you found an easy way to get the functionality you wanted.

According to the docs, mouseEnabled defaults to true. I wonder why the ADGGIR 
constructor sets it to false? Also, why don't the docs reflect this?

I just wanted to say that if you still wanted the functionality from 
AdvancedDataGridGroupItemRenderer and you wanted extra functionality, you can 
extend AdvancedDataGridGroupItemRenderer for your renderer. Best of both worlds 
;-)



--- In flexcoders@yahoogroups.com, Pan Troglodytes chimpathe...@... wrote:

 Well, the main reason I wouldn't want to write my own itemRenderer is that
 AdvancedDataGridGroupItemRenderer does a lot of stuff I wouldn't want to
 have to reinvent.  It also interacts with stuff like iconFunction that would
 be annoying to re-implement.  Plus, there's the fact that there's a high
 likelihood that what I wrote would be much less efficient.
 
 But good news!  I found a simple way to achieve what I want:
 
 ?xml version=1.0 encoding=utf-8?
 Application
   xmlns=http://www.adobe.com/2006/mxml;
   
   Script
 ![CDATA[
   // put any icon you want in the embed below, doesn't matter
   [Bindable] [Embed(source=imageA.png)] private var imgClass:Class;
 
   private function geticon(item:Object):Class
   {
 return imgClass;
   }
 ]]
   /Script
   AdvancedDataGrid iconFunction=geticon itemClick=trace('itemclick')
 click=trace('gridclick')
 groupItemRenderer
   Component
 AdvancedDataGridGroupItemRenderer mouseEnabled=true/
   /Component
 /groupItemRenderer
 dataProvider
   HierarchicalData childrenField=subitems source={[{label:'test'},
 {label:'test2'}]}/
 /dataProvider
 columns
   AdvancedDataGridColumn dataField=label/
  /columns
   /AdvancedDataGrid
 /Application
 
 The key was setting mouseEnabled=true.  It is set to false in the
 constructor for ADGGIR.  I'm not sure why, and I am a little worried that I
 may be messing up something important.  So far I haven't noticed any odd
 behavior.  But if anyone knows a good reason WHY mouseEnabled is set this
 way, please followup.
 
 
 On Mon, Jun 29, 2009 at 11:13 AM, valdhor valdhorli...@...wrote:
 
 
 
  Why not just use an itemRenderer?
 
  AFAIK. you can't capture a mouse event on a Class object as it does not
  implement iEventDispatcher. I suppose you could extend Class and implement
  iEventDispatcher but I have never tried it.
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Pan
  Troglodytes chimpathetic@ wrote:
  
   No ideas on how to do this at all?
  
   On Tue, Jun 9, 2009 at 4:13 PM, Pan Troglodytes chimpathetic@wrote:
 
  
I've got a bit of a problem and haven't been able to figure it out.
  When
using hierarchical views with ADG, I find that the icon can't be
  clicked on
to select the row. I can't figure out how to capture a click on the
  icon at
all.
   
?xml version=1.0 encoding=utf-8?
Application
xmlns=http://www.adobe.com/2006/mxml;

Script
![CDATA[
// put any icon you want in the embed below, doesn't matter
[Bindable] [Embed(source=imageA.png)] private var imgClass:Class;
   
private function geticon(item:Object):Class
{
return imgClass;
}
]]
/Script
AdvancedDataGrid iconFunction=geticon itemClick=trace('itemclick')
click=trace('gridclick')
dataProvider
HierarchicalData childrenField=subitems source={[{label:'test'},
{label:'test2'}]}/
/dataProvider
columns
AdvancedDataGridColumn dataField=label/
/columns
/AdvancedDataGrid
/Application
   
If you click anywhere but the icon, the gridclick and itemclick events
  both
fire. But if you click on the icon, you get only the gridclick. And the
gridclick event doesn't get anything useful for target/currentTarget,
  as far
as I can tell.
   
The main thing I really want to do is have clicking on the icon select
  the
row, just like clicking anywhere else will do. Tangentially, it would
  be
nice to know how to capture the event in case I wanted to do something
different with clicking on the icon.
   
--
Jason
   
  
  
  
   --
   Jason
  
 
   
 
 
 
 
 -- 
 Jason





[flexcoders] Re: date format according to the location client Browser

2009-07-01 Thread valdhor
date.toLocaleString ?


--- In flexcoders@yahoogroups.com, mhbmarcos mhbmar...@... wrote:

 Hi!!!, 
 how to display date values with the format according the location client 
 browser?.
 My app is web.
 
 Regards





[flexcoders] UITextField alignment question

2009-07-01 Thread ACasualObserver
I need to place a text in a ActionScript 3 project. The supplied X and Y is 
left and baseline coordinates. I use UITextField and subtracted its 
baselinePosition from Y. This places the text very close to where it should be 
vertically but not the exact location (text displayed a little higher). 
Horizontal position is not accurate neither and text is positioned a little to 
the right of supplied X. I could not find any property in UITextField or 
TextFormat to correct this.

Any idea?

Thanks



Re: [flexcoders] UITextField alignment question

2009-07-01 Thread Daniel Freiman
Are you accounting for the 2 pixel border of the textfield?

- Daniel Freiman

On Wed, Jul 1, 2009 at 10:10 AM, ACasualObserver pof...@yahoo.com wrote:



 I need to place a text in a ActionScript 3 project. The supplied X and Y is
 left and baseline coordinates. I use UITextField and subtracted its
 baselinePosition from Y. This places the text very close to where it should
 be vertically but not the exact location (text displayed a little higher).
 Horizontal position is not accurate neither and text is positioned a little
 to the right of supplied X. I could not find any property in UITextField or
 TextFormat to correct this.

 Any idea?

 Thanks

  



[flexcoders] very urgent PlZZZZZZZ Accessing webservices

2009-07-01 Thread vin.flex
Hi there,

I got an urgent situation. I have developed a flex app
accessing the data through webservices developed in C# .NET. 
webservices and my flex app reside in two different boxes.
and webservices are not available for outside public.

Everthing is working fine within the network. But when I access in 
production it is not able to load the WSDL. 

Can any body tell me how to make a request to the load webservice 
from the box hosting flex app(may be using proxies)?

any help will be really appreciated.

thanks 
vin



[flexcoders] Navigating to a new child in a ViewStack - how to target the child being hidden?

2009-07-01 Thread lanekelly5
I'm putting together a prototype of an app and I have a ViewStack that is being 
controlled by a button toolbar.  In each of these views there is a video 
player.  What I need to do is to pause the video in the view that is being 
hidden.  I see the change event triggered when I change views, but it seems 
that the target reference passed in via the event parameter is the new view.  
Is there an easy way to get a reference to the view being hidden?  Or is there 
a different event triggered (something like a deactivate) that I can use to 
create a handler with a passed in reference to the departing view?

Thanks.



[flexcoders] Re: UITextField alignment question

2009-07-01 Thread ACasualObserver
Thanks for the quick reply.

I am not counting for the 2 pixels. Are the pixels always there even if no 
border is drawn? Is it always 2 pixels?



--- In flexcoders@yahoogroups.com, Daniel Freiman freima...@... wrote:

 Are you accounting for the 2 pixel border of the textfield?
 
 - Daniel Freiman
 
 On Wed, Jul 1, 2009 at 10:10 AM, ACasualObserver pof...@... wrote:
 
 
 
  I need to place a text in a ActionScript 3 project. The supplied X and Y is
  left and baseline coordinates. I use UITextField and subtracted its
  baselinePosition from Y. This places the text very close to where it should
  be vertically but not the exact location (text displayed a little higher).
  Horizontal position is not accurate neither and text is positioned a little
  to the right of supplied X. I could not find any property in UITextField or
  TextFormat to correct this.
 
  Any idea?
 
  Thanks
 
   
 





[flexcoders] RSLs defaults.css

2009-07-01 Thread t0ml33
I'm including the Flex framework as a linked RSL, and also have another library 
that I'm including as a linked RSL.  The custom library contains a defaults.css 
file in which I have some styles for the Alert control, using a type selector.  
Oddly, the styles do not apply correctly unless I change one of the RSLs to 
merged into code - and it doesn't seem to matter which one.  In fact, if I 
have a third RSL that does not contain a defaults.css and I merge that one into 
code, the other styles apply fine.  

Does anyone have experience with this kind of scenario?  See this weirdness 
before?  Have any insights into the initialization of RSLs?

Thanks...



Re: [flexcoders] UITextField alignment question

2009-07-01 Thread Robert VanCuren Jr
Are you using embedded fonts? When you embed a font they will display 1
pixel higher than a non embedded font. There are a couple work arounds if
this is the case.

On Wed, Jul 1, 2009 at 10:24 AM, Daniel Freiman freima...@gmail.com wrote:



 Are you accounting for the 2 pixel border of the textfield?

 - Daniel Freiman


 On Wed, Jul 1, 2009 at 10:10 AM, ACasualObserver pof...@yahoo.com wrote:



 I need to place a text in a ActionScript 3 project. The supplied X and Y
 is left and baseline coordinates. I use UITextField and subtracted its
 baselinePosition from Y. This places the text very close to where it should
 be vertically but not the exact location (text displayed a little higher).
 Horizontal position is not accurate neither and text is positioned a little
 to the right of supplied X. I could not find any property in UITextField or
 TextFormat to correct this.

 Any idea?

 Thanks


  



Re: [flexcoders] Re: UITextField alignment question

2009-07-01 Thread Daniel Freiman
Yeah (subject to scaling/transform/etc), see
http://livedocs.adobe.com/flex/3/langref/flash/text/TextLineMetrics.html

On Wed, Jul 1, 2009 at 11:11 AM, ACasualObserver pof...@yahoo.com wrote:



 Thanks for the quick reply.

 I am not counting for the 2 pixels. Are the pixels always there even if no
 border is drawn? Is it always 2 pixels?


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Daniel
 Freiman freima...@... wrote:
 
  Are you accounting for the 2 pixel border of the textfield?
 
  - Daniel Freiman
 
  On Wed, Jul 1, 2009 at 10:10 AM, ACasualObserver pof...@... wrote:
 
  
  
   I need to place a text in a ActionScript 3 project. The supplied X and
 Y is
   left and baseline coordinates. I use UITextField and subtracted its
   baselinePosition from Y. This places the text very close to where it
 should
   be vertically but not the exact location (text displayed a little
 higher).
   Horizontal position is not accurate neither and text is positioned a
 little
   to the right of supplied X. I could not find any property in
 UITextField or
   TextFormat to correct this.
  
   Any idea?
  
   Thanks
  
  
  
 

  



RE: [flexcoders] very urgent PlZZZZZZZ Accessing webservices

2009-07-01 Thread Jake Churchill
Maybe a crossdomain policy issue?

 

Jake Churchill
CF Webtools
11204 Davenport, Ste. 100
Omaha, NE  68154
 http://www.cfwebtools.com http://www.cfwebtools.com
402-408-3733 x103

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of vin.flex
Sent: Wednesday, July 01, 2009 9:54 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] very urgent PlZZZ Accessing webservices

 






Hi there,

I got an urgent situation. I have developed a flex app
accessing the data through webservices developed in C# .NET. 
webservices and my flex app reside in two different boxes.
and webservices are not available for outside public.

Everthing is working fine within the network. But when I access in 
production it is not able to load the WSDL. 

Can any body tell me how to make a request to the load webservice 
from the box hosting flex app(may be using proxies)?

any help will be really appreciated.

thanks 
vin



Checked by AVG - www.avg.com
Version: 8.5.375 / Virus Database: 270.13.1/2212 - Release Date: 07/01/09
05:53:00



[flexcoders] Re: very urgent PlZZZZZZZ Accessing webservices

2009-07-01 Thread valdhor
If the web service box is not available to the outside public, then the Flash 
player running on the clients machine won't be able to load the WSDL.

Either open up the web service box to the outside public or rewrite your app to 
use remoteobject to connect back to the server hosting the Flex app and then 
use that server to connect to the web service and return data.


--- In flexcoders@yahoogroups.com, vin.flex vin.f...@... wrote:

 Hi there,
 
 I got an urgent situation. I have developed a flex app
 accessing the data through webservices developed in C# .NET. 
 webservices and my flex app reside in two different boxes.
 and webservices are not available for outside public.
 
 Everthing is working fine within the network. But when I access in 
 production it is not able to load the WSDL. 
 
 Can any body tell me how to make a request to the load webservice 
 from the box hosting flex app(may be using proxies)?
 
 any help will be really appreciated.
 
 thanks 
 vin





[flexcoders] Re: UITextField alignment question

2009-07-01 Thread ACasualObserver
Thanks. This solved my problem. You saved me hours of work.


--- In flexcoders@yahoogroups.com, Daniel Freiman freima...@... wrote:

 Yeah (subject to scaling/transform/etc), see
 http://livedocs.adobe.com/flex/3/langref/flash/text/TextLineMetrics.html
 
 On Wed, Jul 1, 2009 at 11:11 AM, ACasualObserver pof...@... wrote:
 
 
 
  Thanks for the quick reply.
 
  I am not counting for the 2 pixels. Are the pixels always there even if no
  border is drawn? Is it always 2 pixels?




Re: [flexcoders] Time Difference between two columns in DataGrid using itemrenderer

2009-07-01 Thread Angelo Anolin
I think you would find it better to do the calculation on the database itself.

All database have a lot of date/time diff functions which you can use. That 
way, you all simply bind the data retrieved in your datagrid without the need 
for calculating it.

hth





From: Don Kerr fusionp...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Monday, 29 June, 2009 8:51:22
Subject: [flexcoders] Time Difference between two columns in DataGrid using 
itemrenderer





I have two columns in a datadrid, startTime (e.g. 04:30 PM) and endTime (e.g. 
06:00 PM). Both are strings and  varchar in the database.

I want to add a column to the datagrid that displays the difference between 
these two times expressed in hours (e.g. 1.5 Hours).

I'm trying to use an itemrenderer to do this calculation, but I've yet to be 
successful.  Having trouble converting the strings to date, then calculate the 
hours.  Can anyone help?

Thanks,
Don


   


  

[flexcoders] Re: item renderer in ComboBox not consistent

2009-07-01 Thread valdhor
Try the following as a starting point...

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
 mx:ComboBox itemRenderer=MyLabel
 mx:dataProvider
  mx:String*United States/mx:String
  mx:StringAustralia/mx:String
  mx:StringEngland/mx:String
  mx:String*Ireland/mx:String
  mx:String*Scotland/mx:String
  mx:StringWales/mx:String
 /mx:dataProvider
 /mx:ComboBox
/mx:Application

MyLabel.as:
package
{
 import flash.display.Graphics;
 import mx.controls.Label;

 public class MyLabel extends Label
 {
 public function MyLabel()
 {
 super();
 }

 override public function set data(value:Object):void
 {
 if(value != null)
 {
 super.data = value;
 text = value as String;
 }
 }

 override protected function
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
 {
 super.updateDisplayList(unscaledWidth, unscaledHeight);
 var g:Graphics = graphics;
 g.clear();
 if(text.substr(0,1) == *)
 {
 g.beginFill(0xE8E8E3);
 }
 else
 {
 g.beginFill(0xFF);
 }
 g.drawRect(-2, -2, unscaledWidth + 4, unscaledHeight + 4);
 g.endFill();
 }
 }
}




--- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote:

 I thought this might work --- fine until I start scrolling when it
gets totally out of wack. The trace does fire occasionally while
scrolling but not consistently. Appreciate some hints. TIA,

 Mic.

 ?xml version=1.0 encoding=utf-8?
 mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
horizontalScrollPolicy=off
  mx:Script
   ![CDATA[
 private function labelComplete():void{
   trace(Here);
   if(label1.text.substr(0,1) == *){
  this.setStyle(backgroundColor, 0xe8e8e3);
 }else{
  this.setStyle(backgroundColor, 0xFF);
 }
 }
   ]]
  /mx:Script
 mx:Label id=label1 text={data.cmplx_nm}   
creationComplete=labelComplete()  /
 /mx:VBox




[flexcoders] Re: Navigating to a new child in a ViewStack - how to target the child being hidden?

2009-07-01 Thread valdhor
You probably want the hide event (Dispatched when an object's state changes 
from visible to invisible).


--- In flexcoders@yahoogroups.com, lanekelly5 lkel...@... wrote:

 I'm putting together a prototype of an app and I have a ViewStack that is 
 being controlled by a button toolbar.  In each of these views there is a 
 video player.  What I need to do is to pause the video in the view that is 
 being hidden.  I see the change event triggered when I change views, but it 
 seems that the target reference passed in via the event parameter is the new 
 view.  Is there an easy way to get a reference to the view being hidden?  Or 
 is there a different event triggered (something like a deactivate) that I can 
 use to create a handler with a passed in reference to the departing view?
 
 Thanks.





Re: [flexcoders] Audio recording using AIR

2009-07-01 Thread Zach Stepek
Digimix was acquired, and though I'm not 100% sure, I think it was  
Aviary that made the acquisition. It did what you're lookin to do, but  
without the FMS and Red 5 component. I'm not sure that there are FOSS,  
or even licensable options for AS3 audio encoding, but here are a few  
other thoughts.


You may want to take a look at Alchemy for this, now that it's  
available, as you may be able to get a C library for audio encoding to  
run in AIR. Ogg Vorbis is one of the sample libraries on Labs. Also,  
if you're going to have the server capabilities there anyway, you  
could send to the server to encode, and deliver the file back to the  
client. Or use Merapi to have Java do the encoding. Not sure if any of  
these fit your use case, but I hope they help.


- Zach

On Jul 1, 2009, at 7:48 AM, Jeffry Houser j...@farcryfly.com wrote:





 I'm not sure of complete specifics, but I thought Ribbit supported  
something like this  Wasn't sure if they support computer mics or  
you have to use a phone.

 AudioSpike may support something like this, I'm not sure.
 I thought Digimix also did this sort of thing, but I have no idea  
if it ever got a release.



Kevin Carlson wrote:


Hello,

I'd like to develop an AIR application which allows users to make  
audio recordings on their PC with a USB microphone, then either  
store the audio files locally (for later upload) or stream using  
Flash Media Server or Red5.


Is this feasible?  Any commercial products to facilitate this?

Thanks!
Kevin




--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust



[flexcoders] Re: Web Service Question (Help!)

2009-07-01 Thread valdhor
Error 1009 is Cannot access a property or method of a null object reference.. 
Try calling event.fault.getStackTrace() in the fault handler to see what the 
problem is. You may have a null XML object returned.


--- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote:

 Hi FlexCoders,
 
 I am totally confused with the error I am having at the moment. Been banging 
 my head on this for the past 3 hours..
 
 In one of my function, I am trying to call a WebService method passing an 
 ArrayCollection.
 
 
 var svcDP:WebService = new WebService();
 svcDP.addEventListener(ResultEvent.RESULT, getRH);
 svcDP.addEventListener(FaultEvent.FAULT, getFH);
 svcDP.loadWSDL(_appWebService);
 svcDP.Method2(myArrayColl);
 
 Calling the webservice, I always get an error, which is defined in the 
 faulthandler event, registering Error 1009.
 
 But when I do another web service call before the Method2, say:
 
 var svcDP:WebService = new WebService();
 svcDP.addEventListener(ResultEvent.RESULT, getRH);
 svcDP.addEventListener(FaultEvent.FAULT, getFH);
 svcDP.loadWSDL(_appWebService);
 svcDP.Method1(myArrayColl);
 svcDP.Method2(myArrayColl);
 
 The Method2 gets called (I know because am doing a trace on the web service).
 
 Now I don't have any idea why when only Method2 is called, the web service is 
 not triggered, but calling another webservice before it, the method is 
 triggered.
 
 Any idea?
 
 Thanks and regards,
 
 Angelo





[flexcoders] Re: Is license required to deploye the flex chart application

2009-07-01 Thread valdhor
Sorry, I think I put you wrong there. If you have the Flex Builder license then 
when you deploy the SWF file you do NOT need a license to distribute with it.


--- In flexcoders@yahoogroups.com, Krunal Panchal panchal_...@... wrote:

 thanks for response.
 
 i read somewhere that to develope the flex application license is required 
 but to depoly the application on server it does not required. Let me help to 
 clear my understanding.
 
  
 Regards,
 
 
 
 Krunal Panchal 
 
 
 
 
 From: valdhor valdhorli...@...
 To: flexcoders@yahoogroups.com
 Sent: Tuesday, 30 June, 2009 21:21:51
 Subject: [flexcoders] Re: Is license required to deploye the flex chart 
 application
 
 
 
 
 
 Yes
 
 --- In flexcod...@yahoogro ups.com, Krunal Panchal panchal_kru@ ... wrote:
 
  Is license required to deploye the flex chart application? 
   
  Regards,
  
   _ _ __
  
  Krunal Panchal | Senior Software Engineer
 





Re: [flexcoders] Time Difference between two columns in DataGrid using itemrenderer

2009-07-01 Thread Tom McNeer
You could also look at using the Flex Date Utils on RIAForge.

But you'll still need to turn the strings into valid date objects first.



-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


[flexcoders] Re: Navigating to a new child in a ViewStack - how to target the child being hidden?

2009-07-01 Thread lachance.brian
If you still want to use the change event (or if for some reason the 
hide event doesn't seem to work), I think you could also look at the 
oldIndex value of the event. From there you could call 
getChildByIndex on the ViewStack to get a reference.


--- In flexcoders@yahoogroups.com, lanekelly5 lkel...@... wrote:

 I'm putting together a prototype of an app and I have a ViewStack that is 
 being controlled by a button toolbar.  In each of these views there is a 
 video player.  What I need to do is to pause the video in the view that is 
 being hidden.  I see the change event triggered when I change views, but it 
 seems that the target reference passed in via the event parameter is the new 
 view.  Is there an easy way to get a reference to the view being hidden?  Or 
 is there a different event triggered (something like a deactivate) that I can 
 use to create a handler with a passed in reference to the departing view?
 
 Thanks.





[flexcoders] Re: ListEvent itemRenderer field null when parent is out of view

2009-07-01 Thread lachance.brian
Wow, it looks like I need to read the documentation a bit closer: the 
itemToItemRenderer method looks like a pretty-obvious candidate!

Thanks, Tim!

--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:

 
 Here's another work-around Brian:
 
 public function handleTreeItemChange(event:ListEvent):void
 {
callLater(getItemRenderer);
 }
 
 public function getItemRenderer():void
 {
   debugTextArea.text = ListEvent's itemRenderer:  +
 testTree.itemToItemRenderer(testTree.selectedItem);
 }
 
 -TH
 
 --- In flexcoders@yahoogroups.com, lachance.brian lachance.brian@
 wrote:
 
  Hi, Tim,
 
  Thanks for the tip! I hadn't thought of that as a direct workaround
  of sorts, but that does open the doors for another way to get it to
  work, I think :)
 
  It's not-so-much accessing the data that's the problem with this bug
  (which I probably should have explained), but rather some of the
  fields of the itemRenderer--specifically, the depth field. I guess I
  could, instead of relying on that field, just traverse the tree
  upwards from the selectedItem and calculate the depth manually in the
  bug case.
 
  Thanks again, Tim!
  -Brian
 
 
 
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
  
  
   Hi Brian,
  
   Nice post. Yeah, that is wierd; looks like a bug. You can get around
   it for now, by looking at the data instead:
  
   public function handleTreeItemChange(event:ListEvent):void
   {
   debugTextArea.text = ListEvent's selectedItem:  +
   testtree.selectedit...@label mailto:testtree.selectedit...@label ;
   }
  
   -TH
  
   --- In flexcoders@yahoogroups.com, lachance.brian
 lachance.brian@
   wrote:
   
Hi, Group!
   
I'm having some trouble with the Tree component in the Flex
 framework:
   
When browsing a Tree with an XML-based dataProvider, I seem to be
unable to retrieve the itemRenderer field of the ListEvent event
 that
gets fired when the selected item changes (ListEvent.CHANGE). The
itemRenderer field is expected to not be null, but, I'm apparently
expecting the wrong thing.
   
Has anyone ever ran into this issue? I've searched the Adobe JIRA
system and Google (and this list!), and I've yet to find a helpful
result. There were some previous bugs in the bug repository, but
 they
were transferred over from an old system. I've submitted the
 request
for more information, so we'll see where that goes.
   
An example MXML file follows below. To see the bug, scroll down
through the XML list until the parent item is out of view. Then,
select one of the children currently in view and press the
 left-key
to try to go to the parent item. Notice that the itemRenderer is
null, and this is where my problem arises.
   
Thank you in advance for any help you're able to provide!
   
MXML file:
http://pastebin.com/fd4614a
   
P.S. This is my first time posting on a newsgroup, so I hope that
the formatting and whatnot worked out in an acceptable way. I
apologize if that's not the case.
   
  
 





[flexcoders] adobe air multiple window performance problem

2009-07-01 Thread hannesstockner
Hello,

Im developing an AIR application where the user can open up to 20 transparent 
Window.

Each window contains some labels and a Slider.

When I open 10 Window and interact with the slider the whole application breaks.

Do you have any ideas how I can solve this problem?

Thanks a lot



[flexcoders] Re: RSLs defaults.css

2009-07-01 Thread t0ml33
Additional information on this:  so far this seems to be specific to Panel, 
TitleWindow, and Alert.  Also, it's only certain CSS properties.  So far, I've 
found the backgroundColor, borderColor, and borderAlpha properties to be 
affected by this bug.

Also, ignore the bit about the third RSL - that's a red herring.

Thanks for any suggestions you might have.  I'll be submitting a bug on this, 
but am still seeking a workaround.

--- In flexcoders@yahoogroups.com, t0ml33 des...@... wrote:

 I'm including the Flex framework as a linked RSL, and also have another 
 library that I'm including as a linked RSL.  The custom library contains a 
 defaults.css file in which I have some styles for the Alert control, using a 
 type selector.  Oddly, the styles do not apply correctly unless I change one 
 of the RSLs to merged into code - and it doesn't seem to matter which one.  
 In fact, if I have a third RSL that does not contain a defaults.css and I 
 merge that one into code, the other styles apply fine.  
 
 Does anyone have experience with this kind of scenario?  See this weirdness 
 before?  Have any insights into the initialization of RSLs?
 
 Thanks...





[flexcoders] Getting User Information and Session Info using FlexContext

2009-07-01 Thread deepa
Hi,

I am working with sessions and authentication for the first time. 
I need assistance with using FlexContext to read the session attributes and 
user Information. I want to know, how and from where FlexContext gets the 
session information from? I have a flex login page, the user id and password 
are submitted via URLVariables - j_username and j_password. The Tomcat 
validates it, using custom JDBCRealm. I now want to capture this user 
information as well as the session details, such that it is accessible at both 
the Flex as well as the Java side. I have a java class, in which I am trying to 
access the HttpServletRequest object and FlexSession object, by doing something 
like this - 

HttpServletRequest req = FlexContext.getHttpRequest();
FlexSession session = FlexContext.getFlexSession();

But both of these throw NullPointerException.

Any pointers on how to resolve this issue, would be highly appreciated.

Thanks  Regards,
Deepa



[flexcoders] Re: ListEvent itemRenderer field null when parent is out of view

2009-07-01 Thread Tim Hoff

Ha, still a bug and a hack though; hence the use of callLater. :)

-TH

--- In flexcoders@yahoogroups.com, lachance.brian lachance.br...@...
wrote:

 Wow, it looks like I need to read the documentation a bit closer: the
itemToItemRenderer method looks like a pretty-obvious candidate!

 Thanks, Tim!

 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
 
  Here's another work-around Brian:
 
  public function handleTreeItemChange(event:ListEvent):void
  {
  callLater(getItemRenderer);
  }
 
  public function getItemRenderer():void
  {
  debugTextArea.text = ListEvent's itemRenderer:  +
  testTree.itemToItemRenderer(testTree.selectedItem);
  }
 
  -TH
 
  --- In flexcoders@yahoogroups.com, lachance.brian
lachance.brian@
  wrote:
  
   Hi, Tim,
  
   Thanks for the tip! I hadn't thought of that as a direct
workaround
   of sorts, but that does open the doors for another way to get it
to
   work, I think :)
  
   It's not-so-much accessing the data that's the problem with this
bug
   (which I probably should have explained), but rather some of the
   fields of the itemRenderer--specifically, the depth field. I guess
I
   could, instead of relying on that field, just traverse the tree
   upwards from the selectedItem and calculate the depth manually in
the
   bug case.
  
   Thanks again, Tim!
   -Brian
  
  
  
   --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
   
   
Hi Brian,
   
Nice post. Yeah, that is wierd; looks like a bug. You can get
around
it for now, by looking at the data instead:
   
public function handleTreeItemChange(event:ListEvent):void
{
debugTextArea.text = ListEvent's selectedItem:  +
testtree.selectedit...@label
mailto:testtree.selectedit...@label ;
}
   
-TH
   
--- In flexcoders@yahoogroups.com, lachance.brian
  lachance.brian@
wrote:

 Hi, Group!

 I'm having some trouble with the Tree component in the Flex
  framework:

 When browsing a Tree with an XML-based dataProvider, I seem to
be
 unable to retrieve the itemRenderer field of the ListEvent
event
  that
 gets fired when the selected item changes (ListEvent.CHANGE).
The
 itemRenderer field is expected to not be null, but, I'm
apparently
 expecting the wrong thing.

 Has anyone ever ran into this issue? I've searched the Adobe
JIRA
 system and Google (and this list!), and I've yet to find a
helpful
 result. There were some previous bugs in the bug repository,
but
  they
 were transferred over from an old system. I've submitted the
  request
 for more information, so we'll see where that goes.

 An example MXML file follows below. To see the bug, scroll
down
 through the XML list until the parent item is out of view.
Then,
 select one of the children currently in view and press the
  left-key
 to try to go to the parent item. Notice that the itemRenderer
is
 null, and this is where my problem arises.

 Thank you in advance for any help you're able to provide!

 MXML file:
 http://pastebin.com/fd4614a

 P.S. This is my first time posting on a newsgroup, so I hope
that
 the formatting and whatnot worked out in an acceptable way. I
 apologize if that's not the case.

   
  
 






[flexcoders] Re: ArrayCollection/Min Max Problem

2009-07-01 Thread valdhor
This works for me (Although there may be a better way)...

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
creationComplete=onCreationComplete()
 mx:Script
 ![CDATA[
 private var randomNumberArray:Array = new Array();
 private var minMaxArray:Array = new Array();
 private var currentMinMaxObject:Object;

 private function onCreationComplete():void
 {
 for(var i:int = 0 ; i  100 ; i++)
 {
 randomNumberArray.push(int(Math.random() * 100));
 }
 for(i = 0 ; i  74 ; i++)
 {
 for(var j:int = 0 ; j  26 ; j++)
 {
 currentMinMaxObject = new Object();
 currentMinMaxObject.min = randomNumberArray[j +
i];
 currentMinMaxObject.max = randomNumberArray[j +
i];
 if(randomNumberArray[j + i + 1] 
currentMinMaxObject.max)
 {
 currentMinMaxObject.max =
randomNumberArray[j + i + 1];
 }
 if(randomNumberArray[j + i + 1] 
currentMinMaxObject.min)
 {
 currentMinMaxObject.min =
randomNumberArray[j + i + 1];
 }
 }
 minMaxArray.push(currentMinMaxObject);
 }
 }
 ]]
 /mx:Script
/mx:Application
--- In flexcoders@yahoogroups.com, Sherif Abdou sherif...@... wrote:

 I have an array collection and I am trying to find the Min/Max of the
values in groups. For Example my array collection has 100 values. I want
to find the Min Value/Max Value between 1 to 26, 2 to 27, 3 to 28 ,
etc I tried to create 2 for loops in each other but for some reason
during debugging/tracing it outputs wrong numbers, but if i do
breakpoint then step in. I get the correct values. So the question is is
there a better way than what i am doing. I am just trying to create a
Stochastic formula.




[flexcoders] Re: Flex Browse File

2009-07-01 Thread reversible_82
This is bad. the only way I think I can get around this is using an
applet inside an html  wrapper inside a cotainer object.

Thanks.

--- In flexcoders@yahoogroups.com, Adrian Resa Jones noregret...@...
wrote:

 Annoyingly enough, it appears that you can't get the path in Flex,
only in Air for security reasons I guess.
 --- In flexcoders@yahoogroups.com, reversible_82 reversible_82@
wrote:
 
  Thanks, but what I'm trying to accomplish is get the String with the
  folder path,
  for example: D:/Files/Pic,  with FileReference.browse(); I
select
  the folder,
  so how could I get the String of the folder path...
 





[flexcoders] Re: Flex Browse File

2009-07-01 Thread Adrian Resa Jones
PLEASE let me know if you come up with a solution! Thank you!
A. Resa Jones
--- In flexcoders@yahoogroups.com, reversible_82 reversible...@... wrote:

 This is bad. the only way I think I can get around this is using an
 applet inside an html  wrapper inside a cotainer object.
 
 Thanks.
 
 --- In flexcoders@yahoogroups.com, Adrian Resa Jones noregrets62@
 wrote:
 
  Annoyingly enough, it appears that you can't get the path in Flex,
 only in Air for security reasons I guess.
  --- In flexcoders@yahoogroups.com, reversible_82 reversible_82@
 wrote:
  
   Thanks, but what I'm trying to accomplish is get the String with the
   folder path,
   for example: D:/Files/Pic,  with FileReference.browse(); I
 select
   the folder,
   so how could I get the String of the folder path...
  
 





[flexcoders] getting the xml data from a dispatched event

2009-07-01 Thread Jason B
I've got an problem when the user clicks on button Add to Meal it throws an 
error because it can't seem to reference the data in mealDetails object inside 
the com/ directory? 

I'm trying to add the item to the list control.

I have the code located here in case you want more details
http://files.getdropbox.com/u/228472/mealsflex.zip


[Bindable]
private var customMeals:ArrayCollection = new ArrayCollection;

//throws error on this line 
customMeals.addItem((event.target as mealitem).mealDetails);




?xml version=1.0 encoding=utf-8?
mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; width=310 height=320 
 title={mealDetails.title} horizontalAlign=center


mx:Metadata
[Event(name=addToMeal)]   
[Event(name=learnAboutThis)]  
/mx:Metadata

mx:Script
![CDATA[
import mx.controls.Alert;

[Bindable]
public var mealDetails:Object;


private function calldispatch():void {
parentApplication.createmeals_loadswf_var = 
mealDetails.swf;
dispatchEvent(new Event('learnAboutThis', 
true));

}

]]
/mx:Script

mx:Image source={'/uploads/nutrition/' + mealDetails.imgsource } 
width=285 height=159/

mx:Label text={mealDetails.serving}/

mx:Button label=Add to Meal click=dispatchEvent(new 
Event('addToMeal', true))/ 

mx:Button label=Learn About This click=calldispatch()/

/mx:Panel




Re: [flexcoders] getting the xml data from a dispatched event

2009-07-01 Thread Sam Lai
I'd add a trace statement just before it to see what type of object
event.target is - it could be that the target is the UI component, and
not the data object.

//throws error on this line
trace(event.target);
customMeals.addItem((event.target as mealitem).mealDetails);

2009/7/2 Jason B nos...@advancedonsite.com:
 I've got an problem when the user clicks on button Add to Meal it throws an 
 error because it can't seem to reference the data in mealDetails object 
 inside the com/ directory?

 I'm trying to add the item to the list control.

 I have the code located here in case you want more details
 http://files.getdropbox.com/u/228472/mealsflex.zip


 [Bindable]
 private var customMeals:ArrayCollection = new ArrayCollection;

 //throws error on this line
 customMeals.addItem((event.target as mealitem).mealDetails);




 ?xml version=1.0 encoding=utf-8?
 mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; width=310 height=320
         title={mealDetails.title} horizontalAlign=center


        mx:Metadata
                [Event(name=addToMeal)]
                [Event(name=learnAboutThis)]
        /mx:Metadata

        mx:Script
                ![CDATA[
                        import mx.controls.Alert;

                        [Bindable]
                        public var mealDetails:Object;


                        private function calldispatch():void {
                                parentApplication.createmeals_loadswf_var = 
 mealDetails.swf;
                                dispatchEvent(new Event('learnAboutThis', 
 true));

                        }

                ]]
        /mx:Script

        mx:Image source={'/uploads/nutrition/' + mealDetails.imgsource } 
 width=285 height=159/

        mx:Label text={mealDetails.serving}/

        mx:Button label=Add to Meal click=dispatchEvent(new 
 Event('addToMeal', true))/

        mx:Button label=Learn About This click=calldispatch()/

 /mx:Panel




 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links






Re: [flexcoders] Audio recording using AIR

2009-07-01 Thread Kevin Carlson
Thanks to Zach and Jeffry!  Looks like Aviary plans to release an open API for 
audio editing - hopefully a Flex component is not too far away...
 
http://www.downloadsquad.com/2009/06/10/aviary-launches-firefox-plugin-for-image-editing-audio-editor-c?icid=sphere_blogsmith_inpage_downloadsquad


--- On Wed, 7/1/09, Zach Stepek z...@cravemg.com wrote:


From: Zach Stepek z...@cravemg.com
Subject: Re: [flexcoders] Audio recording using AIR
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Date: Wednesday, July 1, 2009, 9:22 AM









Digimix was acquired, and though I'm not 100% sure, I think it was Aviary that 
made the acquisition. It did what you're lookin to do, but without the FMS and 
Red 5 component. I'm not sure that there are FOSS, or even licensable options 
for AS3 audio encoding, but here are a few other thoughts. 


You may want to take a look at Alchemy for this, now that it's available, as 
you may be able to get a C library for audio encoding to run in AIR. Ogg Vorbis 
is one of the sample libraries on Labs. Also, if you're going to have the 
server capabilities there anyway, you could send to the server to encode, and 
deliver the file back to the client. Or use Merapi to have Java do the 
encoding. Not sure if any of these fit your use case, but I hope they help. 


- Zach

On Jul 1, 2009, at 7:48 AM, Jeffry Houser j...@farcryfly. com wrote:







 I'm not sure of complete specifics, but I thought Ribbit supported something 
like this  Wasn't sure if they support computer mics or you have to use a 
phone.  
 AudioSpike may support something like this, I'm not sure.  
 I thought Digimix also did this sort of thing, but I have no idea if it ever 
got a release.


Kevin Carlson wrote: 




Hello,

I'd like to develop an AIR application which allows users to make audio 
recordings on their PC with a USB microphone, then either store the audio files 
locally (for later upload) or stream using Flash Media Server or Red5.

Is this feasible?  Any commercial products to facilitate this?  

Thanks!
Kevin




-- 
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl. com/684b5h
http://www.twitter. com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras .com?c=104
--
http://www.theflexs how.com
http://www.jeffryho user.com
--
Part of the DotComIt Brain Trust
















  

[flexcoders] Item Renderer doesn't work with just one Item :-(

2009-07-01 Thread Nate Pearson
I have a custom item render on a bar chart.  

When my the data provider for my bar chart has just one item in it the set data 
function is never gets called.  Updatedisplaylist doesn't trigger and my bar 
chart is blank.

Any ideas?  I've had this bug for a while but I need to figure it out now.

Thanks!

-Nate



[flexcoders] Re: Time Difference between two columns in DataGrid using itemrenderer

2009-07-01 Thread Don Kerr
Thanks everyone.  Never really could find an easy was to do it in Flex, so I 
opted for the ease of ColdFusion to get it done quickly on the server side.  
Two easy CF functions, ParseDateTime and DateDiff.

Good news is Flash Builder adds some of the ease of ColdFusion, including CF 
tags, into Flex! Awesome stuff.

Don Kerr



--- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote:

 I think you would find it better to do the calculation on the database itself.
 
 All database have a lot of date/time diff functions which you can use. That 
 way, you all simply bind the data retrieved in your datagrid without the need 
 for calculating it.
 
 hth
 
 
 
 
 
 From: Don Kerr fusionp...@...
 To: flexcoders@yahoogroups.com
 Sent: Monday, 29 June, 2009 8:51:22
 Subject: [flexcoders] Time Difference between two columns in DataGrid using 
 itemrenderer
 
 
 
 
 
 I have two columns in a datadrid, startTime (e.g. 04:30 PM) and endTime (e.g. 
 06:00 PM). Both are strings and  varchar in the database.
 
 I want to add a column to the datagrid that displays the difference between 
 these two times expressed in hours (e.g. 1.5 Hours).
 
 I'm trying to use an itemrenderer to do this calculation, but I've yet to be 
 successful.  Having trouble converting the strings to date, then calculate 
 the hours.  Can anyone help?
 
 Thanks,
 Don





Re: [flexcoders] Re: Web Service Question (Help!)

2009-07-01 Thread Angelo Anolin
Hi Valdhor,
I think you are quite right. Seems that the ArrayCollection which I am passing 
is becoming NULL or does not contain any value.  Although I ensure from my web 
service that there are no fields in my dataset which I am passing back as an 
XML string to my flex application.  

I tried to utilize Alert.show(event.fault.getStackTrace().toString); to show 
the error, but nothing comes up.

I wonder how I can make a trace on my arrayCollection?  As of now, am using 
only the compiler and plugging the SWF object inside my asp.net page.


Thanks a lot.

Regards,

Angelo





From: valdhor valdhorli...@embarqmail.com
To: flexcoders@yahoogroups.com
Sent: Thursday, 2 July, 2009 1:01:23
Subject: [flexcoders] Re: Web Service Question (Help!)





Error 1009 is Cannot access a property or method of a null object reference.. 
Try calling event.fault. getStackTrace( ) in the fault handler to see what the 
problem is. You may have a null XML object returned.

--- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote:

 Hi FlexCoders,
 
 I am totally confused with the error I am having at the moment. Been banging 
 my head on this for the past 3 hours..
 
 In one of my function, I am trying to call a WebService method passing an 
 ArrayCollection.
 
 
 var svcDP:WebService = new WebService() ;
 svcDP.addEventListe ner(ResultEvent. RESULT, getRH);
 svcDP.addEventListe ner(FaultEvent. FAULT, getFH);
 svcDP.loadWSDL( _appWebService) ;
 svcDP.Method2( myArrayColl) ;
 
 Calling the webservice, I always get an error, which is defined in the 
 faulthandler event, registering Error 1009.
 
 But when I do another web service call before the Method2, say:
 
 var svcDP:WebService = new WebService() ;
 svcDP.addEventListe ner(ResultEvent. RESULT, getRH);
 svcDP.addEventListe ner(FaultEvent. FAULT, getFH);
 svcDP.loadWSDL( _appWebService) ;
 svcDP.Method1( myArrayColl) ;
 svcDP.Method2( myArrayColl) ;
 
 The Method2 gets called (I know because am doing a trace on the web service).
 
 Now I don't have any idea why when only Method2 is called, the web service is 
 not triggered, but calling another webservice before it, the method is 
 triggered.
 
 Any idea?
 
 Thanks and regards,
 
 Angelo






  

[flexcoders] ArrayCollection Does Not Show Items In Order When Passed to .NET WebService

2009-07-01 Thread Angelo Anolin
Hi FlexCoders,

I have an array collection which I am populating as follows:

var oTemp:Object;
var xl:XMLList = _xmlData.children();
var i:int;
for(i = 0; i  xl.length(); i++)  
{
 oTemp = {ID_TAG:xl[i].ID.text(), CAT_TAG:xl[i].CAT.text(), 
DET_TAG:xl[i].DET.text(), REP_DATE_TAG:xl[i].REP_DATE.text(), 
IND_TAG:xl[i].IND.text()};
 arrDP.addItem(oTemp);
}

Now, when I pass back this Array Collection back into a web service, the fields 
are not in order as I have added them into the array collection.

I am expecting that in my Web Service, when I parse this arraycollection (via 
arraylist), I would be getting the same order of columns as I have added them, 
i.e. the first array in the array list would have element 0 to be the value I 
placed in the ID.

Since the arraylist does not have the field tag (represented by ID_TAG, 
DET_TAG, CAT_TAG, etc..), it becomes a trial and error (hit and miss) on my 
part since I can only reference the value via the index on the array.

Now, how would I be able to include the tags inside array collection such that 
when I read them as an array list in my .NET webservice, I know which element I 
am referring to in a particular index.

Thanks.

Regards,
Angelo


  

[flexcoders] Bitmap downsampling

2009-07-01 Thread Bjorn Schultheiss
Hi,

I'm having a lot of trouble with down-sampling a bitmapData.

I tried the smoothing option first

public function produceResizedBitmapData(image:DisplayObject, 
transform:Matrix):BitmapData
{
var temp:BitmapData = new BitmapData(image.width, image.height, true, 
0x00FF);
temp.draw(image);

var clone:BitmapData = new BitmapData(image.width*transform.a, 
image.height*transform.d, true, 0x00FF);
clone.draw(temp, transform, null, null, null, true);

temp.dispose();
return clone;
}

except the quality was poor, once the image was of a certain size.
For example scaling a 2500px image down to 200px.

I've tried using clevrLib plus a pixelBender bilinear sampler but no go.
I've noticed it works in picnik so it must be possible.

Can anyone push me in the right direction.



RE: [flexcoders] Bitmap downsampling

2009-07-01 Thread Tim Rowe
Bjorn,
Does the current method you're using appear to have any anti-aliasing at all?

In the past, resizing with Image using img.resize((height, width), 
Image.ANTIALIAS) (where img is mx.controls.Image) has worked - I'm sure there'd 
be a similar method for BitmapData.  Of course, if you're not specifying 
antialiasing and the method call doesn't assume it by default, then yeah, 
you're going to get horrible image quality on downsize as a typical algorithm 
will pick nearest-neighbor to the new target pixel.

--Tim


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Bjorn Schultheiss
Sent: Thursday, 2 July 2009 2:34 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Bitmap downsampling




Hi,

I'm having a lot of trouble with down-sampling a bitmapData.

I tried the smoothing option first

public function produceResizedBitmapData(image:DisplayObject, 
transform:Matrix):BitmapData
{
var temp:BitmapData = new BitmapData(image.width, image.height, true, 
0x00FF);
temp.draw(image);

var clone:BitmapData = new BitmapData(image.width*transform.a, 
image.height*transform.d, true, 0x00FF);
clone.draw(temp, transform, null, null, null, true);

temp.dispose();
return clone;
}

except the quality was poor, once the image was of a certain size.
For example scaling a 2500px image down to 200px.

I've tried using clevrLib plus a pixelBender bilinear sampler but no go.
I've noticed it works in picnik so it must be possible.

Can anyone push me in the right direction.