RE: [flexcoders] Re: AIR and Framework RSL's

2009-09-16 Thread Alex Harui
I haven't tried loading the SWZs from AIR.  Darrell's our expert on RSLs so 
maybe he'll respond.  I would think you wouldn't want to pick up the SWZs from 
the network, but I would think you could put them in one central spot on the 
client computer.

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 reflexactions
Sent: Tuesday, September 15, 2009 9:06 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: AIR and Framework RSL's



Thanks, the question was really more related to the 'packaging' for 
distribution/updating than directly load/run execution.

The app doesnt really have a main and sub apps as much as several peers based 
on common libs.

I couldnt see a way to not include common modules in the .air distribution and 
still have everything in sync and work.

Beginning to think the only way is to bypass the AIR updater and write my own.
--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
Harui aha...@... wrote:

 AIR apps in the same folder should be able to share the RSLs. Like modules, 
 if there is a main app and many sub-apps, the sub-apps should not use RSL 
 linkage, but rather, just load-extern the RSL because the main app will bring 
 in the classes.

 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui

 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
 Behalf Of reflexactions
 Sent: Tuesday, September 15, 2009 7:43 PM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] AIR and Framework RSL's



 Is there anyway to NOT have to include the Adobe signed framework RSLs with 
 every AIR package if we are using RSL's?

 and also for that matter 'share' common modules?

 We have a several apps where the actual AIR app is really very very thin, 
 they just share common code in RSL's (actually the same RSLs we use for the 
 web versions).

 Whereas the web versions only need to download the RSL's once (and with the 
 Adobe framewok maybe not even once if they already have the RSL), the AIR 
 version has to include all the common modules and the adobe framework in each 
 AIR app.

 Although you can say well its only a one time download,
 1) It still makes for an awful big download
 2) We update the apps on a 3 week cycle so its an awful lot and quite often.




[flexcoders] child component listens for event on parent

2009-09-16 Thread edencane

Hi.

Im trying to get a child component to listen for an event that happens on
tabchange in the parent.
The parent is an application with a TabNavigator object.
When the tabchanges I want the the child component to carry out some stuff.

In the parent Ive got:
mx:Metadata
[Event(name=buttonLabelEvent, type= flash.events.Event)]
/mx:Metadata

then in the tabChange function Ive got:
var bLEvent:Event = new Event(buttonLabelEvent);
 dispatchEvent(bLEvent);

Now I want to listen for this event in a child component.
There are several instances of the childcomponent (which is basically a form
containing a combobox) in the main application.
I want every instance of the childcomponent to listen and act when a
tabchange occurs in the main component.

So far in the component I have:
creationComplete=postInit()
Then in postInit I have:
this.addEventListener(Application.application.buttonLabelEvent,
buttonLabelHandler);

However, this is not right.

how do I do this...?

Thanks for help...
Kind regards.
Luke Vanderfluit.

-- 
View this message in context: 
http://www.nabble.com/child-component-listens-for-event-on-parent-tp25466734p25466734.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] child component listens for event on parent

2009-09-16 Thread edencane

I was able to get the event happening by changing the component code to be:

private function postInit():void {
Application.application.addEventListener(buttonLabelEvent,
buttonLabelHandler);
}

but now the event seems to trigger 3 times for every tab change but doesnt
trigger on the first tab change...

And the app takes forever to compile as well...

Something still not right..

Please help..



edencane wrote:
 
 Hi.
 
 Im trying to get a child component to listen for an event that happens on
 tabchange in the parent.
 The parent is an application with a TabNavigator object.
 When the tabchanges I want the the child component to carry out some
 stuff.
 
 In the parent Ive got:
   mx:Metadata
   [Event(name=buttonLabelEvent, type= flash.events.Event)]
   /mx:Metadata
 
 then in the tabChange function Ive got:
 var bLEvent:Event = new Event(buttonLabelEvent);
dispatchEvent(bLEvent);
 
 Now I want to listen for this event in a child component.
 There are several instances of the childcomponent (which is basically a
 form containing a combobox) in the main application.
 I want every instance of the childcomponent to listen and act when a
 tabchange occurs in the main component.
 
 So far in the component I have:
 creationComplete=postInit()
 Then in postInit I have:
 this.addEventListener(Application.application.buttonLabelEvent,
 buttonLabelHandler);
 
 However, this is not right.
 
 how do I do this...?
 
 Thanks for help...
 Kind regards.
 Luke Vanderfluit.
 
 

-- 
View this message in context: 
http://www.nabble.com/child-component-listens-for-event-on-parent-tp25466734p25467780.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Complex shape selection

2009-09-16 Thread vladakg85
Hi,

how to create complex selectable shape in flex. 
For example if I make Europe map. And There is countries like Germany, Italy, 
Greece etc. They all have their boundaries. And I want to create application so 
that user can select Greece for example but only selectable in her boundaries. 
If I put canvas over this country and make it selectable I get square selection 
which is not what I really want.



Re: [flexcoders] child component listens for event on parent

2009-09-16 Thread claudiu ursica
You'd be better listening to some property in your model and update that 
property when tabs are changing. Your approach doesn't convince me.

But then, maybe I didn't get it right...
C





From: edencane lukevanderfl...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Wednesday, September 16, 2009 11:07:05 AM
Subject: Re: [flexcoders] child component listens for event on parent

   

I was able to get the event happening by changing the component code to be:

private function postInit():void {
Application. application. addEventListener (buttonLabelEve nt,
buttonLabelHandler) ;
}

but now the event seems to trigger 3 times for every tab change but doesnt
trigger on the first tab change...

And the app takes forever to compile as well...

Something still not right..

Please help..

edencane wrote:
 
 Hi.
 
 Im trying to get a child component to listen for an event that happens on
 tabchange in the parent.
 The parent is an application with a TabNavigator object.
 When the tabchanges I want the the child component to carry out some
 stuff.
 
 In the parent Ive got:
   mx:Metadata
   [Event(name= buttonLabelEven t, type= flash.events. Event)]
   /mx:Metadata
 
 then in the tabChange function Ive got:
 var bLEvent:Event = new Event(buttonLabelE vent);
