[flexcoders] Adobe AIR/FlashBuilder 4.6: Create reminder in Android App

2012-05-25 Thread sdl1326
I am using Flash Builder 4.6 along with Adobe AIR to create an Android App. I 
am looking to create some sort of reminder/appointment that will display a 
notification on screen or in the app bar at the specified time. So far I 
haven't found a way to do this. I thought I might find this functionality in an 
ANE[Actionscript Native Extension], however I have yet to come across one.

Is this possible? Thanks, in advance!



[flexcoders] Spark Datagrid - Show all rows using requestedRowCount variableRowHeight=true

2011-11-16 Thread sdl1326
I have a Flex Spark Datagrid that has variableRowHeight set to true. I also 
have the requestedRowCount set to the length of the dataProvider. So, in theory 
the rows shown should be the same number in the dataprovider(Arraycollection). 
However, the problem is that due to having variableRowHeight=true and some rows 
being multiline, in some instances, all of the rows are not getting shown.

Suggestions on how I can fix this issue?

Thanks, in advance.




[flexcoders] Module's creationComplete() called locally but not remotely

2011-11-03 Thread sdl1326
I have a module that is being loaded using the mxml ModuleLoader. When I
run the course locally on xampp, everything works, including the
Module's creationComplete function. However, upon loading it and testing
on a web server, creationComplete() never gets called. The module loads
correctly including all visual objects, however, the data isn't being
loaded which is handled in the creationComplete function. I have
confirmed this by placing both an Alert.show and Debug.log (Arthropod)
functions in the creationComplete and neither get called when running on
the remote server. Both get executed when testing locally.
Thanks for any and all replies.


[flexcoders] Re: Custom Itemrenderer - maintaining changed value in dropdownlist

2011-10-27 Thread sdl1326
Thanks for the assistance.

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

 You will need the item renderer to act as an item editor. Also, you will need 
 to add an extra field to the data provider to hold this value. On itemEditEnd 
 event, update the dataprovider to reflect the change.
 
 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  I have a custom itemrenderer for a datagrid's column that contains a
  dropdownlist (DDL). This DDL is populated with a set of numbers starting
  at 1 and stopping at the length of the itemrenderer's datagrid
  dataprovider's length (i.e. 1 thru 20). I then have the DDL'S
  selectedIndex set to the row number in which the DDL appears. So,
  looking at the datagrid, first row is set to 1, second row to 2, etc.,
  etc. The DDL is being populated correctly as well as its
  selectedIndexes. This is all being handled in the prepare function of
  the itemrenderer.
  
  The issue comes in when I go to change the DDL's value, if I scroll the
  datagrid, or mouse back over the DDL, the value of the DDL reverts back
  to the original value. I am pretty sure this has something to do with my
  code and the fact that it's been handled in the prepare function as well
  the itemrenderers being recycled(?). I am just not sure how to resolve
  it.
  
  I have included the prepare function code below:
  
   override public function
  prepare(hasBeenRecycled:Boolean):void {
  
  
   if(data != null) {
  
   // grab datagrid reference;
   dg = DataGrid(owner);
  
  
   // since prepare() is called several times only
  populate list_ac
   // to length of dg dataprovider.length;
   if( list_ac.length != dg.dataProvider.length){
  
   for(var i:int=0;i dg.dataProvider.length;i++) {
  
   list_ac.addItem(i+1);
   }
  
   }
  
   // set selected index of dropdownlist(ddl) for
  'this' itemrenderer
   // to match location in row of datagrid(dg);
   for(var j:int = 0;jdg.dataProvider.length;j++){
  
   if(data.question_id == 
  dg.dataProvider.getItemAt(j).question_id){
  
   ddl.selectedIndex = j;
   break;
  
   }
  
   }
  
   }
   }
  
  Please let me know if anything is unclear as I tried to make it as
  straightforward as possible. Thanks, in advance.
 





[flexcoders] Datagrid's Itemrenderer - Access to Datagrid

2011-10-26 Thread sdl1326
I have a custom itemrenderer in a GridColumn of a Spark Datagrid. I need
to get access to the Datagrid from the custom itemrenderer. What's the
best way to do this?

Thanks, in advance.



[flexcoders] Re: Datagrid's Itemrenderer - Access to Datagrid

2011-10-26 Thread sdl1326
Thanks. I should have mentioned that I did initially that and was
getting the following error:

TypeError: Error #1034: Type Coercion failed: cannot convert
spark.components.gridClasses::GridLayer@260fac29 to
spark.components.DataGrid


--- In flexcoders@yahoogroups.com, turbo_vb TimHoff@... wrote:

 Cast the owner property to DataGrid.

 -TH

 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  I have a custom itemrenderer in a GridColumn of a Spark Datagrid. I
need
  to get access to the Datagrid from the custom itemrenderer. What's
the
  best way to do this?
 
  Thanks, in advance.
 




[flexcoders] Re: Datagrid's Itemrenderer - Access to Datagrid

2011-10-26 Thread sdl1326
No, I was casting owner and got that error.
i.e. - Datagrid(owner).dataprovider

--- In flexcoders@yahoogroups.com, turbo_vb TimHoff@... wrote:

 That error looks like you were trying to cast parent instead of owner.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  Thanks. I should have mentioned that I did initially that and was
  getting the following error:
  
  TypeError: Error #1034: Type Coercion failed: cannot convert
  spark.components.gridClasses::GridLayer@260fac29 to
  spark.components.DataGrid
  
  
  --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
  
   Cast the owner property to DataGrid.
  
   -TH
  
   --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
   
I have a custom itemrenderer in a GridColumn of a Spark Datagrid. I
  need
to get access to the Datagrid from the custom itemrenderer. What's
  the
best way to do this?
   
Thanks, in advance.
   
  
 





[flexcoders] Re: Datagrid's Itemrenderer - Access to Datagrid

2011-10-26 Thread sdl1326
That worked! I put it in prepare() and was able to get a reference to the 
datagrid. 

Thanks to all for the assistance.

--- In flexcoders@yahoogroups.com, turbo_vb TimHoff@... wrote:

 Try sticking that in override prepare() or set data(), and make sure that 
 data isn't null, and I bet you that it'll work.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
 
  hmm, don't know what to tell you.  The following works fine:
  
  var myDataProvider:ArrayCollection = DataGrid( owner ).dataProvider as 
  ArrayCollection;
  
  -TH
  
  --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
  
   No, I was casting owner and got that error.
   i.e. - Datagrid(owner).dataprovider
   
   --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
   
That error looks like you were trying to cast parent instead of 
owner.

-TH

--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:

 Thanks. I should have mentioned that I did initially that and was
 getting the following error:
 
 TypeError: Error #1034: Type Coercion failed: cannot convert
 spark.components.gridClasses::GridLayer@260fac29 to
 spark.components.DataGrid
 
 
 --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote:
 
  Cast the owner property to DataGrid.
 
  -TH
 
  --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
  
   I have a custom itemrenderer in a GridColumn of a Spark Datagrid. 
   I
 need
   to get access to the Datagrid from the custom itemrenderer. What's
 the
   best way to do this?
  
   Thanks, in advance.
  
 

   
  
 





[flexcoders] Custom Itemrenderer - maintaining changed value in dropdownlist

