[flexcoders] Enable mousewheel function on spark List

2010-01-19 Thread j2me_soul
How can I enable the mousewheel event to the s:List ? 
Is the s:List have a property like verticalScrollPosition in mx:dataGrid
My code is created by flashcatalyst so all component have skinclass property, I 
don't wanna change the skin to css+picture. So how should I do?

Re: [flexcoders] TabNavigator Problem.

2010-01-19 Thread Tejas Patel
Done.
historyManagementEnabled property set to false has solve my problem.

Thanks Tibor.



From: Tejas Patel 
To: flexcoders@yahoogroups.com
Sent: Wed, 20 January, 2010 12:00:41 AM
Subject: Re: [flexcoders] TabNavigator Problem.

  
Thanks Tibor Ballai.

I set historyManagementEn abled to false. So text (app=e41e&7a01- 
selectedIndex= 0) is removed from URL.
But still '#' character is appear with application URL.






From: Tibor Ballai 
To: flexcod...@yahoogro ups.com
Sent: Tue, 19 January, 2010 10:59:18 PM
Subject: Re: [flexcoders] TabNavigator Problem.

  
Hi Tejas,

What you are seeing is Flex's default history management.
You can read about it here: 
http://livedocs. adobe.com/ flex/3/html/ help.html? content=deep_ linking_8. 
html

To disable it, you can set the TabNavigator' s historyManagementEn abled 
property to false.

Tibor.

www.tiborballai. com