dispatchEvent( bLEvent);
 
 Now I want to listen for this event in a child component.
 There are several instances of the childcomponent (which is basically a
 form containing a combobox) in the main application.
 I want every instance of the childcomponent to listen and act when a
 tabchange occurs in the main component.
 
 So far in the component I have:
 creationComplete= postInit( )
 Then in postInit I have:
 this.addEventListen er(Application. application. buttonLabelEvent ,
 buttonLabelHandler) ;
 
 However, this is not right.
 
 how do I do this...?
 
 Thanks for help...
 Kind regards.
 Luke Vanderfluit.
 
 

-- 
View this message in context: http://www.nabble. com/child- component- 
listens-for- event-on- parent-tp2546673 4p25467780. html
Sent from the FlexCoders mailing list archive at Nabble.com.


   


  

[flexcoders] How to add files when exporting air application

2009-09-16 Thread reflexactions
If I want to add swf modules or a compiled css file that are all extern (ie 
there is no explicit reference to them in the actual application code) and will 
be loaded at run time to an AIR package how do I do it?

Just to clarify, I can run the app just fine at the moment so long as I 
manually copy the swfs to the app install folder after installation, so this 
isnt a question of how to make the app run with run time loaded modules, its 
about how to get them into the .air file so they get installed initially.

Thanks



RE: [flexcoders] How to add files when exporting air application

2009-09-16 Thread Jake Churchill
Include them in the root of your package and when your app runs, check for
them in the install directory.  If they are not there, move them there.
Here's some code that I use to do this with an included DB file in an AIR
app:

 

try

{

var
dbSeed:File =
File.applicationDirectory.resolvePath(ModelLocator.DATABASE_FILE_NAME);

 
var dbPerm:File = new
File(ModelLocator.DATABASE_PATH+File.separator+ModelLocator.DATABASE_FILE_NA
ME);

 


 
if( !dbPerm.exists )

 
{

 
trace(dbPerm File did NOT exist);

 
dbSeed.copyTo(dbPerm);

 
}

 
else

 
{

 
trace(dbPerm File DID exist);

 
// this overwrites the file no matter whether it exists or not

 
//dbPerm.deleteFile();

 
//dbSeed.copyTo(dbPerm);

 
}

}

catch( err:Error )

{

trace(
[FileCopyError]:   + err.message );

}



 

Jake Churchill

CF Webtools

11204 Davenport, Ste. 100

Omaha, NE  68154

http://www.cfwebtools.com

402-408-3733 x103

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of reflexactions
Sent: Wednesday, September 16, 2009 7:11 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to add files when exporting air application

 

  

If I want to add swf modules or a compiled css file that are all extern (ie
there is no explicit reference to them in the actual application code) and
will be loaded at run time to an AIR package how do I do it?

Just to clarify, I can run the app just fine at the moment so long as I
manually copy the swfs to the app install folder after installation, so this
isnt a question of how to make the app run with run time loaded modules, its
about how to get them into the .air file so they get installed initially.

Thanks





Re: [flexcoders] Bringing application to front

2009-09-16 Thread nhid
Ian,

No, it's not an AIR application.  I'm using Flexbuilder 3, lifecycle 2.5.
Is there a way to get around to it?

Thanks
nhid

On Tue, Sep 15, 2009 at 6:19 PM, Ian Thomas i...@eirias.net wrote:



 If it's an AIR application, you can use the .orderToFront() method of your
 WindowedApplication.


 http://livedocs.adobe.com/flex/3/langref/mx/core/WindowedApplication.html#orderToFront%28%29

 Ian


 On Tue, Sep 15, 2009 at 10:03 PM, nhid nhi...@gmail.com wrote:



 Hi,

 How should I go about implementing the following case:

 There's a timer on my application which will give an alert to the user 5
 minutes before the session times out.  It's working, but the problem is
 since the alert is a popup window, it appears inside the application and
 when the application is behind another application (browser, etc) or is
 minimized, the user won't see the alert and the applicaiton logs the user
 out because no action was taken.  How can I bring the application to the
 front (to focus) or maximize it so the user will see the alert?

 Any suggestion is appreciated.  Thank you!


  



RE: [flexcoders] child component listens for event on parent

2009-09-16 Thread Tracy Spratt
You want to add the listener to the thing that dispatches the event, the
application, and declare the handler in the component.

 

Application.application.addEventListener(buttonLabelEvent,
buttonLabelHandler);

You will need to import the custom event.

 

 

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of edencane
Sent: Wednesday, September 16, 2009 4:07 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] child component listens for event on parent

 

  


I was able to get the event happening by changing the component code to be:

private function postInit():void {
Application.application.addEventListener(buttonLabelEvent,
buttonLabelHandler);
}

but now the event seems to trigger 3 times for every tab change but doesnt
trigger on the first tab change...

And the app takes forever to compile as well...

Something still not right..

Please help..

edencane wrote:
 
 Hi.
 
 Im trying to get a child component to listen for an event that happens on
 tabchange in the parent.
 The parent is an application with a TabNavigator object.
 When the tabchanges I want the the child component to carry out some
 stuff.
 
 In the parent Ive got:
 mx:Metadata
 [Event(name=buttonLabelEvent, type= flash.events.Event)]
 /mx:Metadata
 
 then in the tabChange function Ive got:
 var bLEvent:Event = new Event(buttonLabelEvent);
 dispatchEvent(bLEvent);
 
 Now I want to listen for this event in a child component.
 There are several instances of the childcomponent (which is basically a
 form containing a combobox) in the main application.
 I want every instance of the childcomponent to listen and act when a
 tabchange occurs in the main component.
 
 So far in the component I have:
 creationComplete=postInit()
 Then in postInit I have:
 this.addEventListener(Application.application.buttonLabelEvent,
 buttonLabelHandler);
 
 However, this is not right.
 
 how do I do this...?
 
 Thanks for help...
 Kind regards.
 Luke Vanderfluit.
 
 

-- 
View this message in context: http://www.nabble.
http://www.nabble.com/child-component-listens-for-event-on-parent-tp2546673
4p25467780.html
com/child-component-listens-for-event-on-parent-tp25466734p25467780.html
Sent from the FlexCoders mailing list archive at Nabble.com.





[flexcoders] Re: Creation Complete flag?

2009-09-16 Thread valdhor
If it has already fired then your event handler will have run.