2011-10-26 Thread sdl1326
I have a custom itemrenderer for a datagrid's column that contains a
dropdownlist (DDL). This DDL is populated with a set of numbers starting
at 1 and stopping at the length of the itemrenderer's datagrid
dataprovider's length (i.e. 1 thru 20). I then have the DDL'S
selectedIndex set to the row number in which the DDL appears. So,
looking at the datagrid, first row is set to 1, second row to 2, etc.,
etc. The DDL is being populated correctly as well as its
selectedIndexes. This is all being handled in the prepare function of
the itemrenderer.

The issue comes in when I go to change the DDL's value, if I scroll the
datagrid, or mouse back over the DDL, the value of the DDL reverts back
to the original value. I am pretty sure this has something to do with my
code and the fact that it's been handled in the prepare function as well
the itemrenderers being recycled(?). I am just not sure how to resolve
it.

I have included the prepare function code below:

 override public function
prepare(hasBeenRecycled:Boolean):void {


 if(data != null) {

 // grab datagrid reference;
 dg = DataGrid(owner);


 // since prepare() is called several times only
populate list_ac
 // to length of dg dataprovider.length;
 if( list_ac.length != dg.dataProvider.length){

 for(var i:int=0;i dg.dataProvider.length;i++) {

 list_ac.addItem(i+1);
 }

 }

 // set selected index of dropdownlist(ddl) for
'this' itemrenderer
 // to match location in row of datagrid(dg);
 for(var j:int = 0;jdg.dataProvider.length;j++){

 if(data.question_id == 
dg.dataProvider.getItemAt(j).question_id){

 ddl.selectedIndex = j;
 break;

 }

 }

 }
 }

Please let me know if anything is unclear as I tried to make it as
straightforward as possible. Thanks, in advance.




[flexcoders] Catching/Trapping Error #3003: File or directory does not exist

2011-08-19 Thread sdl1326

I am getting the following error:
Error #2044: Unhandled IOErrorEvent:. text=Error #3003: File or
directory does not exist
How can I trap this error? I have tried using a Try/Catch as well as a
listener - see code below:




try {

var sourceFile:File = new File();

sourceFile.addEventListener(IOErrorEvent.IO_ERROR,onSourceFileIoError);

sourceFile = File.desktopDirectory.resolvePath( model.networkDriveLetter
+ \\ + event.payload.asset_location );

}
catch(e:Error){trace('an error has occurred')};



However, neither of these seems to trap the error. Suggestions?

Thanks, in advance.



[flexcoders] Re: Catching/Trapping Error #3003: File or directory does not exist

2011-08-19 Thread sdl1326
Thanks for the reply. I tried the following listeners, all to no avail.
File.desktopDirectory.addEventListener(IOErrorEvent.STANDARD_ERROR_IO_ER\
ROR,onSourceFileIoError)
File.desktopDirectory.addEventListener(IOErrorEvent.NETWORK_ERROR,onSour\
ceFileIoError)
File.desktopDirectory.addEventListener(IOErrorEvent.STANDARD_INPUT_IO_ER\
ROR,onSourceFileIoError)
File.desktopDirectory.addEventListener(IOErrorEvent.STANDARD_OUTPUT_IO_E\
RROR,onSourceFileIoError)File.desktopDirectory.addEventListener(IOErrorE\
vent.IO_ERROR,onSourceFileIoError)
Suggestions?
Thanks, in advance.

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

 Try attaching a listener to File.desktopDirectory


 On 8/19/11 8:40 AM, sdl1326 azsl1326-email@... wrote:






 I am getting the following error:

 Error #2044: Unhandled IOErrorEvent:. text=Error #3003: File or
directory does not exist
 How can I trap this error? I have tried using a Try/Catch as well as a
listener - see code below:



 try {

 var sourceFile:File = new File();


sourceFile.addEventListener(IOErrorEvent.IO_ERROR,onSourceFileIoError);

 sourceFile = File.desktopDirectory.resolvePath(
model.networkDriveLetter + \\ + event.payload.asset_location );

 }
 catch(e:Error){trace('an error has occurred')};


 However, neither of these seems to trap the error. Suggestions?

 Thanks, in advance.





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




[flexcoders] Re: FB4: Looping thru itemrenderers

2010-08-25 Thread sdl1326
Thanks for the assistance. I posted what I was trying to accomplish in the 
reply above. Ultimately, I need to be able to access the next or previous 
itemrenderer from the one that is currently selected.

--- In flexcoders@yahoogroups.com, Gregor Kiddie gregor.kid...@... wrote:

 If you need to access an itemrenderer, there's almost always a better
 way of doing what you are trying to do...
 
  
 
 So, why are you wanting to access the itemrenderer instance?
 
  
 
 Gk.





[flexcoders] Re: FB4: Looping thru itemrenderers

2010-08-25 Thread sdl1326
Thanks for the insight. I think that maybe I am not being as clear as I need to 
be. Apologies for this. 

The itemrenderer has two colors for selected and not selected (blue/red). When 
an itemrenderer is clicked, the background color changes to red and a popup is 
launched, via PopUpManager, containing a larger version of the selected image 
and the 2 navigation buttons(Next/Prev). Clicking, for example, the 'Next' 
button in the popup will load the next image from the dataprovider in the 
popup, however, it will not select the next associated thumbnail(itemrenderer). 
This is the core issue. I need to know how to select the next (or previous) 
itemrenderer in the datacontainer once one of the navigation buttons is 
selected. This needs to be done without actually clicking on the itemrenderer.

Hope these details clear up some of the confusion.

Thank you!



--- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote:

 You should have a background color stored in -- or associated with, in some 
 way -- each data item. Then you should access the next and previous data 
 item, change the background color, and let the renderer re-render the data 
 item.
 
 You cannot generally access the next and previous item renderer, because they 
 may not exist yet. Item renderers get created on demand as items scroll into 
 view.
 
 Gordon Smith
 Adobe Flex SDK Team
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of sdl1326
 Sent: Wednesday, August 25, 2010 9:48 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: FB4: Looping thru itemrenderers
 
 
 
 Thanks for the assistance. I posted what I was trying to accomplish in the 
 reply above. Ultimately, I need to be able to access the next or previous 
 itemrenderer from the one that is currently selected.
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
 Gregor Kiddie gregor.kiddie@ wrote:
 
  If you need to access an itemrenderer, there's almost always a better
  way of doing what you are trying to do...
 
 
 
  So, why are you wanting to access the itemrenderer instance?
 
 
 
  Gk.
 





[flexcoders] FB4: Looping thru itemrenderers

2010-08-24 Thread sdl1326

I have a scrollable SkinnableDataContainer which contains thumbnail
images (in an itemrenderer). While there can be several hundred
thumbnail images, only 10 itemrenderers are viewable on the screen at a
time. If I need to loop through the 10 viewable itemrenderers, what's
the best way to do it?




Thanks, in advance.



[flexcoders] Re: FB4: Looping thru itemrenderers

2010-08-24 Thread sdl1326
Here's some additional insight into what I am trying to do. 

The user can click on one of the thumbnails(itemrenderer) which changes the 
background color and launches a larger version of the image. Within that larger 
image is a next and previous button which will navigate to the next/previous 
image(itemrenderer). I need to be able to change the background color of the 
next/previous thumbnail/itemrenderer. So, in essence, I need to determine the 
next/previous itemrenderer and call the function that will change the 
background color.
 