Tejas Patel wrote:
> 
> I've used TabNavigator control in my flex application.
> When I run my application, looks perfect.
> But when i select any tab from TabNavigator control, Application URL 
> having some strange text.
> when i select second tab, it looks like this..
> http://localhost/ TestingControls- debug/TestingCon trols.html# app=e41e& 
> 7a01-selectedInd ex=1 
>  7a01-selectedInd ex=1>
>
> when i again select first tab, it looks like this..
> http://localhost/ TestingControls- debug/TestingCon trols.html# app=e41e& 
> 7a01-selectedInd ex=0 
>  7a01-selectedInd ex=0>
>
> Why this (#app=e41e&7a01- selectedIndex= 0) text comes with application URL?
> How to stop displaying this text?
>
>
>
>  - - - - - -
> The INTERNET now has a personality. YOURS! See your Yahoo! Homepage 
> .
> 



 The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
 


  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re:Re: [flexcoders] RemoveEventHandler issue

2010-01-19 Thread j2me_soul
Amazing!

So how can I know what the magic number after the __ID_handler_ I guess is ?

My codes is created by flash catalyst so I can't change each eventlistener to 
actionscript code. Is there a way to solve that ?


在2010-01-20 12:59:15,"Alex Harui"  写道:


 

CreationComplete only fires once so that handler probably isn’t getting removed 
either.

When you type: change=”mytext_changeHandler(event)”
The compiler generates code like this:
private function 
mytext_changeHandler_10423948(event:TextOperationEvent):void
{
mytext_changeHandler(event);
}

What is in the attribute is really the body of that generated code and it is 
not the handler itself.

On 1/19/10 5:34 PM, "j2me_soul"  wrote:




 
 
   

Can't remove the eventhandler which wrote in mxml.
 
   protected function mytext_changeHandler(event:TextOperationEvent):void
   {
TextInput(event.target).removeEventListener(event.type, 
mytext_changeHandler);
  }




 
   



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



Re: [flexcoders] RemoveEventHandler issue

2010-01-19 Thread Alex Harui
CreationComplete only fires once so that handler probably isn’t getting removed 
either.

When you type: change=”mytext_changeHandler(event)”
The compiler generates code like this:
private function 
mytext_changeHandler_10423948(event:TextOperationEvent):void
{
mytext_changeHandler(event);
}

What is in the attribute is really the body of that generated code and it is 
not the handler itself.

On 1/19/10 5:34 PM, "j2me_soul"  wrote:






Can't remove the eventhandler which wrote in mxml.

   protected function mytext_changeHandler(event:TextOperationEvent):void
   {
TextInput(event.target).removeEventListener(event.type, 
mytext_changeHandler);
  }









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


[flexcoders] Re: Flex, SOAP and Process Flow

2010-01-19 Thread Amy


--- In flexcoders@yahoogroups.com, "trefalgar"  wrote:
>
> --- In flexcoders@yahoogroups.com, "trefalgar"  wrote:
> >
> > --- In flexcoders@yahoogroups.com, "Amy"  wrote:
> > > I always use mx.rpc.Responder instead of AsyncResponder (is that a custom 
> > > class?).  There's a working example of using AsyncToken with AMFPHP here 
> > > http://flexdiary.blogspot.com/2009/01/lazy-loading-tree-example-file-posted.html
> > >  .  Maybe that will help you see something the docs aren't showing you.
> > 
> > var token:AsyncToken = myService.disableStatistics(user,pass,email,tArray);
> > token.info = email;
> > token.addResponder(new AsyncResponder(myResults,myFaults,token));
> 
> I forgot this little bit - using Responder over AsyncResponder. As far as I 
> can tell, it's not a custom class as it's included by default in the SDK. 

I've never used it, but I'm thinking it doesn't look as useful as a regular 
mx.rpc.Responder.  For one thing, it doesn't give you the 
ResultEvent/FaultEvent.  Instead, it gives you some odd sort of info object, 
that I wouldn't even know how to inspect, as no details are provided as to what 
that object will look like.

> As far as usage, if I use Responder over AsyncResponder, I get the following 
> error:
> 
> 1067: Implicit coercion of a value of type flash.net:Responder to an 
> unrelated type mx.rpc:IResponder.

Yeah, don't use flash.net.Responder.  Use mx.rpc.Responder.  That's why I 
included the full path.

> I'll see if I can figure that out, but AsyncTokens definitely don't seem to 
> like me.

Honestly, I'm not sure how it is that you don't see any difference between what 
I my example shows and what you're doing.  My fault/result method signatures 
are completely different--they have a different number of arguments and expect 
different data types.  These are the kind of details you need to train yourself 
to pick up on, or you're going to continue to find the documentation unhelpful.

Hope this clarifies;

Amy



[flexcoders] Re: Displaying additional child nodes in Datatip

2010-01-19 Thread turbo_vb
My pleasure Monette.

-TH

--- In flexcoders@yahoogroups.com, "Monette"  wrote:
>
> Tim,
> It works!!! Hooray!!! You Rock!!!
> Thank you so much for all your help.
> Monette
> --- In flexcoders@yahoogroups.com, "turbo_vb"  wrote:
> >
> > Three time's a charm:
> > 
> > var series:LineSeries = LineSeries( o.element );
> > var seriesIndex:int;
> > 
> > for ( seriesIndex = 0; seriesIndex < myChart.series.length; seriesIndex++ )
> > {
> > var lineSeries:LineSeries = myChart.series[ seriesIndex ] as LineSeries;
> > 
> > if ( lineSeries == series )
> > {
> > break;
> > }
> > }
> > 
> > -TH
> > 
> > --- In flexcoders@yahoogroups.com, "turbo_vb"  wrote:
> > >
> > > Cleaner:
> > > 
> > > private function dtFunction( o:HitData ):String
> > > {
> > >   var series:LineSeries = LineSeries( o.element ) as LineSeries;
> > >   var seriesIndex:int;
> > > 
> > >   for ( seriesIndex = 0; seriesIndex < myChart.series.length; 
> > > seriesIndex++ )
> > >   {
> > >   var lineSeries:LineSeries = myChart.series[ seriesIndex ] as 
> > > LineSeries;
> > > 
> > >   if ( lineSeries.displayName == series.displayName )
> > >   {
> > >   break;
> > >   }
> > >   }
> > > 
> > >   var s:String = "" + LineSeries( o.element ).displayName + "\n";
> > >   s += "Books: " + LineSeriesItem( o.chartItem ).yValue + "\n";
> > >   s += "Book rate: " + o.item.session[ seriesIndex ].bookrate + 
> > > "\n";
> > >   s += "Status: " + o.item.session[ seriesIndex ].status + "\n";
> > > 
> > >   return s;
> > > }
> > > 
> > > -TH
> > > 
> > > --- In flexcoders@yahoogroups.com, "turbo_vb"  wrote:
> > > >
> > > > So, maybe something like this:
> > > > 
> > > > private function dtFunction( o:HitData ):String
> > > > {
> > > > var series:LineSeries = LineSeries( o.element ) as LineSeries;
> > > > var seriesIndex:int;
> > > > 
> > > > for ( var a:int = 0; a < myChart.series.length; a++ )
> > > > {
> > > > var lineSeries:LineSeries = myChart.series[ a ] as 
> > > > LineSeries;
> > > > 
> > > > if ( lineSeries.displayName == series.displayName )
> > > > {
> > > > seriesIndex = a;
> > > > break;
> > > > }
> > > > }
> > > > 
> > > > var s:String = "" + LineSeries( o.element ).displayName + 
> > > > "\n";
> > > > s += "Books: " + LineSeriesItem( o.chartItem ).yValue + 
> > > > "\n";
> > > > s += "Book rate: " + o.item.session[ seriesIndex 
> > > > ].bookrate + "\n";
> > > > s += "Status: " + o.item.session[ seriesIndex ].status + 
> > > > "\n";
> > > > 
> > > > return s;
> > > > }
> > > > 
> > > > -TH
> > > > 
> > > > --- In flexcoders@yahoogroups.com, "turbo_vb"  wrote:
> > > > >
> > > > > Easy enough, create a dictionary (id or name) when the series's are 
> > > > > created; with the index.  And/Or you can get the count from 
> > > > > myChart.series.length.
> > > > > 
> > > > > -TH
> > > > > 
> > > > > --- In flexcoders@yahoogroups.com, "Monette"  wrote:
> > > > > >
> > > > > > This will work.  However, the series count is not limited to just 
> > > > > > "3" series, it's count is dynamic depending on the amount of data 
> > > > > > collected.  So the code needs to check how many series exists and 
> > > > > > then generate the datatip for the different series data points.  It 
> > > > > > is easy for me to accomplish this in VB.NET or vbscript but I am 
> > > > > > just having problems accomplishing what I need in AS.
> > > > > > 
> > > > > > --- In flexcoders@yahoogroups.com, "turbo_vb"  wrote:
> > > > > > >
> > > > > > > Ok, good.  Not sure exactly what you're trying to do, but it's 
> > > > > > > basically the same type of thing as the data function.  It's all 
> > > > > > > about getting to right data for the series.  Here's some code for 
> > > > > > > getting individual values and for calculating totals for the week
> > > > > > > 
> > > > > > > private function dtFunction( o:HitData ):String
> > > > > > > {
> > > > > > >   var seriesId:String = LineSeries( o.element ).id;
> > > > > > >   var seriesIndex:int;
> > > > > > > 
> > > > > > >   switch ( seriesId )
> > > > > > >   {
> > > > > > >   case "s0":
> > > > > > >   seriesIndex = 0;
> > > > > > >   break;
> > > > > > >   case "s1":
> > > > > > >   seriesIndex = 1;
> > > > > > >   break;
> > > > > > >   case "s2":
> > > > > > >   seriesIndex = 2;
> > > > > > >   break;
> > > > > > >   default:
> > > > > > >   break;
> > > > > > >   }
> > > > > > > 
> > > > > > >   var totalBooksForWeek:int = 0;
> > > > > > > 
> > > > > > >   for ( var a:int = 0; a < 3; a++ )
> > > > > > >   {
> > > > > > >   var sessionBooks:int = o.item.session[ a ].books;
> > > > > > >   totalBooksForWeek += sessionBo

[flexcoders] Problem losing values from query results to RESULT.DATA

2010-01-19 Thread charliecrystle
Weird issue: 

I have a query that works fine--produces expected results:
SELECT COUNT(tagsLU.tagid) as 'tagcount', tag.tagname as 'tagname' FROM TagsLU 
Inner Join tag on tag.tagid=tagslu.tagid Group By tag.tagname Order By tagcount 
DESC

which produces an array like this:

5 school
4 volunteer
2 casual
2 family
1 house
1 work

HOWEVER, when I retrieve through AS3 and run a trace, I get this:

 tag: casual; tagcount: 0
 tag: family; tagcount: 0
 tag: housework; tagcount: 0
 tag: school; tagcount: 0
 tag: volunteer; tagcount: 0
 tag: work; tagcount: 0

Here's the trace code:
...
var result:SQLResult = tagsStmt.getResult();
var numResults:int=result.data.length

for (var i:int = 0; i < numResults; i++) 
{ 
var row:Object = result.data[i]; 
var output:String =" tag: " + row.tagname; 
output += "; tagcount: " + row.tagcount; 
trace(output); 
} 

Any thoughts? I'm sooo close to finishing :)



[flexcoders] RemoveEventHandler issue

2010-01-19 Thread j2me_soul
Can't remove the eventhandler which wrote in mxml.
 
   protected function mytext_changeHandler(event:TextOperationEvent):void
   {
TextInput(event.target).removeEventListener(event.type, 
mytext_changeHandler);
   }
 


RE: [flexcoders] Escaping slashes in a file name in AIR

2010-01-19 Thread Jim Hayes
I have no idea if this actually would work, but something like this?

private var origUrl:String

private function saveFile():void
{
var f:File = new File();
origUrl = f.url;
f.addeventlistener(Event.SELECT,onfileselected)
f.browseForSave("blah");
}

private function onfileselected(event:Event)
{
var f:File = event.target as File;
// compare f.url with origUrl to get some sort of relative path in order to 
escape the path delimiters and save it as a file.

}

Sorry, I'm just off to bed or I'd run it up, but would be interested to know if 
it does work at all. Thanks!

putting a / in a filename, no matter how it's rendered by the OS seems pretty 
stupid to me, however.





-Original Message-
From: flexcoders@yahoogroups.com on behalf of seanmcmonahan
Sent: Tue 1/19/2010 7:04 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Escaping slashes in a file name in AIR
 
So this is a problem that's not really a problem yet it is.  I think it's best 
explained with an example:

A user wants to save a file so we open the save dialog box via 
File.browseForSave().  User then selects a folder "my folder" and types in a 
name like "my/file/with/slashes.txt" and hits the save button.

What happens is AIR interprets this as save a file "slashes.txt" in the folder 
"my folder/my/file/with".  To me this seems perfectly reasonable and correct.  
In fact, I would say this IS the correct behavior.  However my users feel that 
what should happen is that a file with the name "my/file/with/slashes.txt" 
should be saved out in "my folder".

I haven't tested on Windows but on Mac OS using Safari and Chrome the user's 
expected behavior is what happens.  In Firefox the slashes are converted to 
underscores.  This leads me to believe that these browsers are all getting the 
name back and escaping the slashes.

In AIR I'm not seeing anyway to get the filename and escape it as the select 
that is fired when the user clicks "save" returns a File object with a name 
property set to "slashes.txt" -- that is, whatever is after the last slash.

Does anyone know how to capture the filename and escape slashes or is that just 
not going to happen?



__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__<>

[flexcoders] Re: IGraphicElement and LayoutBase

2010-01-19 Thread Ariel J
Totally agree with you. I hate having to create a VGroup inside a Group just so 
I can draw a Rectangle as the background of the Group and still layout all the 
other children vertically, for example.

--- In flexcoders@yahoogroups.com, "Florian"  wrote:
>
> Yes, in that case i would expect the Displayobject to effecting the layout 
> and the measuring.
> 
> But that's not what we always want. Sometimes we just want to draw to the 
> graphics property of a component/container. It would be absurd to create a 
> GroupBase instance to "not layout" the instances like a VGroup and a Rect, 
> which should be the VGroups background.
> 
> So, Performance is no issue with the Flash Player anymore?
> 
> --- In flexcoders@yahoogroups.com, "Ariel J"  wrote:
> >
> > From the docs for IGraphicElement:
> > 
> > "Group organizes its IGraphicElement children in sequences that share and 
> > draw to the same DisplayObject. The DisplayObject is created by the first 
> > element in the sequence."
> > 
> > That means that there is a single DisplayObject added to the display list 
> > upon which the graphic primitives are drawn. I am sure this DisplayObject 
> > is subject to the behaviors of the layout of the Group, as in BasicLayout 
> > vs. VerticalLayout, just like any other child of the Group.
> > 
> > --- In flexcoders@yahoogroups.com, "Florian"  wrote:
> > >
> > > Ah, thanx. that clearifies a lot. But i don't understand why. I thought 
> > > the IGraphicElements would be a util class to draw complex shapes into 
> > > the owners graphic property. Which also means to me that the constraints 
> > > should applied to be bounds of the component...
> > > 
> > > What am i missing?
> > > 
> > > Best regards!
> > > 
> > > --- In flexcoders@yahoogroups.com, "Ariel J"  wrote:
> > > >
> > > > You can. It's just that the constraint based sizing of the inner rect 
> > > > doesn't work when you use a vertical layout. Change them to height and 
> > > > width values of 100% and you'll see.
> > > > 
> > > > --- In flexcoders@yahoogroups.com, "Florian"  wrote:
> > > > >
> > > > > 
> > > > > Why is it not possible to draw an IGraphicElement into a Group which 
> > > > > has
> > > > > a LayoutBase instance applied to it?
> > > > > 
> > > > > 
> > > > > 
> > > > > http://ns.adobe.com/mxml/2009";
> > > > > 
> > > > >xmlns:s="library://ns.adobe.com/flex/spark"
> > > > > 
> > > > >xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024"
> > > > > minHeight="768">
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >  > > > > top="0" />
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > > >
> > >
> >
>




[flexcoders] Re: Image Size

2010-01-19 Thread Amy


--- In flexcoders@yahoogroups.com, "criptopus"  wrote:
>
> Is it possible to find out the dimensions of an image without actually 
> loading the image?
> 
> I am going to use an image inline with a Text() object using the normal  src='xyz.png' etc and I have discovered it you state the height you also need 
> to state the width and if you state the width you have to state the height, 
> which is a pain it doesn't automatically scale one with the other.
> 
> - Stephen
>

How about 

var imgSrc:String = 'myImage_800_600.jpg'

var imgParts:Array = imgSrc.split('.');
imgParts = String(imgParts[0]).split('_');
var width:int = imgParts[1] as int;
var height:int = imgParts[2] as int;

if (width==0 || height==0) {
throw new Error('Improperly named image source');
}

HTH;

Amy



Re: [flexcoders] Combobox arrow width workaround

2010-01-19 Thread Warren
I ended up creating a skin for the combobox that restores this functionality 
and also adds the capability to turn of the vertical separator.  If anyone 
wants the skin, let me know and I'l post it.

Warren

  - Original Message - 
  From: Warren 
  To: flexcoders@yahoogroups.com 
  Sent: Monday, January 18, 2010 8:42 AM
  Subject: [flexcoders] Combobox arrow width workaround




  I'd like to be able to set the width of the ComboBox arrow.  There is a style 
for it (arrowButtonWidth) but it doesn't work.  It's a known issue/bug with the 
ComboBox.

  Does anyone have a workaround for this lack of functionality that would work 
in Flex3?

  Thanks!

  Warren

  

[flexcoders] Image Size

2010-01-19 Thread criptopus
Is it possible to find out the dimensions of an image without actually loading 
the image?

I am going to use an image inline with a Text() object using the normal 

[flexcoders] Re: Flex, SOAP and Process Flow

2010-01-19 Thread trefalgar
--- In flexcoders@yahoogroups.com, "trefalgar"  wrote:
>
> --- In flexcoders@yahoogroups.com, "Amy"  wrote:
> > I always use mx.rpc.Responder instead of AsyncResponder (is that a custom 
> > class?).  There's a working example of using AsyncToken with AMFPHP here 
> > http://flexdiary.blogspot.com/2009/01/lazy-loading-tree-example-file-posted.html
> >  .  Maybe that will help you see something the docs aren't showing you.
> 
> var token:AsyncToken = myService.disableStatistics(user,pass,email,tArray);
> token.info = email;
> token.addResponder(new AsyncResponder(myResults,myFaults,token));

I forgot this little bit - using Responder over AsyncResponder. As far as I can 
tell, it's not a custom class as it's included by default in the SDK. 

As far as usage, if I use Responder over AsyncResponder, I get the following 
error:

1067: Implicit coercion of a value of type flash.net:Responder to an unrelated 
type mx.rpc:IResponder.

I'll see if I can figure that out, but AsyncTokens definitely don't seem to 
like me.

Tref



[flexcoders] Escaping slashes in a file name in AIR

2010-01-19 Thread seanmcmonahan
So this is a problem that's not really a problem yet it is.  I think it's best 
explained with an example:

A user wants to save a file so we open the save dialog box via 
File.browseForSave().  User then selects a folder "my folder" and types in a 
name like "my/file/with/slashes.txt" and hits the save button.

What happens is AIR interprets this as save a file "slashes.txt" in the folder 
"my folder/my/file/with".  To me this seems perfectly reasonable and correct.  
In fact, I would say this IS the correct behavior.  However my users feel that 
what should happen is that a file with the name "my/file/with/slashes.txt" 
should be saved out in "my folder".

I haven't tested on Windows but on Mac OS using Safari and Chrome the user's 
expected behavior is what happens.  In Firefox the slashes are converted to 
underscores.  This leads me to believe that these browsers are all getting the 
name back and escaping the slashes.

In AIR I'm not seeing anyway to get the filename and escape it as the select 
that is fired when the user clicks "save" returns a File object with a name 
property set to "slashes.txt" -- that is, whatever is after the last slash.

Does anyone know how to capture the filename and escape slashes or is that just 
not going to happen?



Re: [flexcoders] TabNavigator Problem.

2010-01-19 Thread Tejas Patel
Thanks Tibor Ballai.

I set historyManagementEnabled to false. So text (app=e41e&7a01- selectedIndex= 
0) is removed from URL.
But still '#' character is appear with application URL.






From: Tibor Ballai 
To: flexcoders@yahoogroups.com
Sent: Tue, 19 January, 2010 10:59:18 PM
Subject: Re: [flexcoders] TabNavigator Problem.

  
Hi Tejas,

What you are seeing is Flex's default history management.
You can read about it here: 
http://livedocs. adobe.com/ flex/3/html/ help.html? content=deep_ linking_8. 
html

To disable it, you can set the TabNavigator' s historyManagementEn abled 
property to false.

Tibor.

www.tiborballai. com

Tejas Patel wrote:
> 
> I've used TabNavigator control in my flex application.
> When I run my application, looks perfect.
> But when i select any tab from TabNavigator control, Application URL 
> having some strange text.
> when i select second tab, it looks like this..
> http://localhost/ TestingControls- debug/TestingCon trols.html# app=e41e& 
> 7a01-selectedInd ex=1 
>  7a01-selectedInd ex=1>
>
> when i again select first tab, it looks like this..
> http://localhost/ TestingControls- debug/TestingCon trols.html# app=e41e& 
> 7a01-selectedInd ex=0 
>  7a01-selectedInd ex=0>
>
> Why this (#app=e41e&7a01- selectedIndex= 0) text comes with application URL?
> How to stop displaying this text?
>
>
>
>  - - - - - -
> The INTERNET now has a personality. YOURS! See your Yahoo! Homepage 
> .
> 


 


  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

[flexcoders] Re: Flex, SOAP and Process Flow

2010-01-19 Thread trefalgar
--- In flexcoders@yahoogroups.com, "Amy"  wrote:
> I always use mx.rpc.Responder instead of AsyncResponder (is that a custom 
> class?).  There's a working example of using AsyncToken with AMFPHP here 
> http://flexdiary.blogspot.com/2009/01/lazy-loading-tree-example-file-posted.html
>  .  Maybe that will help you see something the docs aren't showing you.

Thanks for the tip, Amy, but it doesn't look any different than what I have. 
Additionally, I didnt see any change in behavior from SDK 3.1 to SDK 3.5.

Intentionally brief, here:

import mx.rpc.AsyncToken;
import mx.rpc.AsyncResponder;

var token:AsyncToken = myService.disableStatistics(user,pass,email,tArray);
token.info = email;
token.addResponder(new AsyncResponder(myResults,myFaults,token));

private function myResults(event:Object, token:AsyncToken):void {
var resultEvent:ResultEvent = ResultEvent(event);
}
private function myFaults(event:Object, token:AsyncToken):void {
var faultEvent:FaultEvent = FaultEvent(event);
}

disableStatistics is called, and executes correctly. I see the reply coming 
back in but neither myResults nor myFaults is ever called. If I add a listener 
...

myService.adddisableStatisticsEventListener(myResultHandlingFunction);

... the listener's result function is called, but I have no token data from the 
AsyncToken/AsyncResponder. 

Could the problem be due to AsyncTokens being used within the Flex generated 
coded based off the WSDL? ie, wrapping AsyncToken calls around other AsyncToken 
calls?

Tref



Re: [flexcoders] TabNavigator Problem.

2010-01-19 Thread Tibor Ballai
Hi Tejas,

What you are seeing is Flex's default history management.
You can read about it here: 
http://livedocs.adobe.com/flex/3/html/help.html?content=deep_linking_8.html

To disable it, you can set the TabNavigator's historyManagementEnabled 
property to false.

Tibor.

www.tiborballai.com

Tejas Patel wrote:
>  
> I've used TabNavigator control in my flex application.
> When I run my application, looks perfect.
> But when i select any tab from TabNavigator control, Application URL 
> having some strange text.
> when i select second tab, it looks like this..
> http://localhost/TestingControls-debug/TestingControls.html#app=e41e&7a01-selectedIndex=1
>  
> 
>
> when i again select first tab, it looks like this..
> http://localhost/TestingControls-debug/TestingControls.html#app=e41e&7a01-selectedIndex=0
>  
> 
>
> Why this (#app=e41e&7a01-selectedIndex=0) text comes with application URL?
> How to stop displaying this text?
>
>
>
> 
> The INTERNET now has a personality. YOURS! See your Yahoo! Homepage 
> .
> 



[flexcoders] TabNavigator Problem.

2010-01-19 Thread Tejas Patel
I've used TabNavigator control in my flex application.
When I run my application, looks perfect.
But when i select any tab from TabNavigator control, Application URL having 
some strange text.
when i select second tab, it looks like this..
http://localhost/TestingControls-debug/TestingControls.html#app=e41e&7a01-selectedIndex=1

when i again select first tab, it looks like this..
http://localhost/TestingControls-debug/TestingControls.html#app=e41e&7a01-selectedIndex=0

Why this (#app=e41e&7a01-selectedIndex=0) text comes with application URL?
How to stop displaying this text?


  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: [flexcoders] Re: A popupbutton without arrow?

2010-01-19 Thread Leonardo Camargo
Yep! But I had already figured it out myself.. :)
Thanks anyway


2010/1/19 peeyushtuli 

>
>
>
>
> Are you looking for something similar to this?
> http://www.metadesignsolutions.com/samples/flex/popbutton/controls.html
>
>
> --- In flexcoders@yahoogroups.com , Leonardo
> Camargo  wrote:
> >
> > Hi folks, I'm looking for ideas... I need to have a button(skinnned with
> an
> > icon), that when clicked will show a "layer" with two options, pretty
> much
> > like a combobox or a popupbutton. But I need the button to be, "clean",
> > without the arrow.
> >
> > Any Ideas on how to go about doing this?
> >
> > Regards,
> > Leonardo C.
> >
>
>  
>


[flexcoders] Re: Flex, SOAP and Process Flow

2010-01-19 Thread trefalgar
Thanks for this post. I thought I had updated to SDK 3.3, but it looks like my 
default was still 3.1. I updated Flex Builder to use the 3.3 SDK and I'll give 
it all a second try.

I'll also take a look at Amy's URL, to make sure I'm doing things in a kosher 
manner.

Tref

--- In flexcoders@yahoogroups.com, "peeyushtuli"  wrote:
>
> Asynctokens do work. I havent seen a single case of the handlers not being 
> invoked being linked to some bug in flex sdk. Can you please post some code 
> snippets of how exactly you used the asynctoken and mention the flex sdk?
> 
> 
> --- In flexcoders@yahoogroups.com, "trefalgar"  wrote:
> >
> > I've given up for now. 
> > 
> > AsyncTokens appear to be the way to go, but by the documentation I've seen 
> > it *should* work, but the result/fault handlers are never hit. I decided to 
> > try using 'closure' instead - I'm not even sure if the variables will 
> > remain stateful, but it's at least in a forward direction for now.
> > 
> > I think this is another case of the documentation being abysmally lacking.
> > 
> > Tref
> > 
> > --- In flexcoders@yahoogroups.com, "trefalgar"  wrote:
> > >
> > > Yeap, looking at that now and having little luck as well.
> > > 
> > > http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Flex/Q_23313753.html,
> > >  for example, shows someone with a similar problem with a similar 
> > > solution. Here's what I've got ...
> > > 
> > > var myService:Statistics = new Statistics(null,endPoint);
> > > var token:AsyncToken = 
> > > myService.disableStatistics(user,pass,email,tArray);
> > > token.email = email;
> > > token.addResponder(new AsyncResponder(myResults,myFaults,token)); 
> > > 
> > > myResults and myFaults are never hit. If I use addEventListener against 
> > > myService instead, I get the resulting data, but nothing from the 
> > > token:AsyncToken. 
> > > 
> > > I'm not comfortable that I have the AsyncToken set up properly, since it 
> > > doesnt make sense to make the call to myService before 'email' or 
> > > 'addResponder' is issued, which is what I'm playing with right now.
> > > 
> > > Treffy
> > > 
> > > 
> > > --- In flexcoders@yahoogroups.com, João Fernandes 
> > >  wrote:
> > > >
> > > > You can add a responder to your AsyncToken which will carry your fault 
> > > > and
> > > > result handlers.
> > > > 
> > > > 2010/1/18 trefalgar 
> > > > 
> > > > >
> > > > >
> > > > > For those wanting to follow this suggestion, there's a good example 
> > > > > here:
> > > > > http://livedocs.adobe.com/flex/3/html/help.html?content=data_4.html. 
> > > > > It's
> > > > > towards the bottom, "Using a return token".
> > > > >
> > > > > Unfortunately, this example doesn't appear to work for me. It uses the
> > > > > Flex-built SOAP code and an AsyncToken to keep track of things. I 
> > > > > don't have
> > > > > a FaultEvent.FAULT or ResultEvent.RESULT option when adding an event
> > > > > listener to my AsyncToken.
> > > > >
> > > > > Back to the drawing board I go.
> > > > >
> > > > > Jacob
> > > > >
> > > > >
> > > > > --- In flexcoders@yahoogroups.com , João
> > > > > Fernandes  wrote:
> > > > > >
> > > > > > > That said, since #2 doesn't tell me what user it's replying "no" 
> > > > > > > to,
> > > > > > > if I do this in a loop with 100 users, it could be replying back 
> > > > > > > with
> > > > > > > 20 "no"s and I can't tell how I'd match the replies up with the
> > > > > requests.
> > > > > > Yes you can, try using the asyncToken generated by
> > > > > > service.invokeWs(user) and store your user in some property (eg.
> > > > > > currentUser) , once you get the resultEvent, that AsyncToken will 
> > > > > > have
> > > > > > the corresponding user stored (event.token.currentUser).
> > > > > >
> > > > > > --
> > > > > >
> > > > > > João Fernandes
> > > > > >
> > > > > > Adobe Certified Expert
> > > > > > Adobe Community Expert
> > > > > > http://www.twitter.com/joaofernandes
> > > > > > http://www.riapt.org
> > > > > > Portugal Adobe User Group (http://aug.riapt.org)
> > > > > >
> > > > >
> > > > >  
> > > > >
> > > > 
> > > > 
> > > > 
> > > > -- 
> > > > 
> > > > João Fernandes
> > > >
> > >
> >
>




[flexcoders] Setting Audio Output - is it possible to assigned audio outpu?

2010-01-19 Thread Eric Dunn
Is it possible to get a list of audio output devices (speakers/headphones) 
similar to a list of input devices (microphone)? 

I have looked and not finding any love... any ideas? 

Eric W Dunn 
Adaption Technologies 
281-465-3326 
ed...@adpt-tech.com 


[flexcoders] Re: skinning and validation

2010-01-19 Thread peeyushtuli
I googled around a lot for this but could not find a solution anywhere. So I 
decided to solve it on my own by subclassing textinput control and a new style 
called errorskin. I have posted the link if it helps somebody, with view source 
enabled.
http://www.metadesignsolutions.com/samples/flex/errorskin/ErrorSkin.html


--- In flexcoders@yahoogroups.com, Toby Tremayne  wrote:
>
> Hi Tim,
> 
>   On the text field if I remove the focusSkin yes, it then uses the red  
> border as it should.  But on the combo box and numeric stepper I can  
> confirm that the validation is working fine - when I mouse over the  
> field it still brings up the red tooltip to the right hand side, it's  
> just not giving me the outline on the control itself.  And importantly  
> you can see from the css below that my combo box doesn't even have a  
> focusskin specified.
> 
>   I've discovered that if I use the tab button to move focus onto the  
> combobox after validation has failed, then the focus border appears  
> and is red - but it won't appear by itself.
> 
>   I would have assumed that you could provide a focusskin and then the  
> component would still draw the red border, but I can't find any  
> references for it.  Can anyone tell me how to do this?  There doesn't  
> seem to be a skin option for the error border itself.
> 
> Toby
> On 30/07/2008, at 3:42 PM, Tim Hoff wrote:
> 
> > Hi Toby,
> >
> > For drawing the error border, flex uses the Focus Manager. If you
> > use a focusSkin, it lloks like it over-rides the focus rectangle
> > drawn with the errorColor. Try taking that skin out, to see if it
> > comes back. Don't know about the comboBox. Have you verified that
> > the validation failure is actually setting the errorString? You can
> > try this; to find out if it's a skin or logic problem:
> >
> > 
> >
> > -TH
> >
> > --- In flexcoders@yahoogroups.com, Toby Tremayne  wrote:
> > >
> > > Hi all,
> > >
> > > I've googled but every time I find someone with the same
> > problem the
> > > questions seem to go unanswered...
> > >
> > > I have skins applied to a flex app and I'm having an issue
> > where for
> > > most elements the red border doesn't show up when validation
> > fails.
> > > For example, I have this in my css file:
> > >
> > > TextInput
> > > {
> > > borderSkin: Embed(source="TextInput.swf",
> > > symbol="TextInput_borderSkin");
> > > focusSkin: Embed(source="TextInput.swf",
> > symbol="TextInput_focusSkin");
> > > }
> > > ComboBox
> > > {
> > > disabledSkin: Embed(source="ComboBox.swf",
> > > symbol="ComboBox_disabledSkin");
> > > downSkin: Embed(source="ComboBox.swf",
> > symbol="ComboBox_downSkin");
> > > editableDisabledSkin: Embed(source="ComboBox.swf",
> > > symbol="ComboBox_editableDisabledSkin");
> > > editableDownSkin: Embed(source="ComboBox.swf",
> > > symbol="ComboBox_editableDownSkin");
> > > editableOverSkin: Embed(source="ComboBox.swf",
> > > symbol="ComboBox_editableOverSkin");
> > > editableUpSkin: Embed(source="ComboBox.swf",
> > > symbol="ComboBox_editableUpSkin");
> > > overSkin: Embed(source="ComboBox.swf",
> > symbol="ComboBox_overSkin");
> > > upSkin: Embed(source="ComboBox.swf",
> > symbol="ComboBox_upSkin");
> > > }
> > >
> > > And neither combobox nor textinput show the red validation border
> > when
> > > validation fails. What am I missing? Is there a way to specify
> > an
> > > error border skin or something? Or should there be some way in
> > the
> > > skin file to add an error border?
> > >
> > > cheers,
> > > Toby
> > > ---
> > >
> > > Life is poetry, write it in your own words
> > >
> > > ---
> > >
> > > Toby Tremayne
> > > CEO
> > > Code Poet and Zen Master of the Heavy Sleep
> > > Lyricist Software
> > > 0416 048 090
> > > ICQ: 13107913
> > >
> >
> >
> > 
> 
> ---
> 
> Life is poetry, write it in your own words
> 
> ---
> 
> Toby Tremayne
> CEO
> Code Poet and Zen Master of the Heavy Sleep
> Lyricist Software
> 0416 048 090
> ICQ: 13107913
>




[flexcoders] itemRenderer in dynamically generated DataGrid

2010-01-19 Thread Mlist
Hi,

I need an itemRenderer in my DataGrid (id: dgDataGrid) so it displays two
different strings (string1 and string2 - see the explanation part for more
info about how these strings are defined in the array). I have created the
itemRenderer as mxml, with HBox wrapping two labels. How can I populate
their text values, considering that the function for creating columns in the
dgDataGrid is as follow:

private function updateDataGrid():void 
{
var aDataGridColumns:Array = new Array();

for (var i:uint = 0; i < _aYears.length; i++)
{
var dgcDataGridColumn:DataGridColumn = new DataGridColumn(
_aYears[i] );
dgcDataGridColumn.headerText = String( _aYears[i] );
aDataGridColumns.push( dgcDataGridColumn );
} 
   
dgDataGrid.columns = aDataGridColumns;
}


Explanation:

- _aYears is an array storing years, eg. 2002, 2003, 2004,
- dataProvider for the dgDataGrid is set to _acData, which is an array
collection wrapping aData array,
- data in aData array can be accessed as 

aData[sYear] = aYearDetails;

where aYearDetails is created as:

aYearDetails.push({ string1:string1Value, string2:string2Value })


Thanks!
Greg





[flexcoders] Re: Flex, SOAP and Process Flow

2010-01-19 Thread peeyushtuli
Asynctokens do work. I havent seen a single case of the handlers not being 
invoked being linked to some bug in flex sdk. Can you please post some code 
snippets of how exactly you used the asynctoken and mention the flex sdk?


--- In flexcoders@yahoogroups.com, "trefalgar"  wrote:
>
> I've given up for now. 
> 
> AsyncTokens appear to be the way to go, but by the documentation I've seen it 
> *should* work, but the result/fault handlers are never hit. I decided to try 
> using 'closure' instead - I'm not even sure if the variables will remain 
> stateful, but it's at least in a forward direction for now.
> 
> I think this is another case of the documentation being abysmally lacking.
> 
> Tref
> 
> --- In flexcoders@yahoogroups.com, "trefalgar"  wrote:
> >
> > Yeap, looking at that now and having little luck as well.
> > 
> > http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Flex/Q_23313753.html,
> >  for example, shows someone with a similar problem with a similar solution. 
> > Here's what I've got ...
> > 
> > var myService:Statistics = new Statistics(null,endPoint);
> > var token:AsyncToken = myService.disableStatistics(user,pass,email,tArray);
> > token.email = email;
> > token.addResponder(new AsyncResponder(myResults,myFaults,token)); 
> > 
> > myResults and myFaults are never hit. If I use addEventListener against 
> > myService instead, I get the resulting data, but nothing from the 
> > token:AsyncToken. 
> > 
> > I'm not comfortable that I have the AsyncToken set up properly, since it 
> > doesnt make sense to make the call to myService before 'email' or 
> > 'addResponder' is issued, which is what I'm playing with right now.
> > 
> > Treffy
> > 
> > 
> > --- In flexcoders@yahoogroups.com, João Fernandes 
> >  wrote:
> > >
> > > You can add a responder to your AsyncToken which will carry your fault and
> > > result handlers.
> > > 
> > > 2010/1/18 trefalgar 
> > > 
> > > >
> > > >
> > > > For those wanting to follow this suggestion, there's a good example 
> > > > here:
> > > > http://livedocs.adobe.com/flex/3/html/help.html?content=data_4.html. 
> > > > It's
> > > > towards the bottom, "Using a return token".
> > > >
> > > > Unfortunately, this example doesn't appear to work for me. It uses the
> > > > Flex-built SOAP code and an AsyncToken to keep track of things. I don't 
> > > > have
> > > > a FaultEvent.FAULT or ResultEvent.RESULT option when adding an event
> > > > listener to my AsyncToken.
> > > >
> > > > Back to the drawing board I go.
> > > >
> > > > Jacob
> > > >
> > > >
> > > > --- In flexcoders@yahoogroups.com , João
> > > > Fernandes  wrote:
> > > > >
> > > > > > That said, since #2 doesn't tell me what user it's replying "no" to,
> > > > > > if I do this in a loop with 100 users, it could be replying back 
> > > > > > with
> > > > > > 20 "no"s and I can't tell how I'd match the replies up with the
> > > > requests.
> > > > > Yes you can, try using the asyncToken generated by
> > > > > service.invokeWs(user) and store your user in some property (eg.
> > > > > currentUser) , once you get the resultEvent, that AsyncToken will have
> > > > > the corresponding user stored (event.token.currentUser).
> > > > >
> > > > > --
> > > > >
> > > > > João Fernandes
> > > > >
> > > > > Adobe Certified Expert
> > > > > Adobe Community Expert
> > > > > http://www.twitter.com/joaofernandes
> > > > > http://www.riapt.org
> > > > > Portugal Adobe User Group (http://aug.riapt.org)
> > > > >
> > > >
> > > >  
> > > >
> > > 
> > > 
> > > 
> > > -- 
> > > 
> > > João Fernandes
> > >
> >
>




[flexcoders] Re: A popupbutton without arrow?

2010-01-19 Thread peeyushtuli


Are you looking for something similar to this?
http://www.metadesignsolutions.com/samples/flex/popbutton/controls.html



--- In flexcoders@yahoogroups.com, Leonardo Camargo  wrote:
>
> Hi folks, I'm looking for ideas... I need to have a button(skinnned with an
> icon), that when clicked will show a "layer" with two options, pretty much
> like a combobox or a popupbutton. But I need the button to be, "clean",
> without the arrow.
> 
> Any Ideas on how to go about doing this?
> 
> Regards,
> Leonardo C.
>




[flexcoders] Re: Flex, SOAP and Process Flow

2010-01-19 Thread Amy


--- In flexcoders@yahoogroups.com, "trefalgar"  wrote:
>
> I've given up for now. 
> 
> AsyncTokens appear to be the way to go, but by the documentation I've seen it 
> *should* work, but the result/fault handlers are never hit. I decided to try 
> using 'closure' instead - I'm not even sure if the variables will remain 
> stateful, but it's at least in a forward direction for now.
> 
> I think this is another case of the documentation being abysmally lacking.

I always use mx.rpc.Responder instead of AsyncResponder (is that a custom 
class?).  There's a working example of using AsyncToken with AMFPHP here 
http://flexdiary.blogspot.com/2009/01/lazy-loading-tree-example-file-posted.html
 .  Maybe that will help you see something the docs aren't showing you.

HTH;

Amy



[flexcoders] Re: if (foo)

2010-01-19 Thread Amy


--- In flexcoders@yahoogroups.com, "ag_rcuren"  wrote:
>
> I once ran some tests to test this. What I found is that checking against 
> null is much faster. Sorry I do not have the test code around anymore but it 
> would be very simple to build again.
> 
> My guess as to why is that if (foo) is implicit and the conditional could be 
> met by a couple things. if foo was a boolean it being null or false would 
> cause the conditional to fail. If the object was a number it being null or <= 
> 0 would cause the condition to fail. So on and so forth.
> 
> When checking if (foo != null) you are explicitly checking if that object is 
> null not if that object is null or false, or 0, ect so this check is much 
> faster.
> 
> I also think if (foo != null) is better syntax to look at because I can tell 
> exactly what you are checking for, that is you are intersted in if foo is 
> null not that it is  == false or <= 0 or anything like that. I feel that if 
> (foo) is lazy.
> 
> So in the interest of speed and clean code you should always check for 
> exactly what you want.

I like this article on the subject by Josh McDonald 
http://flex.joshmcdonald.info/2009/03/on-using-iffoo-vs-iffoo-null.html



[flexcoders] Audio Issues

2010-01-19 Thread Eric Dunn
Can anyone point in the right direction.. I am having issues with echo in a 
voice mail player that I am building. 

I have read that Flash Player has this capability, but it is reserved for 
premium users... 


How should I go about coding for this issue? 

Eric W Dunn 
Adaption Technologies 
281-465-3326 
ed...@adpt-tech.com 


[flexcoders] Re: Displaying additional child nodes in Datatip

2010-01-19 Thread Monette
Tim,
It works!!! Hooray!!! You Rock!!!
Thank you so much for all your help.
Monette
--- In flexcoders@yahoogroups.com, "turbo_vb"  wrote:
>
> Three time's a charm:
> 
> var series:LineSeries = LineSeries( o.element );
> var seriesIndex:int;
> 
> for ( seriesIndex = 0; seriesIndex < myChart.series.length; seriesIndex++ )
> {
>   var lineSeries:LineSeries = myChart.series[ seriesIndex ] as LineSeries;
> 
>   if ( lineSeries == series )
>   {
>   break;
>   }
> }
> 
> -TH
> 
> --- In flexcoders@yahoogroups.com, "turbo_vb"  wrote:
> >
> > Cleaner:
> > 
> > private function dtFunction( o:HitData ):String
> > {
> > var series:LineSeries = LineSeries( o.element ) as LineSeries;
> > var seriesIndex:int;
> > 
> > for ( seriesIndex = 0; seriesIndex < myChart.series.length; 
> > seriesIndex++ )
> > {
> > var lineSeries:LineSeries = myChart.series[ seriesIndex ] as 
> > LineSeries;
> > 
> > if ( lineSeries.displayName == series.displayName )
> > {
> > break;
> > }
> > }
> > 
> > var s:String = "" + LineSeries( o.element ).displayName + "\n";
> > s += "Books: " + LineSeriesItem( o.chartItem ).yValue + "\n";
> > s += "Book rate: " + o.item.session[ seriesIndex ].bookrate + 
> > "\n";
> > s += "Status: " + o.item.session[ seriesIndex ].status + "\n";
> > 
> > return s;
> > }
> > 
> > -TH
> > 
> > --- In flexcoders@yahoogroups.com, "turbo_vb"  wrote:
> > >
> > > So, maybe something like this:
> > > 
> > > private function dtFunction( o:HitData ):String
> > > {
> > >   var series:LineSeries = LineSeries( o.element ) as LineSeries;
> > >   var seriesIndex:int;
> > > 
> > >   for ( var a:int = 0; a < myChart.series.length; a++ )
> > >   {
> > >   var lineSeries:LineSeries = myChart.series[ a ] as LineSeries;
> > > 
> > >   if ( lineSeries.displayName == series.displayName )
> > >   {
> > >   seriesIndex = a;
> > >   break;
> > >   }
> > >   }
> > > 
> > >   var s:String = "" + LineSeries( o.element ).displayName + "\n";
> > >   s += "Books: " + LineSeriesItem( o.chartItem ).yValue + "\n";
> > >   s += "Book rate: " + o.item.session[ seriesIndex ].bookrate + 
> > > "\n";
> > >   s += "Status: " + o.item.session[ seriesIndex ].status + "\n";
> > > 
> > >   return s;
> > > }
> > > 
> > > -TH
> > > 
> > > --- In flexcoders@yahoogroups.com, "turbo_vb"  wrote:
> > > >
> > > > Easy enough, create a dictionary (id or name) when the series's are 
> > > > created; with the index.  And/Or you can get the count from 
> > > > myChart.series.length.
> > > > 
> > > > -TH
> > > > 
> > > > --- In flexcoders@yahoogroups.com, "Monette"  wrote:
> > > > >
> > > > > This will work.  However, the series count is not limited to just "3" 
> > > > > series, it's count is dynamic depending on the amount of data 
> > > > > collected.  So the code needs to check how many series exists and 
> > > > > then generate the datatip for the different series data points.  It 
> > > > > is easy for me to accomplish this in VB.NET or vbscript but I am just 
> > > > > having problems accomplishing what I need in AS.
> > > > > 
> > > > > --- In flexcoders@yahoogroups.com, "turbo_vb"  wrote:
> > > > > >
> > > > > > Ok, good.  Not sure exactly what you're trying to do, but it's 
> > > > > > basically the same type of thing as the data function.  It's all 
> > > > > > about getting to right data for the series.  Here's some code for 
> > > > > > getting individual values and for calculating totals for the week
> > > > > > 
> > > > > > private function dtFunction( o:HitData ):String
> > > > > > {
> > > > > > var seriesId:String = LineSeries( o.element ).id;
> > > > > > var seriesIndex:int;
> > > > > > 
> > > > > > switch ( seriesId )
> > > > > > {
> > > > > > case "s0":
> > > > > > seriesIndex = 0;
> > > > > > break;
> > > > > > case "s1":
> > > > > > seriesIndex = 1;
> > > > > > break;
> > > > > > case "s2":
> > > > > > seriesIndex = 2;
> > > > > > break;
> > > > > > default:
> > > > > > break;
> > > > > > }
> > > > > > 
> > > > > > var totalBooksForWeek:int = 0;
> > > > > > 
> > > > > > for ( var a:int = 0; a < 3; a++ )
> > > > > > {
> > > > > > var sessionBooks:int = o.item.session[ a ].books;
> > > > > > totalBooksForWeek += sessionBooks;
> > > > > > }
> > > > > > 
> > > > > > var s:String = "" + LineSeries( o.element ).displayName + 
> > > > > > "\n";
> > > > > > s += "Books: " + LineSeriesItem( o.chartItem ).yValue + 
> > > > > > "\n";
> > > > > > s += "Book rate: " + o.item.session[ seriesIndex 
> > > > > > ].bookrate + "\n";
> > > > > > s += "Status: " + o.item.session[ seriesIndex ].status + 
> > > > > > "

[flexcoders] Spark, FXG and composition - the performance black hole

2010-01-19 Thread Florian
I think i am going to start a new topic for the issue...

I ran into to the problem that i groups and graphic primitives wouldn't behave 
as expected when compositions are created, in more detail, when a layout is 
applied.

I now understand, that compared to Degrapha, there is no possibility to draw 
into the Group instance directly, but to draw into a child of the component.

Which leads to the following: unnecessary nesting from Groups and unnecessary 
remeasureing.

Creating:



Just for a background of the VGroup is not really a clever way performance wise.





[flexcoders] Re: IGraphicElement and LayoutBase

2010-01-19 Thread Florian
Yes, in that case i would expect the Displayobject to effecting the layout and 
the measuring.

But that's not what we always want. Sometimes we just want to draw to the 
graphics property of a component/container. It would be absurd to create a 
GroupBase instance to "not layout" the instances like a VGroup and a Rect, 
which should be the VGroups background.

So, Performance is no issue with the Flash Player anymore?

--- In flexcoders@yahoogroups.com, "Ariel J"  wrote:
>
> From the docs for IGraphicElement:
> 
> "Group organizes its IGraphicElement children in sequences that share and 
> draw to the same DisplayObject. The DisplayObject is created by the first 
> element in the sequence."
> 
> That means that there is a single DisplayObject added to the display list 
> upon which the graphic primitives are drawn. I am sure this DisplayObject is 
> subject to the behaviors of the layout of the Group, as in BasicLayout vs. 
> VerticalLayout, just like any other child of the Group.
> 
> --- In flexcoders@yahoogroups.com, "Florian"  wrote:
> >
> > Ah, thanx. that clearifies a lot. But i don't understand why. I thought the 
> > IGraphicElements would be a util class to draw complex shapes into the 
> > owners graphic property. Which also means to me that the constraints should 
> > applied to be bounds of the component...
> > 
> > What am i missing?
> > 
> > Best regards!
> > 
> > --- In flexcoders@yahoogroups.com, "Ariel J"  wrote:
> > >
> > > You can. It's just that the constraint based sizing of the inner rect 
> > > doesn't work when you use a vertical layout. Change them to height and 
> > > width values of 100% and you'll see.
> > > 
> > > --- In flexcoders@yahoogroups.com, "Florian"  wrote:
> > > >
> > > > 
> > > > Why is it not possible to draw an IGraphicElement into a Group which has
> > > > a LayoutBase instance applied to it?
> > > > 
> > > > 
> > > > 
> > > > http://ns.adobe.com/mxml/2009";
> > > > 
> > > >xmlns:s="library://ns.adobe.com/flex/spark"
> > > > 
> > > >xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024"
> > > > minHeight="768">
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > >  > > > top="0" />
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > >
> >
>




Re: [flexcoders] question about inheritance and events and overriding methods

2010-01-19 Thread Tim Romano
Thanks very much, Aaron, for taking the time to compile the code on your 
end. Without your help, I'd have been spinning my wheels on this for days


It appears to be a compiler/debugger bug  in beta 2.  I started 
commenting out code and recompiling and then uncommenting and 
recompiling and eventually the error icon jumped to a line with no code 
on it at all. So I closed FB completely and reopened it and  the code 
compiled and I was able to debug it.


I got rid of the calls to super() BTW and moved the params parameter out 
of the constructor to the execute() function.


Tim


On 1/18/2010 9:10 PM, Aaron Hardy wrote:


I just tried it on my machine and it compiled without any problems 
after I took out the dependencies I didn't have access to.  I never 
got the error you mentioned.  Maybe it's referring to something else?  
Cut everything out of your project (maybe make a new one) except the 
onResult function you believe may be the cause and see if you still 
get the error.  I suspect you won't.  Good luck!


Aaron






Re: [flexcoders] Identifying which image caused the event?

2010-01-19 Thread Paul Andrews
criptopus wrote:
> If i have an event Listener of the following type on an array element how do 
> I determine the element from within the event so as to set one of the 
> elements properties.
>
> e.g.
>
> imgArray[imgIdx].addEventListener(Event.COMPLETE, adjustImage);
>
> private function adjustImage(e:Event):void
> {
>
> var picWidth:int=(e.currentTarget as Image).width;
> imgArray[???].height=picWidth * 2;
>
> }
>
> - Stephen
>
>   
currentTarget refers to the image object, not the array.

imgArray is an Array reference

imgArray[imgIdx] is an Object reference.

Effectively you are trying to write "picWidth.height=picWidth * 2;"


Paul






Re: [flexcoders] Identifying which image caused the event?

2010-01-19 Thread Paul Andrews
Paul Andrews wrote:
> criptopus wrote:
>> If i have an event Listener of the following type on an array element 
>> how do I determine the element from within the event so as to set one 
>> of the elements properties.
>>
>> e.g.
>>
>> imgArray[imgIdx].addEventListener(Event.COMPLETE, adjustImage);
>>
>> private function adjustImage(e:Event):void
>> {
>>
>> var picWidth:int=(e.currentTarget as Image).width;
>> imgArray[???].height=picWidth * 2;
>>
>> }
>>
>> - Stephen
>>
>>   
> currentTarget refers to the image object, not the array.
>
> imgArray is an Array reference
>
> imgArray[imgIdx] is an Object reference.
>
> Effectively you are trying to write "picWidth.height=picWidth * 2;"
Oops, I should say:  (e.currentTarget as Image).height = picWidth * 2;

Probably better written as

var pic:Image=(e.currentTarget as Image);
pic.height=pic.width * 2;

Paul


>
>
> Paul
>
>
>
>
>



Re: [flexcoders] Re: How do I get an array of Images

2010-01-19 Thread Paul Andrews
criptopus wrote:
> Thank you, thank you. I did know they started at 0 but I must have been 
> working to late and let that slip from my mind.
>
> I did read about Vector's and how they where more suited than arrays as long 
> as if they where of the same type although I don't seem to be able to use 
> them in Flex, I currently have the 3.2 compiler are they not available or 
> does it need including as a package?
>   
I think the Vector class came in with Flash Player 10 and Flex 3 targets 
FP 9. I think it is possible to target FP10 with flex 3, but haven't 
attempted to do so myself. The Flash builder trial should have no 
problem with the Vector class.
> - Stephen
>
>
>
> 
>   



[flexcoders] Identifying which image caused the event?

2010-01-19 Thread criptopus
If i have an event Listener of the following type on an array element how do I 
determine the element from within the event so as to set one of the elements 
properties.

e.g.

imgArray[imgIdx].addEventListener(Event.COMPLETE, adjustImage);

private function adjustImage(e:Event):void
{

var picWidth:int=(e.currentTarget as Image).width;
imgArray[???].height=picWidth * 2;

}

- Stephen



[flexcoders] Re: How do I get an array of Images

2010-01-19 Thread criptopus
Thank you, thank you. I did know they started at 0 but I must have been working 
to late and let that slip from my mind.

I did read about Vector's and how they where more suited than arrays as long as 
if they where of the same type although I don't seem to be able to use them in 
Flex, I currently have the 3.2 compiler are they not available or does it need 
including as a package?

- Stephen



[flexcoders] what's the difference between remoting service and URLStream

2010-01-19 Thread loveewind
so far as I know, calling remoting service (Remote object) is asynchronous , 
however URLStream is not asynchronous.

if the data on Flex are streamed as AMF in URLStream,compare this data service 
with remoting server, how about is the performance?
below is the code:

public function loadData():void{

var url:String = "http://abc.com/ProcessServlet?id=3";;
var request:URLRequest=new URLRequest(url);
request.method=URLRequestMethod.GET;
var urlStream:URLStream =new URLStream();
urlStream.addEventListener("complete", handleDataShow)
urlStream.addEventListener("ioError", loadDataError)
try {
urlStream.load(request);
}catch (error:Error){
Alert.show(error.toString());
}

}

private function handleDataShow(event:Event):void{
 var urlStream:URLStream=URLStream(event.target);
 var byte:ByteArray=new ByteArray;
 urlStream.readBytes(byte, byte.length);
 byte.uncompress();
 var obj:Contact =byte.readObject() as Contact;
 }