--- In flexcoders@yahoogroups.com, dfalling dfall...@... wrote:

 Is there a publicly-exposed property on components that can be inspected to 
 determine if they have finished creation yet?  I know I can listen for 
 creationComplete, but what can I do if it may have already been fired?





[flexcoders] Re: accessing Array created in Private function?

2009-09-16 Thread valdhor
Or, set the return type of the function to array and return the array.

--- In flexcoders@yahoogroups.com, Jake Churchill j...@... wrote:

 Store the array in a bindable variable inside the class instead of in the
 function
 
  
 
 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 tex_learning_flex
 Sent: Tuesday, September 15, 2009 12:07 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] accessing Array created in Private function?
 
  
 
   
 
 I created an array within a private function. I now need to access that
 array for an item renderer. How can I access this array? (I know it's
 obvious that I'm really a newbie!)
 
 thanks,
 
 Tex
 
 
 
 No virus found in this incoming message.
 Checked by AVG - www.avg.com
 Version: 8.5.409 / Virus Database: 270.13.96/2369 - Release Date: 09/15/09
 05:59:00





[flexcoders] Re: How to add files when exporting air application

2009-09-16 Thread reflexactions
Thanks,
However I understood that for security reasons AIR apps are prevented from 
writing to the application installation directory?


--- In flexcoders@yahoogroups.com, Jake Churchill j...@... wrote:

 Include them in the root of your package and when your app runs, check for
 them in the install directory.  If they are not there, move them there.
 Here's some code that I use to do this with an included DB file in an AIR
 app:
 
  
 
 try
 
 {
 
 var
 dbSeed:File =
 File.applicationDirectory.resolvePath(ModelLocator.DATABASE_FILE_NAME);
 
  
 var dbPerm:File = new
 File(ModelLocator.DATABASE_PATH+File.separator+ModelLocator.DATABASE_FILE_NA
 ME);
 
  
 
 
  
 if( !dbPerm.exists )
 
  
 {
 
  
 trace(dbPerm File did NOT exist);
 
  
 dbSeed.copyTo(dbPerm);
 
  
 }
 
  
 else
 
  
 {
 
  
 trace(dbPerm File DID exist);
 
  
 // this overwrites the file no matter whether it exists or not
 
  
 //dbPerm.deleteFile();
 
  
 //dbSeed.copyTo(dbPerm);
 
  
 }
 
 }
 
 catch( err:Error )
 
 {
 
 trace(
 [FileCopyError]:   + err.message );
 
 }
 
 
 
  
 
 Jake Churchill
 
 CF Webtools
 
 11204 Davenport, Ste. 100
 
 Omaha, NE  68154
 
 http://www.cfwebtools.com
 
 402-408-3733 x103
 
  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of reflexactions
 Sent: Wednesday, September 16, 2009 7:11 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] How to add files when exporting air application
 
  
 
   
 
 If I want to add swf modules or a compiled css file that are all extern (ie
 there is no explicit reference to them in the actual application code) and
 will be loaded at run time to an AIR package how do I do it?
 
 Just to clarify, I can run the app just fine at the moment so long as I
 manually copy the swfs to the app install folder after installation, so this
 isnt a question of how to make the app run with run time loaded modules, its
 about how to get them into the .air file so they get installed initially.
 
 Thanks





[flexcoders] Re: filtering advanced datagrid

2009-09-16 Thread valdhor
This article should help:

http://jonathanbranam.net/solutions/filter-hierarchicalcollectionview-parent-child-data

and possibly this one:

http://jonathanbranam.net/flex3anatomy/class/HierarchicalCollectionView



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

 Here is the link to the app:
 
 http://s256908546.onlinehome.us/advgrid/advgridfilter.html
 
 
 --- In flexcoders@yahoogroups.com, kaushal.shah05 kshah0097@ wrote:
 
  how do you filter an advanced datagrid?   I've tried myself with no luck.  
  I can only get filter the fist node in the tree.
  
  there are not too many resources out there for the Flex adv datagrid.  
  Adobe should really focus on it as it's always a requirement in the 
  corporate world.
  
  (This is the modified code copied from Sameer's site.)
  
  
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=absolute
  applicationComplete=init()
  mx:Script
  ![CDATA[
  import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
  import mx.collections.GroupingField;
  import mx.collections.Grouping;
  import mx.collections.ArrayCollection ;
  import mx.collections.GroupingCollection;
  
  
  public function init() : void {
  flatData.filterFunction = myFilter;
  }
  public function myFilter(item:Object) : Boolean {
  var pattern:String = '.*' + search.text + '.*';
  
  if (item.hasOwnProperty('Territory')) {
   if (item.Territory.match(pattern)) {
  return true;
  } else {
  return false;
  }
  }
  return true;
  }
  
  public function updateFilter() : void { 
  groupedData.refresh();
  }
  
  [Bindable] private var flatData:ArrayCollection = new
  ArrayCollection(
  [
  
  { Territory:Nevada, Territory_Rep:Barbara 
  Jennings,Estimate:4 , Actual:38865 },
  { Territory:Nevada, Territory_Rep:Dana Binn ,Estimate:3 , 
  Actual:29885 },
  { Territory:Nevada, Territory_Rep:Joe Schmoe ,Estimate:3 , 
  Actual:29134 },
  { Territory:Northern California , Territory_Rep:Lauren Ipsum , 
  Estimate:4 , Actual:38805 },
  { Territory:Northern California , Territory_Rep: T.R.Smith , 
  Estimate:4 , Actual:55498 },
  { Territory:Southern California , Territory_Rep:Jane Grove, 
  Estimate:45000 , Actual:44913 },
  { Territory:Southern California , Territory_Rep:Alice Treu, 
  Estimate:45000 , Actual:44985 },
  { Territory:Nevada , Territory_Rep:Bethany Pittman 
  ,Estimate:45000 , Actual:52888 } 
  ]);
  
  ]]
  /mx:Script
  mx:HBox
  mx:Label text=Territory /
  mx:TextInput id=search text= 
  change=updateFilter()/
  /mx:HBox
  
  mx:AdvancedDataGrid id=adg
  creationComplete=groupedData.refresh() x= 29.5 y=26 width=555
  height=377
  mx:dataProvider
  mx:GroupingCollection id=groupedData source={flatData} 
  
  mx:Grouping
  mx:GroupingField name=Territory 
  mx:summaries
  mx:SummaryRow summaryPlacement=group
  mx:fields
  mx:SummaryField
  dataField=Estimate operation=SUM label=Budget/
  mx:SummaryField
  dataField=Actual operation=SUM /
  /mx:fields
  /mx:SummaryRow
  /mx:summaries
  /mx:GroupingField
  /mx:Grouping
  /mx:GroupingCollection
  /mx:dataProvider
  mx:columns
  mx:AdvancedDataGridColumn width=200 headerText =
  Territory Rep dataField=Territory_Rep/
  mx:AdvancedDataGridColumn headerText=Budget 
  dataField=Budget/
  mx:AdvancedDataGridColumn headerText = Actual
  dataField=Actual/
  /mx:columns
  /mx:AdvancedDataGrid
  
  /mx:Application
 





[flexcoders] Re: Creation Complete flag?

2009-09-16 Thread valdhor
I should probably clarify a bit.

You could create your own creationComplete flag.

private var thisComponentIsComplete:Boolean = false;

then set it in your creationComplete event handler

private function onCreationComplete():void
{
thisComponentIsComplete = true;
}


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 If it has already fired then your event handler will have run.
 
 
 --- In flexcoders@yahoogroups.com, dfalling dfalling@ wrote:
 
  Is there a publicly-exposed property on components that can be inspected to 
  determine if they have finished creation yet?  I know I can listen for 
  creationComplete, but what can I do if it may have already been fired?
 





RE: [flexcoders] Re: How to add files when exporting air application

2009-09-16 Thread Jake Churchill
I'm not sure on that but it may be correct.  The model variables I
references in the code below were set as follows in my app:

 

public static constDATABASE_PATH :
String=
File.applicationStorageDirectory.nativePath;

public static constDATABASE_FILE_NAME:
String= 'stats.db';

 

the application storage directory by default (on XP) is C:\Documents and
Settings\USER_NAME\Application Data\APPLICATION_NAME

 

That's where I reference all my extra files out of.  I would think this
would still work with modules, wouldn't it?

 

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 reflexactions
Sent: Wednesday, September 16, 2009 8:15 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to add files when exporting air application

 

  

Thanks,
However I understood that for security reasons AIR apps are prevented from
writing to the application installation directory?

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
Jake Churchill j...@... wrote:

 Include them in the root of your package and when your app runs, check for
 them in the install directory. If they are not there, move them there.
 Here's some code that I use to do this with an included DB file in an AIR
 app:
 
 
 
 try
 
 {
 
 var
 dbSeed:File =
 File.applicationDirectory.resolvePath(ModelLocator.DATABASE_FILE_NAME);
 
 
 var dbPerm:File = new

File(ModelLocator.DATABASE_PATH+File.separator+ModelLocator.DATABASE_FILE_NA
 ME);
 
 
 
 
 
 if( !dbPerm.exists )
 
 
 {
 
 
 trace(dbPerm File did NOT exist);
 
 
 dbSeed.copyTo(dbPerm);
 
 
 }
 
 
 else
 
 
 {
 
 
 trace(dbPerm File DID exist);
 
 
 // this overwrites the file no matter whether it exists or not
 
 
 //dbPerm.deleteFile();
 
 
 //dbSeed.copyTo(dbPerm);
 
 
 }
 
 }
 
 catch( err:Error )
 
 {
 
 trace(
 [FileCopyError]:  + err.message );
 
 }
 
 
 
 
 
 Jake Churchill
 
 CF Webtools
 
 11204 Davenport, Ste. 100
 
 Omaha, NE 68154
 
 http://www.cfwebtools.com
 
 402-408-3733 x103
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ]
On
 Behalf Of reflexactions
 Sent: Wednesday, September 16, 2009 7:11 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] How to add files when exporting air application
 
 
 
 
 
 If I want to add swf modules or a compiled css file that are all extern
(ie
 there is no explicit reference to them in the actual application code) and
 will be loaded at run time to an AIR package how do I do it?
 
 Just to clarify, I can run the app just fine at the moment so long as I
 manually copy the swfs to the app install folder after installation, so
this
 isnt a question of how to make the app run with run time loaded modules,
its
 about how to get them into the .air file so they get installed initially.
 
 Thanks




No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.99/2372 - Release Date: 09/16/09
05:51:00



[flexcoders] Re: Creation Complete flag?

2009-09-16 Thread dfalling
Man, I'm doing a terrible job communicating my problems.

So I want  way for other components to inspect each other to see if they've 
completed.  I can't just listen to the event, because the creation could have 
happened before I ever had a reference to the component to start listening.  
I'm wondering if there's a way to inspect a component that you've just now been 
given a reference to, that may or may not have created itself already.



--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I should probably clarify a bit.
 
 You could create your own creationComplete flag.
 
 private var thisComponentIsComplete:Boolean = false;
 
 then set it in your creationComplete event handler
 
 private function onCreationComplete():void
 {
 thisComponentIsComplete = true;
 }
 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  If it has already fired then your event handler will have run.
  
  
  --- In flexcoders@yahoogroups.com, dfalling dfalling@ wrote:
  
   Is there a publicly-exposed property on components that can be inspected 
   to determine if they have finished creation yet?  I know I can listen for 
   creationComplete, but what can I do if it may have already been fired?
  
 





RE: [flexcoders] How to add files when exporting air application

2009-09-16 Thread Jim Hayes
 
In flexbuilder, to get those files into your .air package, try the
following :
 
Either
 
 tick copy non embedded files to output folder in
project|properties|flex compiler, and with a bit of luck when you
publish your .air from FB they will appear in the Air file contents
screen included files list for you to check or uncheck as necessary.
Personally I find this way to be not quite fitting with my sloppy ways,
and sometimes seemed a little unreliable.
 
The other option is to get to that screen (keep hitting Next button),
whereby the bin-release folder will be created, then copy your extra
files into that. Hit back button in the export screen, then next to
get back to where you were, only this time you should see and be able to
include your files.
 
Both of these get old fairly quickly if you need to do it a lot, I found
that an ant script saved me a ton of time and aggro for compiling and
packaging air projects.
 
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of reflexactions
Sent: 16 September 2009 13:11
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to add files when exporting air application
 
  
If I want to add swf modules or a compiled css file that are all extern
(ie there is no explicit reference to them in the actual application
code) and will be loaded at run time to an AIR package how do I do it?