Thanks.
--- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote:

 You should never do this.  What is the end goal?
 
 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  
  I have a scrollable SkinnableDataContainer which contains thumbnail
  images (in an itemrenderer). While there can be several hundred
  thumbnail images, only 10 itemrenderers are viewable on the screen at a
  time. If I need to loop through the 10 viewable itemrenderers, what's
  the best way to do it?
  
  
  
  
  Thanks, in advance.
 





[flexcoders] Accessing Network Drive in AIR

2010-08-17 Thread sdl1326

I have created an AIR application that accesses files on the network
drive. Each machine that is running the AIR app may have a different
letter/drive mapped to the network drive. Therefore, in order to
alleviate drive mapping issues, I wanted to simply use the absolute
network path to the file(s), i.e.




\\network-drive-location\department folder\config.xml




However, that doesn't seem to work as it consistently throws an error.
Is is possible to load files using this type of path or do I need to
have a letter associated with the path, i.e.




N:\network-drive-location\department folder\config.xml






Thanks for the assistance.



[flexcoders] Re: XMLList to ArrayCollection

2008-08-22 Thread sdl1326
I will try your suggestion. Thank you.

--- In flexcoders@yahoogroups.com, Djamshed [EMAIL PROTECTED] wrote:

 you could try first converting xml to XMLListCollection, which is
 convertable to Array:
 
 var xmlListCollection: XMLListCollection= new
 XMLListCollection(resultXML.children());
 
 var resultArray:Array = xmlListCollection.toArray();
 
 //to convert to ArrayCollection, 1 more step to go
 var resultCollection:ArrayCollection = new ArrayCollection(resultArray);
 
 
 probably there are more efficient ways to do so, but this is the one
 that just works...
 
 cheers,
 Djam.
 
 
 
 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  I am retrieving the following xml via httpsService with the result
  format being 'e4x'.
  projects
   project date=08/01/08 description=Development hours=4
  user=AAQ3/project
   project date=08/01/08 description=Development hours=3
  user=AAQ4/project
   project date=08/04/08 description=Development hours=4
  user=AAQ3/project
   project date=08/04/08 description=Development hours=3
  user=BBQ4/project
   project date=08/05/08 description=Refinement  hours=6
  user=BBQ3/project
   project date=08/06/08 description=Refinement  hours=3
  user=CCQ3/project
   project date=08/07/08 description=Development hours=2
  user=CCQ3/project
   project date=08/08/08 description=Development hours=2
  user=CCQ3/project
  /projects
  What's the best way to convert an XMLList to an ArrayCollection? 
Is it
  possible to do so without knowing the names of the attributes?
  
  Thanks for the assistance.
 





[flexcoders] XML Data - getting unique attributes

2008-08-21 Thread sdl1326
Hello All,

I need to grab all unique attribute values in some xml data. Is there a
quick and dirty way to do this? I could push to an array if the value
doesn't already exist, however I did not know if there was a more
efficient way to get these values.
Example:
data
projects name=Project A /
projects name=Project B /
projects name=Project C /
projects name=Project A /
/data

Unique values would be: Project A, Project B, Project C

Thanks for any and all replies.



[flexcoders] XMLList to ArrayCollection

2008-08-21 Thread sdl1326
I am retrieving the following xml via httpsService with the result
format being 'e4x'.
projects
 project date=08/01/08 description=Development hours=4
user=AAQ3/project
 project date=08/01/08 description=Development hours=3
user=AAQ4/project
 project date=08/04/08 description=Development hours=4
user=AAQ3/project
 project date=08/04/08 description=Development hours=3
user=BBQ4/project
 project date=08/05/08 description=Refinement  hours=6
user=BBQ3/project
 project date=08/06/08 description=Refinement  hours=3
user=CCQ3/project
 project date=08/07/08 description=Development hours=2
user=CCQ3/project
 project date=08/08/08 description=Development hours=2
user=CCQ3/project
/projects
What's the best way to convert an XMLList to an ArrayCollection?  Is it
possible to do so without knowing the names of the attributes?

Thanks for the assistance.



[flexcoders] Re: re-throwing keystrokes to browser?

2008-08-21 Thread sdl1326
Where exactly are you trying to trap the keys? Do you need to prevent
the browser from performing some default function or do you need to
prevent the Flex App from performing some function.
--- In flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ,
ibo [EMAIL PROTECTED] wrote:

 My flex is running on full screen mode on my browser.
 Problem is, if the focus is on the flex app, it wont respond to
browser keystrokes
 like CTRL+T (new tab). I can catch the keycode by listening to keydown
event
 but how do I send it to the browser? (prefrably cross-browser
solution).




[flexcoders] Re: re-throwing keystrokes to browser?

2008-08-21 Thread sdl1326
To clarify my response. I have done some extensive key trapping in
Flash/AS3 where I had to prevent default behaviors in the browser (i.e.
F5, F1, etc). In some instances these keys would be required by the
Flash App. so what I ended up doing was setting the focus constantly on
the browser (via listeners in Flash), trapping the keys, and then
sending the event.keyCode back to the Flash App. via ExternalInterface.

Let me know if you would like more details.

HTH
--- In flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ,
sdl1326 [EMAIL PROTECTED] wrote:

 Where exactly are you trying to trap the keys? Do you need to prevent
 the browser from performing some default function or do you need to
 prevent the Flex App from performing some function.
 --- In flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
,
 ibo poweribo@ wrote:
 
  My flex is running on full screen mode on my browser.
  Problem is, if the focus is on the flex app, it wont respond to
 browser keystrokes
  like CTRL+T (new tab). I can catch the keycode by listening to
keydown
 event
  but how do I send it to the browser? (prefrably cross-browser
 solution).
 




[flexcoders] Re: XMLList to ArrayCollection

2008-08-21 Thread sdl1326
Thanks. Is there a 'quick and dirty' way to convert to array
collection if you know the names of the attributes, etc.

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Sure, but you have to do it manually.  Loop over the nodes, then use the
 attributes() to loop over the attributes.  If I recall correctly,
 attribute[n] will give you the attr value, and attribute[n].name() will
 give you the attr name. XML.name() (or localName()) will give you the
 name of the node.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of sdl1326
 Sent: Thursday, August 21, 2008 5:56 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] XMLList to ArrayCollection
 
  
 
 I am retrieving the following xml via httpsService with the result
 format being 'e4x'. 
 
   projects
   project date=08/01/08 description=Development hours=4
 user=AAQ3/project
   project date=08/01/08 description=Development hours=3
 user=AAQ4/project
   project date=08/04/08 description=Development hours=4
 user=AAQ3/project
   project date=08/04/08 description=Development hours=3
 user=BBQ4/project
   project date=08/05/08 description=Refinement  hours=6
 user=BBQ3/project
   project date=08/06/08 description=Refinement  hours=3
 user=CCQ3/project
   project date=08/07/08 description=Development hours=2
 user=CCQ3/project
   project date=08/08/08 description=Development hours=2
 user=CCQ3/project
   /projects
 
 What's the best way to convert an XMLList to an ArrayCollection?  Is it
 possible to do so without knowing the names of the attributes?
 
 Thanks for the assistance.





[flexcoders] Re: XMLList to ArrayCollection