Just to clarify, I can run the app just fine at the moment so long as I
manually copy the swfs to the app install folder after installation, so
this isnt a question of how to make the app run with run time loaded
modules, its about how to get them into the .air file so they get
installed initially.

Thanks


__
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.
__

Re: [flexcoders] Re: Creation Complete flag?

2009-09-16 Thread Fotis Chatzinikos
Do what Valdhor explains:

public var compCreated:boolean = false ;

creationComplete()
{
   compCreated = true ;
}

now when ever needed check if compCreated == true
On Wed, Sep 16, 2009 at 5:13 PM, dfalling dfall...@gmail.com wrote:



 Man, I'm doing a terrible job communicating my problems.

 So I want way for other components to inspect each other to see if they've
 completed. I can't just listen to the event, because the creation could have
 happened before I ever had a reference to the component to start listening.
 I'm wondering if there's a way to inspect a component that you've just now
 been given a reference to, that may or may not have created itself already.

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 valdhor valdhorli...@... wrote:
 
  I should probably clarify a bit.
 
  You could create your own creationComplete flag.
 
  private var thisComponentIsComplete:Boolean = false;
 
  then set it in your creationComplete event handler
 
  private function onCreationComplete():void
  {
  thisComponentIsComplete = true;
  }
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 valdhor valdhorlists@ wrote:
  
   If it has already fired then your event handler will have run.
  
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 dfalling dfalling@ wrote:
   
Is there a publicly-exposed property on components that can be
 inspected to determine if they have finished creation yet? I know I can
 listen for creationComplete, but what can I do if it may have already been
 fired?
   
  
 

  




-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
fotis.chatzini...@gmail.com,


[flexcoders] Re: Creation Complete flag?

2009-09-16 Thread valdhor
So, I still don't understand. How would you create a component without having a 
reference to it?

Also, if you have a public var thisComponentIsComplete:Boolean in your 
component that gets set when the creationComplete event fires, why can't you 
just ask the component if it has been created?

if(theNewComponentIJustGotAReferenceTo.thisComponentIsComplete)
{
trace(This Component has been created);
}



--- In flexcoders@yahoogroups.com, dfalling dfall...@... wrote:

 Man, I'm doing a terrible job communicating my problems.
 
 So I want  way for other components to inspect each other to see if they've 
 completed.  I can't just listen to the event, because the creation could have 
 happened before I ever had a reference to the component to start listening.  
 I'm wondering if there's a way to inspect a component that you've just now 
 been given a reference to, that may or may not have created itself already.
 
 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  I should probably clarify a bit.
  
  You could create your own creationComplete flag.
  
  private var thisComponentIsComplete:Boolean = false;
  
  then set it in your creationComplete event handler
  
  private function onCreationComplete():void
  {
  thisComponentIsComplete = true;
  }
  
  
  --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
  
   If it has already fired then your event handler will have run.
   
   
   --- In flexcoders@yahoogroups.com, dfalling dfalling@ wrote:
   
Is there a publicly-exposed property on components that can be 
inspected to determine if they have finished creation yet?  I know I 
can listen for creationComplete, but what can I do if it may have 
already been fired?
   
  
 





[flexcoders] Re: Creation Complete flag?

2009-09-16 Thread dfalling
I have a custom tab navigator that will be attached to a viewstack.  It needs 
to know if the viewstack's children have been created or not.  This could 
happen before it is attached to the viewstack or some time after due to 
creationPolicy, so I absolutely can't just listen for the creationComplete 
event.  Once I know it hasn't been created, I can watch it (and am planning 
to), but I need a way to check beforehand.

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 So, I still don't understand. How would you create a component without having 
 a reference to it?
 
 Also, if you have a public var thisComponentIsComplete:Boolean in your 
 component that gets set when the creationComplete event fires, why can't you 
 just ask the component if it has been created?
 
 if(theNewComponentIJustGotAReferenceTo.thisComponentIsComplete)
 {
 trace(This Component has been created);
 }
 
 
 
 --- In flexcoders@yahoogroups.com, dfalling dfalling@ wrote:
 
  Man, I'm doing a terrible job communicating my problems.
  
  So I want  way for other components to inspect each other to see if they've 
  completed.  I can't just listen to the event, because the creation could 
  have happened before I ever had a reference to the component to start 
  listening.  I'm wondering if there's a way to inspect a component that 
  you've just now been given a reference to, that may or may not have created 
  itself already.
  
  
  
  --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
  
   I should probably clarify a bit.
   
   You could create your own creationComplete flag.
   
   private var thisComponentIsComplete:Boolean = false;
   
   then set it in your creationComplete event handler
   
   private function onCreationComplete():void
   {
   thisComponentIsComplete = true;
   }
   
   
   --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
   
If it has already fired then your event handler will have run.


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

 Is there a publicly-exposed property on components that can be 
 inspected to determine if they have finished creation yet?  I know I 
 can listen for creationComplete, but what can I do if it may have 
 already been fired?

   
  
 





[flexcoders] Re: How to add files when exporting air application

2009-09-16 Thread reflexactions
Thanks!!!

This really helped.

Actually I found that even with copy non-embedded files checked FB wouldn't 
copy content from linked folders only direct 'physical' folders under 'src' so 
I had to use your 'hit the back button' trick in the export screen, as you say 
a PITA but works!

--- In flexcoders@yahoogroups.com, Jim Hayes j...@... wrote:

  
 In flexbuilder, to get those files into your .air package, try the
 following :
  
 Either
  
  tick copy non embedded files to output folder in
 project|properties|flex compiler, and with a bit of luck when you
 publish your .air from FB they will appear in the Air file contents
 screen included files list for you to check or uncheck as necessary.
 Personally I find this way to be not quite fitting with my sloppy ways,
 and sometimes seemed a little unreliable.
  
 The other option is to get to that screen (keep hitting Next button),
 whereby the bin-release folder will be created, then copy your extra
 files into that. Hit back button in the export screen, then next to
 get back to where you were, only this time you should see and be able to
 include your files.
  
 Both of these get old fairly quickly if you need to do it a lot, I found
 that an ant script saved me a ton of time and aggro for compiling and
 packaging air projects.
  
  
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of reflexactions
 Sent: 16 September 2009 13:11
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] How to add files when exporting air application
  
   
 If I want to add swf modules or a compiled css file that are all extern
 (ie there is no explicit reference to them in the actual application
 code) and will be loaded at run time to an AIR package how do I do it?
 
 Just to clarify, I can run the app just fine at the moment so long as I
 manually copy the swfs to the app install folder after installation, so
 this isnt a question of how to make the app run with run time loaded
 modules, its about how to get them into the .air file so they get
 installed initially.
 
 Thanks
 
 
 __
 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.
 __





RE: [flexcoders] Re: Java/Flex questions answered by James Ward

2009-09-16 Thread James Ward
Yeah.  Turns out that the folks at Stack Overflow didn't like the idea of the 
riacowboy tag.  So you can still ask the question with sensible tags and then 
post a comment on my Ask the RIA Cowboy blog so that I know where to find it.

Thanks.

-James


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of ilikeflex
Sent: Monday, September 14, 2009 10:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Java/Flex questions answered by James Ward



Could not find the tag 'raiCowboy'

http://meta.stackoverflow.com/questions/17314/search-for-a-tag-returns-no-results/17327

It says tag 'raiCowboy' has been deleted.

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, James 
Ward jaw...@... wrote:

 This would be a great question to ask on StackOverflow.com :)

 -James


 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
 Behalf Of ilikeflex
 Sent: Friday, September 11, 2009 11:03 AM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Re: Java/Flex questions answered by James Ward



 what i am expecting that as soon as i run my flex application i should
 see

 System.out.println(getIndexList Executing);
 System.out.println(getIndexProfileList Executing);
 System.out.println(getIndexTradingDatesList Executing);
 System.out.println(getIndexValues Executing);

 but i see

 System.out.println(getIndexList Executing);
 System.out.println(getIndexList End Executing);

 System.out.println(getIndexProfileList Executing);
 System.out.println(getIndexProfileList End Executing);

 System.out.println(getIndexTradingDatesList Executing);
 System.out.println(getIndexTradingDatesList End Executing);

 System.out.println(getIndexValues Executing);
 System.out.println(getIndexValues End Executing);

 I should see all the method executing simultaneously.

 Any help...

 --- In 
 flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
  ilikeflex ilikeflex@ wrote:
 
 
  I am doing something like this:
 
  if( indexListRemoteObject == null)
  {
  indexListRemoteObject = new RemoteObject(indexMasterDAO);
  indexListRemoteObject.addEventListener( ResultEvent.RESULT,
  indexListHandler );
  indexListRemoteObject.addEventListener( FaultEvent.FAULT, faultHandler
  );
  indexListRemoteObject.getIndexList();
  }
 
  if( indexProfileListRemoteObject == null )
  {
  indexProfileListRemoteObject = new RemoteObject(indexMasterDAO);
  indexProfileListRemoteObject.addEventListener( ResultEvent.RESULT,
  indexProfileListHandler );
  indexProfileListRemoteObject.addEventListener( FaultEvent.FAULT,
  faultHandler );
  indexProfileListRemoteObject.getIndexProfileList();
  }
 
 
  if( indexTradingDatesListRemoteObject == null )
  {
  indexTradingDatesListRemoteObject = new
 RemoteObject(indexMasterDAO);
  indexTradingDatesListRemoteObject.addEventListener(
 ResultEvent.RESULT,
  indexTradingDatesListHandler );
  indexTradingDatesListRemoteObject.addEventListener( FaultEvent.FAULT,
  faultHandler );
  indexTradingDatesListRemoteObject.getIndexTradingDatesList();
  }
 
  if( indexValuesListRemoteObject == null )
  {
  indexValuesListRemoteObject = new RemoteObject(indexMasterDAO);
  indexValuesListRemoteObject.addEventListener( ResultEvent.RESULT,
  indexValuesListHandler );
  indexValuesListRemoteObject.addEventListener( FaultEvent.FAULT,
  faultHandler );
  indexValuesListRemoteObject.getIndexValues();
  }
 
  but if i put the System.out.println in different Java Methods.. i see
  the same sequence of order in which they are called. I am 100% sure
 that
  my first method(getIndexList) takes lot of time. So while getIndexList
  is executing then i should also see that atleast one of the other
  methods are being executed simulataneously. But this is not happening
 as
  expected. None of the other methods is able to recieve the request
 while
  getIndexList is processing.
 
  All my java methods are static. I don't think this should cause any
  issue.
 
  thanks
  ilikeflex
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  --- In 
  flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
   fotis.chatzinikos
  fotis.chatzinikos@ wrote:
  
   make a remote call implementation in java that fills a hashmap or
  related object with all the info you want:
  
   init()
   {
   people = getPeople() ;
   towns = getTowns() ;
   etc...
   }
  
   if you want them 1-by-1 call them in sequence:
  
   getPeople() on responce getTowns and so on...
  
   --- In 
   flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
valdhor valdhorlists@ wrote:
   
I don't understand. Each call _IS_ a separate request. Even though
  Flex batches them up together, each remoteObject call hits the server
 as
  a separate request. They will return asynchronously. This is 

[flexcoders] Re: Complex shape selection

2009-09-16 Thread jer_ela
Check out the ImageMap component in FlexLib 
http://flexlib.googlecode.com/svn/trunk/docs/flexlib/controls/ImageMap.html

It works the same way in imagemap works in html, and you can use any of the 
tools used to define imagemap coords for html, to define the coords.  Fireworks 
for example.

--- In flexcoders@yahoogroups.com, vladakg85 vladak...@... wrote:

 Hi,
 
 how to create complex selectable shape in flex. 
 For example if I make Europe map. And There is countries like Germany, Italy, 
 Greece etc. They all have their boundaries. And I want to create application 
 so that user can select Greece for example but only selectable in her 
 boundaries. If I put canvas over this country and make it selectable I get 
 square selection which is not what I really want.





[flexcoders] Create an array from values with in an array collection

2009-09-16 Thread kpjj31

The info below is a result from remote object that is put into an
arraycollection. How can I use actionscript to create an array fom all
the PROFILEIDs within the ATTENDEEINFO Object. This array needs to be
passed into another remote object.