2008-08-21 Thread sdl1326
Honestly, I do not know as I have not worked with XMLListCollections.
I just need to be able to access the data easily and have only used
Array Collections. It looks like an XMLListCollection might work. Is
there a benefit of using one over the other?
--- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote:

 Could you use an XMLListCollection instead of an ArrayCollection?
 
  
 
 Gordon Smith
 
 Adobe Flex SDK Team
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Tracy Spratt
 Sent: Thursday, August 21, 2008 4:52 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] XMLList to ArrayCollection
 
  
 
 Sure, but you have to do it manually.  Loop over the nodes, then use the
 attributes() to loop over the attributes.  If I recall correctly,
 attribute[n] will give you the attr value, and attribute[n].name() will
 give you the attr name. XML.name() (or localName()) will give you the
 name of the node.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of sdl1326
 Sent: Thursday, August 21, 2008 5:56 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] XMLList to ArrayCollection
 
  
 
 I am retrieving the following xml via httpsService with the result
 format being 'e4x'. 
 
   projects
   project date=08/01/08 description=Development hours=4
 user=AAQ3/project
   project date=08/01/08 description=Development hours=3
 user=AAQ4/project
   project date=08/04/08 description=Development hours=4
 user=AAQ3/project
   project date=08/04/08 description=Development hours=3
 user=BBQ4/project
   project date=08/05/08 description=Refinement  hours=6
 user=BBQ3/project
   project date=08/06/08 description=Refinement  hours=3
 user=CCQ3/project
   project date=08/07/08 description=Development hours=2
 user=CCQ3/project
   project date=08/08/08 description=Development hours=2
 user=CCQ3/project
   /projects
 
 What's the best way to convert an XMLList to an ArrayCollection?  Is it
 possible to do so without knowing the names of the attributes?
 
 Thanks for the assistance.





[flexcoders] Loading Flex created SWF into Flash SWF - strange issue

2008-08-15 Thread sdl1326
I am importing a Flex created SWF into a Flash created SWF. While this
probably isn't standard practice, it works nicely in my case, with one
exception. In design mode the width of the Flex container is 300px.
The Flex SWF is being loaded into an empty MC (in Flash) so in theory
the width should be 300px. Yet for some unknown reason, the width of
the MC jumps to 822px with the remaining 522px being unaccounted for
(the Flex SWF is still 300px with no distortion or scaling issues and
a trace on the MC yields that the width is 822px).

Again, I know this isn't standard practice so any insight or
assistance is certainly appreciated.



[flexcoders] Re: Loading Flex created SWF into Flash SWF - strange issue