ATTENDEELIST
0 - ATTENDEEID
 DATE
 ENROLLMENTID
 ATTENDEEINFO - Object
   FNAME
   LNAME
   PROFILEID - need to creat an array and add this value

1 - ATTENDEEID
 DATE
 ENROLLMENTID
 ATTENDEEINFO - Object
   FNAME
   LNAME
   PROFILEID - need to creat an array and add this value









[flexcoders] Re: Create an array from values with in an array collection

2009-09-16 Thread turbo_vb

var attendeeProfileIdArray:Array = [];

for each ( var attendee:ATTENDEE in ATTENDEELIST )
{

  attendeeProfileIdArray.push( attendee.ATTENDEEINFO.PROFILEID );

}

You might want to consider changing the name of your classes and
properties to follow standard naming conventions.  Using all capital
letters makes them look like Constants.

-TH

--- In flexcoders@yahoogroups.com, kpjj31 joe.g.ja...@... wrote:


 The info below is a result from remote object that is put into an
 arraycollection. How can I use actionscript to create an array fom all
 the PROFILEIDs within the ATTENDEEINFO Object. This array needs to be
 passed into another remote object.


 ATTENDEELIST
 0 - ATTENDEEID
  DATE
  ENROLLMENTID
  ATTENDEEINFO - Object
FNAME
LNAME
PROFILEID - need to creat an array and add this value

 1 - ATTENDEEID
  DATE
  ENROLLMENTID
  ATTENDEEINFO - Object
FNAME
LNAME
PROFILEID - need to creat an array and add this value




[flexcoders] Lagging Panel title

2009-09-16 Thread droponrcll
Hi, all;

I have a component that extends Panel.  The panel title is bound to a private 
bindable variable that I set in commitProperties.  The title variable updates, 
but the titleTextField.text doesn't update, so the title always lags behind.

I haven't done Flex on a regular basis in a few months, so if someone can see 
what I'm doing wrong here, I'd appreciate it:

?xml version=1.0 encoding=utf-8?
mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical 
xmlns:view=com.magnoliamultimedia.view.* title={_title}
mx:states
mx:State name=realObject
mx:AddChild
view:RealCourseObjectProperties width=100% 
height=100% id=realObjectProperties /
/mx:AddChild
/mx:State
/mx:states
mx:Script
![CDATA[
import com.magnoliamultimedia.vo.ContainerItem;
import com.magnoliamultimedia.vo.PresentationContainer;
import com.magnoliamultimedia.vo.RealCourseObject;
private var _propertyObject:*;
private var _propertyObjectChanged:Boolean;
[Bindable]
private var _title:String='Properties';

/**
 * Object whose properties we want to show.
 * Can be RealCourseObject, PresentationContainer, or 
ContainerObject
 */
public function get propertyObject():* {
return _propertyObject;
}
public function set propertyObject(obj:*):void {
if (!(obj is RealCourseObject)  
!(obj is PresentationContainer)  
!(obj is ContainerItem)) 
{
throw new Error('propertyObject must be 
RealCourseObject, PresentationContainer, or ContainerItem.');
return;
}
if (obj != _propertyObject) {
_propertyObject = obj;
_propertyObjectChanged = true;
invalidateProperties();
invalidateDisplayList();
}
}

override protected function commitProperties():void {
super.commitProperties();
if (_propertyObjectChanged) {
//change state to reflect what kind of 
object was selected
if (propertyObject is RealCourseObject) 
{
currentState = 'realObject';
realObjectProperties.realObject 
= propertyObject as RealCourseObject;
}
_title = propertyObject.title + ' 
Properties';
invalidateDisplayList();
_propertyObjectChanged=false;
}
}
]]
/mx:Script
/mx:Panel

Thanks!

Amy



[flexcoders] File size and Embed( image.png )

2009-09-16 Thread flexaustin
Anyone have any suggestions on the best way to import png files and keep the 
file size down?

I have an app that can have up to 1000 imported png images with alpha 
backgrounds in my app. These images are 1 of 40 icons we offer in our app. 
These images were created in illustrator (web 2.0 embossed style) and range in 
size from 2kb to 12kb each depending on the style. The images can be dragged 
around on the screen so lots of redrawing for flashplayer to do.

So would it be better to save them all as art work (icons) in one big swf file 
and then give each symbol name and reference that way? 

Or is there another way that is better?

TIA, J



[flexcoders] ItemRenderer killing datatips in List?

2009-09-16 Thread bgamblin
I've got an object that descends from List, and uses an itemRenderer. Recently, 
I tried adding datatips to it, but nothing shows up. When I set it to use a 
datatipFunction, the function never gets called.

If, however, I remove the itemRenderer, datatips show up properly. Has anybody 
seen this sort of thing before?

(Note: the ItemRenderer creates two objects, but neither one short-circuits 
mouse events or have datatip info of their own)



[flexcoders] Different behaviour between deployment and IDE execution

2009-09-16 Thread tendancer2000
Just finished my first ever Flex app (yay!) and deployed it to my tomcat server 
and it is behaving differently there compared to when I run it within the IDE.

During the execution the Flex app makes an HTTPService call which returns a 404 
if no data is found. My fault handler:

if (event.statusCode != 404)
   Alert.show(A problem occurred fetching the moderation history data:  + 
event.statusCode);

When run from within the IDE I get no alert, but when run from my tomcat server 
I get the alert and the status Code appears as 0, not even a 404. 

Can anyone suggest why this might be? Or any tips for debugging on the server? 
This is also my first attempt at a REST-ful application so maybe returning a 
404 to signify 'no data found' isn't the best thing to do?

Cheers

Paul



[flexcoders] truncateToFit() and concatenated Strings

2009-09-16 Thread Matthew
Hi - 

I have a Label with truncateToFit set to true and a maxWidth. However, the 
htmlText I assign is concatenated a la:

ipText = 'b' +endPointData.ipLabel+ '/b: ' + endPointData.ipValue;

I've researched online and found that truncateToFit() has problems dealing with 
concatenated Strings; my text does not get truncated. 

Has anyone found a solution? 

Thank you for any tips. 



[flexcoders] Carl Tanner?

2009-09-16 Thread Matt Chotin
Carl, if you're on here my reply to you was bounced as it didn't  
recognize your domain.  Please contact me again, hopefully with a  
known working email :-)