2008-08-15 Thread sdl1326
Thanks for the reply. I believe I found the answer, albeit not a
solution, here
(http://seeing-is-believing.blogspot.com/2007/11/flex-components-in-flash-example-with.html).
Per the comments section:

Apparently Flex creates an invisible layer that covers the whole
stage (mx.managers.SystemManager), which catches all events such as
mouse clicks that are not caught by any other Flex components. This
only happens on the root Flex swf that's loaded, and any other swf's
that are loaded on top of it recognize the first Flex application as
their root, and won't create a new SystemManager layer.



--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 The width of an mc includes any offscreen things and areas outside of
 masks.  That's one reason UIComponent imposes a more traditional
 width/height semantic
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of sdl1326
 Sent: Friday, August 15, 2008 8:54 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Loading Flex created SWF into Flash SWF - strange
 issue
 
  
 
 I am importing a Flex created SWF into a Flash created SWF. While this
 probably isn't standard practice, it works nicely in my case, with one
 exception. In design mode the width of the Flex container is 300px.
 The Flex SWF is being loaded into an empty MC (in Flash) so in theory
 the width should be 300px. Yet for some unknown reason, the width of
 the MC jumps to 822px with the remaining 522px being unaccounted for
 (the Flex SWF is still 300px with no distortion or scaling issues and
 a trace on the MC yields that the width is 822px).
 
 Again, I know this isn't standard practice so any insight or
 assistance is certainly appreciated.





[flexcoders] Re: Copied project gives security sandbox violation

2008-07-10 Thread sdl1326
I had this issue when copying a project. Try the following:

-locale en_US -use-network=false

It worked for me.


--- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote:

 No, the compiler options are the same for both projects (-locale en_US
 -services services-config.xml).
 
 Adding -use-network=true to the compiler options makes no difference.
 
 Any other ideas? Anyone else?
 
 
 
 BTW. I am re-reading the Adobe documents on policy files...

http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html

http://www.adobe.com/devnet/flashplayer/articles/flash_player9_security_update.html#policy_file
 
 and Security Sandbox...

http://livedocs.adobe.com/flex/3/html/help.html?content=05B_Security_04.html
 
 --- In flexcoders@yahoogroups.com, Jon Bradley jbradley@ wrote:
 
  
  On Jul 10, 2008, at 8:36 AM, valdhor wrote:
  
   Once this was complete and compiled it gives me a security sandbox
   violation for every remote call. Cleaning the project has no effect.
  
  Did you per chance modify the compiler options for the first project?
  
  I might've seen this before, but make sure that the new project you  
  created has the additional compiler option -use-network=true.
  
  Just a stab in the dark
  
  good luck,
  
  jon
 





[flexcoders] Re: Putting returned xml data into ArrayCollection using Cairngorm framwork (Command Class/Delegate Class/IResponder)

2008-07-10 Thread sdl1326
Here's a sample xml that's getting loaded in via http service:

images duration=3000 effect=Fade startDelay=2000
image name=image.jpg url=http://www.cnn.com/
image name=image1.jpg url=http://www.usatoday.com; /
image name=image2.jpg url=http://www.msnbc.com; /
image name=image3.jpg url=http://www.digg.com; /
image name=image4.jpg url=http://www.google.com; /
/images

If I change the code in the result handler to:

var ac:ArrayCollection = ResultEvent( data ).result.images.image

Then I have no issues putting it directly into an array collection.
It's only when I remove the (.image) and have the following:

var ac:ArrayCollection = ResultEvent( data ).result.images

Is when I get the coercion error. Is there any reason why I shouldn't
continue to put the data in an array collection via the 1st method?

TIA

--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 You're getting an ObjectProxy because you're using the object result
 format. To convert to ArrayCollection:
 
 var myArray:Array = [];
 for each (var img:* in result.images)
 {
 myArray.pish(img);
 }
 
 myCollection = new ArrayCollection(myArray);
 
 -Josh
 
 On Thu, Jul 10, 2008 at 1:31 PM, sdl1326 [EMAIL PROTECTED] wrote:
 
  Thanks for the assistance.
 
  I have left the resultformat blank (feel free to share why I shouldn't
  do this as I am always looking for best practices/advice). However,in
  previous projects, I have taken the return data from an http service
  and immediately put it in an arraycollection in the resulthandler. I
  just assumed the same could be done here when using Cairngorm, but
  apparently something isn't correct. I tried your suggestion below and
  am still receiving an error:
 
  TypeError: Error #1034: Type Coercion failed: cannot convert
  mx.utils::[EMAIL PROTECTED] to Array.
 
  Thanks in advance.
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





[flexcoders] Re: Putting returned xml data into ArrayCollection using Cairngorm framwork (Command Class/Delegate Class/IResponder)

2008-07-10 Thread sdl1326
Tracy, thanks for the very detailed reply. I changed the resultFormat=
'e4x'. So, I want to put the xml data into an arraycollection and am
trying the following code:

var xmlResult:XML = new XML(event.result);

xmlImages_ac = new ArrayCollection();

// push XML to ArrayCollection
for each(var item:XML in xmlResult.image){
   
  xmlImages_ac.addItem(item);
}

trace('xmlImages_ac - ' + xmlImages_ac)

For whatever reason, I can not seem to get this to work as it simply
traces out:

  xmlImages_ac - 

Can you point to where I am getting tripped up?

Thanks for the assistance.

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 You have found one reason not to use resultFormat=object.  That result
 format causes flex to convert your result data, which is xml, into a
 tree of dynamic objects.  You have no control over this process(, and it
 has some issues, particularly that  values that look like numbers are
 converted to numbers) and it is even hard to predict.  It is also hard
 to debug, though you can use ObjUtil.toString() to see the contents.  
 
  
 
 What is happening in your case is the images node becomes an object
 containing an Array or image nodes.  So this expression:
 
 result.images.image returns an Array, which you can directly wrap in an
 ArrayCollection.  I would not expect the direct assignment to work like
 you show it, and doing it that way hides what is really happening.  This
 is more clear:
 
 var aResult:Array = ResultEvent( data ).result.images.image;
 
 trace(aResult.length); //is this what you expect
 
 var acImages:ArrayCollection = new ArrayCollection(aResult);
 
  
 
 Since an Array is an object, Josh's suggestion to use a for..in loop
 would work also.
 
  
 
 I advise using resultFormat=e4x.  This leaves your result data as XML,
 so you can do:
 
 var xmlResult:XML = XML(ResultEvent( data ).result);
 
 trace(xmlResult.toXMLSTring());  //you will see your xml, unchanged.
 
  
 
 Now, you can use the xml directly, or use XMLList, or XMLListCollection,
 or combinations of the three.
 
  
 
 Or, if you want, you can convert your xml, or parts thereof, into
 ArrayCollections.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of sdl1326
 Sent: Thursday, July 10, 2008 12:16 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Putting returned xml data into ArrayCollection
 using Cairngorm framwork (Command Class/Delegate Class/IResponder)
 
  
 
 Here's a sample xml that's getting loaded in via http service:
 
 images duration=3000 effect=Fade startDelay=2000
 image name=image.jpg url=http://www.cnn.com http://www.cnn.com /
 image name=image1.jpg url=http://www.usatoday.com
 http://www.usatoday.com  /
 image name=image2.jpg url=http://www.msnbc.com
 http://www.msnbc.com  /
 image name=image3.jpg url=http://www.digg.com http://www.digg.com
  /
 image name=image4.jpg url=http://www.google.com
 http://www.google.com  /
 /images
 
 If I change the code in the result handler to:
 
 var ac:ArrayCollection = ResultEvent( data ).result.images.image
 
 Then I have no issues putting it directly into an array collection.
 It's only when I remove the (.image) and have the following:
 
 var ac:ArrayCollection = ResultEvent( data ).result.images
 
 Is when I get the coercion error. Is there any reason why I shouldn't
 continue to put the data in an array collection via the 1st method?
 
 TIA
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Josh McDonald dznuts@ wrote:
 
  You're getting an ObjectProxy because you're using the object result
  format. To convert to ArrayCollection:
  
  var myArray:Array = [];
  for each (var img:* in result.images)
  {
  myArray.pish(img);
  }
  
  myCollection = new ArrayCollection(myArray);
  
  -Josh
  
  On Thu, Jul 10, 2008 at 1:31 PM, sdl1326 azsl1326-email@ wrote:
  
   Thanks for the assistance.
  
   I have left the resultformat blank (feel free to share why I
 shouldn't
   do this as I am always looking for best practices/advice).
 However,in
   previous projects, I have taken the return data from an http service
   and immediately put it in an arraycollection in the resulthandler. I
   just assumed the same could be done here when using Cairngorm, but
   apparently something isn't correct. I tried your suggestion below
 and
   am still receiving an error:
  
   TypeError: Error #1034: Type Coercion failed: cannot convert
   mx.utils::[EMAIL PROTECTED] to Array.
  
   Thanks in advance.
  
  
  
  
  -- 
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
  
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: josh@
 





[flexcoders] Re: Putting returned xml data into ArrayCollection using Cairngorm framwork (Command Class/Delegate Class/IResponder)

2008-07-10 Thread sdl1326
Ok, thanks.

So, looking at the original xml file ( below) if I want to add both
the name and url (data) to the array collection, is this the most
efficient way to accomplish this?

 var xmlResult:XML = new XML(event.result);
 xmlImages_ac = new ArrayCollection();

 // push XML to ArrayCollection
 for each(var item:XML in xmlResult.image){
var obj:Object = new Object()
obj.url = [EMAIL PROTECTED];
obj.name = [EMAIL PROTECTED];
xmlImages_ac.addItem(obj);
 }

TIA

--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 That's right, because when you trace the ArrayCollection it converts its
 children to String, and your nodes have no inner text, so they
toString() as
 .
 
 Instead of addItem(item), try addItem([EMAIL PROTECTED])
 
 -Josh
 
 On Fri, Jul 11, 2008 at 6:57 AM, sdl1326 [EMAIL PROTECTED] wrote:
 
  Tracy, thanks for the very detailed reply. I changed the resultFormat=
  'e4x'. So, I want to put the xml data into an arraycollection and am
  trying the following code:
 
 var xmlResult:XML = new XML(event.result);
 
 xmlImages_ac = new ArrayCollection();
 
 // push XML to ArrayCollection
 for each(var item:XML in xmlResult.image){
 
   xmlImages_ac.addItem(item);
 }
 
 trace('xmlImages_ac - ' + xmlImages_ac)
 
  For whatever reason, I can not seem to get this to work as it simply
  traces out:
 
   xmlImages_ac - 
 
  Can you point to where I am getting tripped up?
 
  Thanks for the assistance.
 
  --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote:
  
   You have found one reason not to use resultFormat=object. 
That result
   format causes flex to convert your result data, which is xml, into a
   tree of dynamic objects.  You have no control over this
process(, and it
   has some issues, particularly that  values that look like
numbers are
   converted to numbers) and it is even hard to predict.  It is
also hard
   to debug, though you can use ObjUtil.toString() to see the contents.
  
  
  
   What is happening in your case is the images node becomes an
object
   containing an Array or image nodes.  So this expression:
  
   result.images.image returns an Array, which you can directly
wrap in an
   ArrayCollection.  I would not expect the direct assignment to
work like
   you show it, and doing it that way hides what is really
happening.  This
   is more clear:
  
   var aResult:Array = ResultEvent( data ).result.images.image;
  
   trace(aResult.length); //is this what you expect
  
   var acImages:ArrayCollection = new ArrayCollection(aResult);
  
  
  
   Since an Array is an object, Josh's suggestion to use a for..in loop
   would work also.
  
  
  
   I advise using resultFormat=e4x.  This leaves your result data
as XML,
   so you can do:
  
   var xmlResult:XML = XML(ResultEvent( data ).result);
  
   trace(xmlResult.toXMLSTring());  //you will see your xml, unchanged.
  
  
  
   Now, you can use the xml directly, or use XMLList, or
XMLListCollection,
   or combinations of the three.
  
  
  
   Or, if you want, you can convert your xml, or parts thereof, into
   ArrayCollections.
  
  
  
   Tracy
  
  
  
   
  
   From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
   Behalf Of sdl1326
   Sent: Thursday, July 10, 2008 12:16 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Re: Putting returned xml data into
ArrayCollection
   using Cairngorm framwork (Command Class/Delegate Class/IResponder)
  
  
  
   Here's a sample xml that's getting loaded in via http service:
  
   images duration=3000 effect=Fade startDelay=2000
   image name=image.jpg url=http://www.cnn.com
http://www.cnn.com /
   image name=image1.jpg url=http://www.usatoday.com
   http://www.usatoday.com  /
   image name=image2.jpg url=http://www.msnbc.com
   http://www.msnbc.com  /
   image name=image3.jpg url=http://www.digg.com
http://www.digg.com
/
   image name=image4.jpg url=http://www.google.com
   http://www.google.com  /
   /images
  
   If I change the code in the result handler to:
  
   var ac:ArrayCollection = ResultEvent( data ).result.images.image
  
   Then I have no issues putting it directly into an array collection.
   It's only when I remove the (.image) and have the following:
  
   var ac:ArrayCollection = ResultEvent( data ).result.images
  
   Is when I get the coercion error. Is there any reason why I
shouldn't
   continue to put the data in an array collection via the 1st method?
  
   TIA
  
   --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.comflexcoders%2540yahoogroups.com
  
   , Josh McDonald dznuts@ wrote:
   
You're getting an ObjectProxy because you're using the
object result
format. To convert to ArrayCollection:
   
var myArray:Array = [];
for each (var img

[flexcoders] Re: Putting returned xml data into ArrayCollection using Cairngorm framwork (Command Class/Delegate Class/IResponder)

2008-07-10 Thread sdl1326
Makes sense, thank you for the assistance.

So, the steps suggested by yourself and others in this thread are
ultimately a better/preferred way to work with and handle xml data
when it's retrieved from an http service?


--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 If you are going to do this, make an ArrayCollection, you should build a
 class(value object, VO) with strongly typed public properties.
 
  
 
 In the loop, new that class, then assign the xml node property values
 to the appropriate value object properties.  Push that VO onto a
 temporary array.  When the loop is done, wrap the array in an
 ArrayCollection.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of sdl1326
 Sent: Thursday, July 10, 2008 6:25 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Putting returned xml data into ArrayCollection
 using Cairngorm framwork (Command Class/Delegate Class/IResponder)
 
  
 
 Ok, thanks.
 
 So, looking at the original xml file ( below) if I want to add both
 the name and url (data) to the array collection, is this the most
 efficient way to accomplish this?
 
 var xmlResult:XML = new XML(event.result);
 xmlImages_ac = new ArrayCollection();
 
 // push XML to ArrayCollection
 for each(var item:XML in xmlResult.image){
 var obj:Object = new Object()
 obj.url = [EMAIL PROTECTED];
 obj.name = [EMAIL PROTECTED];
 xmlImages_ac.addItem(obj);
 }
 
 TIA
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Josh McDonald dznuts@ wrote:
 
  That's right, because when you trace the ArrayCollection it converts
 its
  children to String, and your nodes have no inner text, so they
 toString() as
  .
  
  Instead of addItem(item), try addItem([EMAIL PROTECTED])
  
  -Josh
  
  On Fri, Jul 11, 2008 at 6:57 AM, sdl1326 azsl1326-email@ wrote:
  
   Tracy, thanks for the very detailed reply. I changed the
 resultFormat=
   'e4x'. So, I want to put the xml data into an arraycollection and am
   trying the following code:
  
   var xmlResult:XML = new XML(event.result);
  
   xmlImages_ac = new ArrayCollection();
  
   // push XML to ArrayCollection
   for each(var item:XML in xmlResult.image){
  
   xmlImages_ac.addItem(item);
   }
  
   trace('xmlImages_ac - ' + xmlImages_ac)
  
   For whatever reason, I can not seem to get this to work as it simply
   traces out:
  
   xmlImages_ac - 
  
   Can you point to where I am getting tripped up?
  
   Thanks for the assistance.
  
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote:
   
You have found one reason not to use resultFormat=object. 
 That result
format causes flex to convert your result data, which is xml, into
 a
tree of dynamic objects. You have no control over this
 process(, and it
has some issues, particularly that values that look like
 numbers are
converted to numbers) and it is even hard to predict. It is
 also hard
to debug, though you can use ObjUtil.toString() to see the
 contents.
   
   
   
What is happening in your case is the images node becomes an
 object
containing an Array or image nodes. So this expression:
   
result.images.image returns an Array, which you can directly
 wrap in an
ArrayCollection. I would not expect the direct assignment to
 work like
you show it, and doing it that way hides what is really
 happening. This
is more clear:
   
var aResult:Array = ResultEvent( data ).result.images.image;
   
trace(aResult.length); //is this what you expect
   
var acImages:ArrayCollection = new ArrayCollection(aResult);
   
   
   
Since an Array is an object, Josh's suggestion to use a for..in
 loop
would work also.
   
   
   
I advise using resultFormat=e4x. This leaves your result data
 as XML,
so you can do:
   
var xmlResult:XML = XML(ResultEvent( data ).result);
   
trace(xmlResult.toXMLSTring()); //you will see your xml,
 unchanged.
   
   
   
Now, you can use the xml directly, or use XMLList, or
 XMLListCollection,
or combinations of the three.
   
   
   
Or, if you want, you can convert your xml, or parts thereof, into
ArrayCollections.
   
   
   
Tracy
   
   
   

   
From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
Behalf Of sdl1326
Sent: Thursday, July 10, 2008 12:16 PM
To: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
Subject: [flexcoders] Re: Putting returned xml data into
 ArrayCollection
using Cairngorm framwork (Command Class/Delegate Class/IResponder)
   
   
   
Here's a sample xml that's getting loaded in via http service:
   
images duration=3000 effect=Fade startDelay=2000
image name=image.jpg url=http://www.cnn.com
 http

[flexcoders] Re: Putting returned xml data into ArrayCollection using Cairngorm framwork (Command Class/Delegate Class/IResponder)

2008-07-09 Thread sdl1326
Thanks for the assistance. 

I have left the resultformat blank (feel free to share why I shouldn't
do this as I am always looking for best practices/advice). However,in
previous projects, I have taken the return data from an http service
and immediately put it in an arraycollection in the resulthandler. I
just assumed the same could be done here when using Cairngorm, but
apparently something isn't correct. I tried your suggestion below and
am still receiving an error:

TypeError: Error #1034: Type Coercion failed: cannot convert
mx.utils::[EMAIL PROTECTED] to Array.

Thanks in advance.





--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 You can't cast (as) unless the variable is an object that contains an
 instance of what you are casting to.  HTTPService will not be returning
 an ArrayCollection.  It is probably an Array, assuming you have left the
 resultFormat at its default object. (this is usually bad, but that is
 a different story)
 
  
 
 You probably want something like:
 
 var aResult:Array = ResultEvent( data ).result.images;
 
 trace(aResult.length); //what you expect?
 
 var ac:ArrayCollection = new ArrayCollection(aResult);
 
  
 
 Tracy
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of [EMAIL PROTECTED]
 Sent: Wednesday, July 09, 2008 8:00 PM
 To: flex
 Subject: [flexcoders] Putting returned xml data into ArrayCollection
 using Cairngorm framwork (Command Class/Delegate Class/IResponder)
 
  
 
 I am using an httpService to grab some xml data. Using the Cairngorm
 framework, I have the results sent back to the Command Class
 (implementing IResponder) from the Delegate Class. As simple as this
 might sound, it's frustrating me beyond belief ... what's the simplest
 way to put the returned data into an array collection? If I trace out
 the returned data (see code), I get an object. However, if I attempt to
 put the returned data in an object, it traces out 'null'.
 
 public function result(data:Object):void{
 
 trace(ResultEvent( data ).result.images) // traces object
 var ac:ArrayCollection = ResultEvent( data ).result.images
 as ArrayCollection
 trace(ac) // traces null
 }
 
 Can someone shed some light on the error of my ways?
 
 Thanks in advance.





[flexcoders] Setting unique ID with repeater and custom component

2008-06-27 Thread sdl1326
I am using the Tile Component along with a repeater and then a custom
component (image control). Is it possible to give the custom component
a unique id/name? I have tried to use a variable associated with the
current repeater item ({repeater.currentItem.name}), however, it does
not seem that this is possible as I am getting an error that the ID is
not a valid identifier.

Thanks for any and all replies.




[flexcoders] Re: Setting unique ID with repeater and custom component

2008-06-27 Thread sdl1326
Thanks. I believe that's exactly what I need. I will also check out
the 'help' section for the repeater.

Thanks again.

--- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
 
  I am using the Tile Component along with a repeater and then a custom
  component (image control). Is it possible to give the custom component
  a unique id/name? I have tried to use a variable associated with the
  current repeater item ({repeater.currentItem.name}), however, it does
  not seem that this is possible as I am getting an error that the ID is
  not a valid identifier.
  
  Thanks for any and all replies.
 
 
 If you have something like this:
 
 mx:Repeater id=theRepeater dataProvider={yourAC}
yourNS:YourComponent id=foo/
 /mx:Repeater
 
 then you can refer to any repeated component by its index within foo.  
 i.e. foo[0] is the first component.  This is pretty thoroughly 
 documented in the help for Repeater.
 
 HTH;
 
 Amy





[flexcoders] Re: Setting unique ID with repeater and custom component

2008-06-27 Thread sdl1326
Adobe must have thought at least more than one person would need the
functionality otherwise I don't think they would have thoroughly 
documented it in the help section.

--- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote:

 I don't know about most people but I never need to know the id of a
 repeated item.
 
 All of the items I have in a repeater are instances of a specific
 object. This object has class members and functions and can do
 everything it needs to do on its own. If I need it to (Which is
 infrequent) each object can get to its parent or even the Application
 object itself.
 
 So, I ask, Why would you need to refer to a repeated component?
 
 
 --- In flexcoders@yahoogroups.com, Amy amyblankenship@ wrote:
 
  --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:
  
   I am using the Tile Component along with a repeater and then a
custom
   component (image control). Is it possible to give the custom
component
   a unique id/name? I have tried to use a variable associated with the
   current repeater item ({repeater.currentItem.name}), however, it
does
   not seem that this is possible as I am getting an error that the
ID is
   not a valid identifier.
   
   Thanks for any and all replies.
  
  
  If you have something like this:
  
  mx:Repeater id=theRepeater dataProvider={yourAC}
 yourNS:YourComponent id=foo/
  /mx:Repeater
  
  then you can refer to any repeated component by its index within
foo.  
  i.e. foo[0] is the first component.  This is pretty thoroughly 
  documented in the help for Repeater.
  
  HTH;
  
  Amy
 





[flexcoders] Re: Load Flex SWF into Flash - Error Msg

2008-03-06 Thread sdl1326
Thanks for the information, especially about the loader being added to
the display list.

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Loading Flex into Flash is not guaranteed to work, especially if fl.*
 components are involved.  Flex expects to have access to the stage and
 makes other assumptions.  Any loader loading a Flex app must be added to
 the display list before calling load().
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of [EMAIL PROTECTED]
 Sent: Thursday, March 06, 2008 2:24 PM
 To: flex
 Subject: [flexcoders] Load Flex SWF into Flash - Error Msg
 
  
 
 Hello All ---
 
 I am just moving into Flex 3 from Flash CS3/AS3 and am trying to import
 a Flex compiled SWF into Flash. I followed this tutorial, which seems to
 work well:
 
 http://seeing-is-believing.blogspot.com/2007/11/flex-components-in-flash
 -example-with.html
 http://seeing-is-believing.blogspot.com/2007/11/flex-components-in-flas
 h-example-with.html 
 
 If I put the code on a frame in Flash, not using any custom document
 class everything works fine. However, when I try and load the Flex SWF
 into my Flash Document class via a custom class loading file which
 basically implements the prior referenced code, I get the following
 error:
 
 TypeError: Error #1009: Cannot access a property or method of a null
 object reference.
 at mx.managers::LayoutManager/set
 usePhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\
 mx\managers\LayoutManager.as:325]
 at
 mx.core::Application()[E:\dev\3.0.x\frameworks\projects\framework\src\mx
 \core\Application.as:274]
 at CDForm()[C:\TriggerFish FLEX\src\CDForm.mxml:0]
 at _CDForm_mx_managers_SystemManager/create()
 at
 mx.managers::SystemManager/initializeTopLevelWindow()[E:\dev\3.0.x\frame
 works\projects\framework\src\mx\managers\SystemManager.as:2438]
 at mx.managers::SystemManager/http://www.a!
 dobe.com/2006/flex/mx/internal::docFrameHandler()[E:\dev\3.0.x\framework
 s\projects\framework\src\mx\managers\SystemManager.as:2330
 http://www.adobe.com/2006/flex/mx/internal::docFrameHandler%28%29%5BE:%
 5Cdev%5C3.0.x%5Cframeworks%5Cprojects%5Cframework%5Csrc%5Cmx%5Cmanagers%
 5CSystemManager.as:2330 ]
 
 Any insight into why I am getting this error:
 
 Thanks for any and all replies.





[flexcoders] Re: SWF File Size

2007-12-21 Thread sdl1326
Thanks for the very detailed response. Initially, I am trying to
create some components in Flex and use them (import) in Flash, thus
the reason for the small file size. As I am sure you are aware, they
stripped a lot of the better/more used components(IMO) out of CS3. I
am not sure if I can still use the method you first mention for what I
want to do?

Thanks again.

--- In flexcoders@yahoogroups.com, Samuel R. Neff [EMAIL PROTECTED]
wrote:

 If you need to create really small SWFs for something then you can
create an
 ActionScript project and use only Flash core classes/APIs.  This
isn't good
 if you're doing any kind of real application, but it can be helpful
if you
 need to make some kind of tiny swf.  For example, we use a small SWF
that is
 nothing more than only line of code that sends data received via
FlashVars
 out over a local connection.  This swf is under 300 _bytes_.  I'm also
 working on an HTML project that I am going to leverage Flash's clipboard
 functionality and will use a similar AS-only SWF.
  
 If you need a real Flex app then keep in mind that Flex is not
really made
 to produce an app with a simple title window and a button.  It
shines for
 larger applications with many screens and provides a very rich and
stateful
 client.  In those types of applications, the size of the SWF is a tiny
 fraction of what the total html/css/images/javascript would be of a
 comparable HTML app and AMF calls will be a fraction of the data
that would
 be sent as JSON in an AJAX app.
  
 So in short, while framework caching that others mentioned is great new
 feature in Flex 3 that will make SWF sizes smaller, I think the problem
 itself is deceptive 'cause you get the hit at once up front and new
 developers don't realize that it is the entire hit, once loaded, you're
 pretty much done, unlike an HTML app that constantly is sending lots
of new
 pages or even an AJAX app that is sending JSON which is a lot
heavier than
 AMF.
  
 HTH,
  
 Sam
 
 ---
 We're Hiring! Seeking a passionate developer to join our team
building Flex
 based products. Position is in the Washington D.C. metro area. If
interested
 contact [EMAIL PROTECTED]
   
 
  
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of [EMAIL PROTECTED]
 Sent: Thursday, December 20, 2007 4:20 PM
 To: flex
 Subject: [flexcoders] SWF File Size
 
 
 Hello All ---
 
 I am new to Flex and just started using the Beta of Flex 3. I created a
 simple TitleWindow with a generic button and noticed that the file
size of
 the SWF is about 254KB. If I remove all of the code and just publish an
 empty application file, the size drops to 238KB. Is there a way to
reduce
 the overall file size. Are things getting compiled that are extraneous?
 
 Thanks for any and all replies.





[flexcoders] Re: SWF File Size

2007-12-20 Thread sdl1326
Thanks. That dropped about 95kb off of the file size ~ down to 160kb.
However, it is still pretty bloated. Again, removing all of the
component code, and just publishing the basic application file code,
drops 10kb off of the fie size down to 150kb. Which means the
component is only 10kb. IMO, that seems like a lot of overhead. Are
there any other tricks? 

--- In flexcoders@yahoogroups.com, Aaron Hergenreder [EMAIL PROTECTED] 
wrote:

 If you go to Project-Export Release Build it will reduce the file size
 some.  I'm sure there is some overhead, but I believe the release build
 removes the debugging overhead (just guessing).  Try that and see
what you
 come up with.
  
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of [EMAIL PROTECTED]
 Sent: Thursday, December 20, 2007 4:20 PM
 To: flex
 Subject: [flexcoders] SWF File Size
 
 
 
 
 Hello All ---
 
 I am new to Flex and just started using the Beta of Flex 3. I created a
 simple TitleWindow with a generic button and noticed that the file
size of
 the SWF is about 254KB. If I remove all of the code and just publish an
 empty application file, the size drops to 238KB. Is there a way to
reduce
 the overall file size. Are things getting compiled that are extraneous?
 
 Thanks for any and all replies.





[flexcoders] Re: Basic Question from a Flex Newbie

2007-12-17 Thread sdl1326
Thanks for the help and insight.

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Here is an example that shows several ways to pass data between a popup
 and the main app.  It does not use events, which you should also look
 into.
 
 http://www.cflex.net/showFileDetails.cfm?ObjectID=558
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of [EMAIL PROTECTED]
 Sent: Saturday, December 15, 2007 6:46 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Basic Question from a Flex Newbie
 
  
 
 Hello All 
 
 I have been using Flash and AS3 for some time now, however I am new to
 Flex (and this group) and looking forward to seeing all that it can do.
 I have come across a situation which I believe to be rather simple to
 resolve, yet I have been unable to do so. I have my Application file
 which is calling a PopUp Component created with a TitleWindow Component.
 I have a button in the Application file that when it's clicked will open
 the PopUpComponent. How can I pass a variable/parameter from the
 Application to the TitleWindow for the text . Here's the code I am using
 in Application:
 
 --
 ?xml version=1.0 encoding=utf-8?
 
 mx:Script
 ![CDATA[
 
 import dialogue.SimpleDialogue;
 import mx.managers.PopUpManager
 import mx.containers.TitleWindow;
 
 private var myPopUp:TitleWindow
 
 private function showPopUp():void
 
 myPopUp =
 PopUpManager.createPopUp(this,dialogue.SimpleDialogue,true) as
 TitleWindow;
 PopUpManager.centerPopUp(myPopUp)
 }
 ]]
 /mx:Script
 
 mx:Button label=Show Popup Dialogue click=showPopUp()/mx:Button
 /mx:Application
 
 --
 
 And here's the code in the Component:
 -
 //SimpleDialogue Component
 
 ?xml version=1.0 encoding=utf-8?
 
 mx:Label id=message text= fontSize=24
 
 /mx:Label
 
 /mx:TitleWindow
 ---
 
 Hopefully, this makes sense. If not, I would be happy to clarify. Thanks
 for any and all replies.
 
 SL





[flexcoders] Re: Basic Question from a Flex Newbie

2007-12-16 Thread sdl1326
Thanks for the help. That's exactly what I want to do, but I can't
seem to figure out how to pass the value to the popup window for the
main text. I got the title as myPopUp.title=This is the title bar
text, but no luck with the main text.

Again, thanks.

--- In flexcoders@yahoogroups.com, Seth Caldwell [EMAIL PROTECTED] wrote:

 I'm confused by exactly what you want to do. You have a reference to the
 SimpleDialog/TitleWindow class you just created (myPopUp).
 
 After you center it, why not just set some value on it?
myPopUp.somestring =
 hello;
 
  
 
  
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of [EMAIL PROTECTED]
 Sent: Saturday, December 15, 2007 3:46 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Basic Question from a Flex Newbie
 
  
 
 Hello All 
 
 I have been using Flash and AS3 for some time now, however I am new
to Flex
 (and this group) and looking forward to seeing all that it can do. 
I have
 come across a situation which I believe to be rather simple to
resolve, yet
 I have been unable to do so. I have my Application file which is
calling a
 PopUp Component created with a TitleWindow Component. I have a
button in the
 Application file that when it's clicked will open the
PopUpComponent. How
 can I pass a variable/parameter from the Application to the
TitleWindow for
 the text . Here's the code I am using in Application:
 
 --
 ?xml version=1.0 encoding=utf-8?
 
 mx:Script
 ![CDATA[
 
 import dialogue.SimpleDialogue;
 import mx.managers.PopUpManager
 import mx.containers.TitleWindow;
 
 private var myPopUp:TitleWindow
 
 private function showPopUp():void
 
 myPopUp =
 PopUpManager.createPopUp(this,dialogue.SimpleDialogue,true) as
TitleWindow;
 PopUpManager.centerPopUp(myPopUp)
 }
 ]]
 /mx:Script
 
 mx:Button label=Show Popup Dialogue click=showPopUp()/mx:Button
 /mx:Application

--
 
 And here's the code in the Component:
 -
 //SimpleDialogue Component
 
 ?xml version=1.0 encoding=utf-8?
 
 mx:Label id=message text= fontSize=24
 
 /mx:Label
 
 /mx:TitleWindow
 ---
 
 Hopefully, this makes sense. If not, I would be happy to clarify.
Thanks for
 any and all replies.
 
 SL