[flexcoders] Re: File size and Embed( image.png )

2009-09-16 Thread turbo_vb
Having a central EmbeddedAssets class that the views bind to works well.  You 
can also reduce the image size by saving the png files as flattened pngs.

-TH

--- In flexcoders@yahoogroups.com, flexaustin flexaus...@... wrote:

 Anyone have any suggestions on the best way to import png files and keep the 
 file size down?
 
 I have an app that can have up to 1000 imported png images with alpha 
 backgrounds in my app. These images are 1 of 40 icons we offer in our app. 
 These images were created in illustrator (web 2.0 embossed style) and range 
 in size from 2kb to 12kb each depending on the style. The images can be 
 dragged around on the screen so lots of redrawing for flashplayer to do.
 
 So would it be better to save them all as art work (icons) in one big swf 
 file and then give each symbol name and reference that way? 
 
 Or is there another way that is better?
 
 TIA, J





[flexcoders] How do I get the browser's height and width?

2009-09-16 Thread luvfotography
How do I get the browser's height and width, 
not the swf's height and width, but the browser's height and width,
can I get it without using javascript (external interface)?
thanks,




[flexcoders] JQuery questions

2009-09-16 Thread adamsch1
We were showing our product [written entirely in Flex BTW] to a web developer 
who commented that he could [with about as much trouble] duplicate our 
application via JQuery.

I am not a web developer, so I am not qualified to agree or disagree with his 
comment.  I'm not even sure its a valid statement?  Our application is entirely 
written in Flex [on top of blazeds], and is very involved, we have written many 
custom components for performance or custom behavior in many situations.

My guess is a pure JS route, even with JQuery or another framework would still 
lead you to some porting challenges with the various browsers?

I apologize for the troll like posting in advanced ;)

Shane



RE: [flexcoders] truncateToFit() and concatenated Strings

2009-09-16 Thread Gordon Smith
I don't think it has a problem with concatenated Strings... that would be very 
surprising if it did. But I don't think it works properly with htmlText.

- Gordon

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Matthew
Sent: Wednesday, September 16, 2009 3:52 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] truncateToFit() and concatenated Strings



Hi -

I have a Label with truncateToFit set to true and a maxWidth. However, the 
htmlText I assign is concatenated a la:

ipText = 'b' +endPointData.ipLabel+ '/b: ' + endPointData.ipValue;

I've researched online and found that truncateToFit() has problems dealing with 
concatenated Strings; my text does not get truncated.

Has anyone found a solution?

Thank you for any tips.



[flexcoders] Re: truncateToFit() and concatenated Strings

2009-09-16 Thread turbo_vb
// Plain text gets truncated with a  // HTML text simply gets
clipped, because it is difficult // to skip over the markup and truncate
only the non-markup. // But both plain text and HTML text gets an
automatic tooltip // if the full text isn't visible.-TH
--- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote:

 I don't think it has a problem with concatenated Strings... that would
be very surprising if it did. But I don't think it works properly with
htmlText.

 - Gordon

 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of Matthew
 Sent: Wednesday, September 16, 2009 3:52 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] truncateToFit() and concatenated Strings



 Hi -

 I have a Label with truncateToFit set to true and a maxWidth. However,
the htmlText I assign is concatenated a la:

 ipText = 'b' +endPointData.ipLabel+ '/b: ' + endPointData.ipValue;

 I've researched online and found that truncateToFit() has problems
dealing with concatenated Strings; my text does not get truncated.

 Has anyone found a solution?

 Thank you for any tips.




[flexcoders] Re: truncateToFit() and concatenated Strings

2009-09-16 Thread turbo_vb
Haven't checked it, but this looks like it might work for htmlText:
http://skovalyov.blogspot.com/2007/02/text-control-with-truncatetofit.ht\
ml
http://skovalyov.blogspot.com/2007/02/text-control-with-truncatetofit.h\
tml

-TH
--- In flexcoders@yahoogroups.com, turbo_vb timh...@... wrote:

 // Plain text gets truncated with a  // HTML text simply gets
 clipped, because it is difficult // to skip over the markup and
truncate
 only the non-markup. // But both plain text and HTML text gets an
 automatic tooltip // if the full text isn't visible.-TH
 --- In flexcoders@yahoogroups.com, Gordon Smith gosmith@ wrote:
 
  I don't think it has a problem with concatenated Strings... that
would
 be very surprising if it did. But I don't think it works properly with
 htmlText.
 
  - Gordon
 
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
 On Behalf Of Matthew
  Sent: Wednesday, September 16, 2009 3:52 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] truncateToFit() and concatenated Strings
 
 
 
  Hi -
 
  I have a Label with truncateToFit set to true and a maxWidth.
However,
 the htmlText I assign is concatenated a la:
 
  ipText = 'b' +endPointData.ipLabel+ '/b: ' +
endPointData.ipValue;
 
  I've researched online and found that truncateToFit() has problems
 dealing with concatenated Strings; my text does not get truncated.
 
  Has anyone found a solution?
 
  Thank you for any tips.
 




RE: [flexcoders] ItemRenderer killing datatips in List?

2009-09-16 Thread Alex Harui
The renderer is responsible for showing datatips.  You can see how it is done 
in the default renderer and decide how you want to implement it in your custom 
renderer.

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 bgamblin
Sent: Wednesday, September 16, 2009 11:56 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ItemRenderer killing datatips in List?



I've got an object that descends from List, and uses an itemRenderer. Recently, 
I tried adding datatips to it, but nothing shows up. When I set it to use a 
datatipFunction, the function never gets called.

If, however, I remove the itemRenderer, datatips show up properly. Has anybody 
seen this sort of thing before?

(Note: the ItemRenderer creates two objects, but neither one short-circuits 
mouse events or have datatip info of their own)



Re: [flexcoders] How do I get the browser's height and width?

2009-09-16 Thread Bob Wohl
You pretty much have to get it using JS.
hth!
B.

On Wed, Sep 16, 2009 at 5:02 PM, luvfotography 
ygro...@all-digital-links.com wrote:



 How do I get the browser's height and width,
 not the swf's height and width, but the browser's height and width,
 can I get it without using javascript (external interface)?
 thanks,