Re: [flexcoders] Re: Measuring the width of a label
But measureText() or measureHTMLText() will measure the width of the whole text after considering the current styles for the component. So, it will take care of different letters as well as different fonts. On Tue, Jul 28, 2009 at 12:07 AM, valdhor valdhorli...@embarqmail.comwrote: The problem you are going to face is that different fonts have different widths for different characters. For example, an i is thinner than an o. You could try using a fixed width font and then counting characters. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, ivansebastiansurya ivansebastiansu...@... wrote: Hi everyone, I'm having a problem regarding measuring the width of a Label control. In my item renderer, I need to display a list of labels, but the number of labels per row depends on how many of them fit within one row. To do that, I need to actually measure the width of the label created prior to being added as a child of my renderer. Anyone has any idea how to do that? I need something like: var label:Label = new Label(); label.text = Test label; // Then I need to measure the width of the created label. Cheers and thanks in advance for reading my post. Ivan.
[flexcoders] How to customize ThousandSeparator to display price in INR format
All, I need to format the below amount in indian rupee(INR) format. Amount: 1000.00 When i use the default ThousandSeparator it return the amount as follows: mx:NumberFormatter id=numberFormatter precision=2 useThousandsSeparator=true thousandsSeparatorFrom=, thousandsSeparatorTo=,/ numberFormatter.format(Amount) --- 1,000,000,000.00 it's in US dollar format i want it as, numberFormatter.format(Amount) --- 1,00,00,00,000.00 it's in INR rupee format Please some one tell me how to do this, by, Dhanasekaran
[flexcoders] Need help fast: Mouse and ketboard event
Hi, I have a list of buttons in my VBox (1,2,3,4,5,6...) and I can click with mouse on each of them. Now I need to make numeric keyboard to register click on some of this buttons. If I press 5 on numpad button on the screen must flash a little (like it is pressed for real with mouse). But I can't figure out how to do this, help please? Thanks
[flexcoders] Re: How to customize ThousandSeparator to display price in INR format
Hi Dhanasekar as far as i know there is no way to achieve this directly,there is no properies are provided,so you need to derive mx.formatters.NumberFormatter and mx.formatters.NumberBase. Gnanz.../ a href='http://gnanz-flexworld.blogspot.com'Flex Samples/a --- In flexcoders@yahoogroups.com, dhansekarank dhansekar...@... wrote: All, I need to format the below amount in indian rupee(INR) format. Amount: 1000.00 When i use the default ThousandSeparator it return the amount as follows: mx:NumberFormatter id=numberFormatter precision=2 useThousandsSeparator=true thousandsSeparatorFrom=, thousandsSeparatorTo=,/ numberFormatter.format(Amount) --- 1,000,000,000.00 it's in US dollar format i want it as, numberFormatter.format(Amount) --- 1,00,00,00,000.00 it's in INR rupee format Please some one tell me how to do this, by, Dhanasekaran
[flexcoders] Re: Loading local SWFs in AIR to local-with-network sandbox
Ok, so the main AIR application is loaded into the application sandbox. We are loading modules from the app-storage directory into the application. (these are not Flex modules, but SWFs with our specific sandbox bridge) A local SWF loaded into the application will reside in the local-trusted, local-with-file, or local-with-network security sandbox, as the documentation states here: http://help.adobe.com/en_US/AIR/1.5/devappsflash/WS5b3ccc516d4fbf351e63e3d118666ade46-7f05.html#WS5b3ccc516d4fbf351e63e3d118666ade46-7e3c In the first case the user needs to explicitly trust the SWF through the Global Security Manager. (which btw doesn't work for me, later on this.) The second and third case are depending on how the SWF was compiled, with network access, or without it. (use-network flag) I want to use the local-with-network sandbox, so I set use-network=true as the compiler option. But the SWF is always loaded into the local-with-file sandbox, and I can't imagine why. This is our problem. I also tried the desktop directory to load SWFs from and it worked as expected. I hope this clear things up. And thanks for your time. Daniel Sidenote: From what I see I guess there's a problem with URI schemes. App storage directory has it's own URI scheme (app-storage:/). Try allow something from there in the Global Security Settings panel. It won't work. The manager will offer an url somenthing like this: app-storage:/module.swf, but in which AIR application's app-storage directory is that SWF you are allowing anyway? On the other hand using the File.desktopDirectory is working as expected, it is resolved with the file URI scheme (file://). --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: I think we need a better explanation. AIR apps usually have an application sandbox type, not localXXX 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 daniel.langh Sent: Monday, July 27, 2009 3:49 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Loading local SWFs in AIR to local-with-network sandbox Hello, I'm trying to load locally stored SWF files from the app-storage directory of my AIR application into the local-with-network security sandbox. Two SWFs are created with -use-network=true and use-network=false compiler flags respectively. However both of them are loaded into the _local-with-file_ security sandbox, regardless of the above mentioned compiler flag. I'm using the default LoaderContext. Can anybody confirm this as a bug, or suggest a proper way to get things in the local-with-network sandbox? Thanks, Daniel
[flexcoders] Can we run multiple instances of an Flex -AIR at the same time
Can we run multiple instances of an Flex -AIR application at the same time?
[flexcoders] Re: adding event listeners
Can you paste your sample code?
RE: [flexcoders] Can we run multiple instances of an Flex -AIR at the same time
Not without each of the instances having a different Application ID I believe. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Retheesh Sent: 28 July 2009 10:51 To: flexcoders@yahoogroups.com Subject: [flexcoders] Can we run multiple instances of an Flex -AIR at the same time Can we run multiple instances of an Flex -AIR application at the same time?
[flexcoders] Re: Question about a flex component
Does anyone know of icons or images I can use in my buttons instead of labeling them Previous and Next. I tried to google it and I did not find anything. Thanks. --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
Re: [flexcoders] pass variables from flex to javascript
ExternalInterface.addcallBack() సతీష్ From: jwaladeep jwalad...@yahoo.co.in To: flexcoders@yahoogroups.com Sent: Monday, 27 July, 2009 10:51:55 PM Subject: [flexcoders] pass variables from flex to javascript Is there any way to pass variables using ExternalInterface to Javascript from flex ? Looking for local information? Find it on Yahoo! Local http://in.local.yahoo.com/
[flexcoders] A simply question about img tag in ASDoc
Hi there, I was trying to add an image by using the ASDoc, but it didn't show up in my doc, the path of the logo does exist. Any suggestion on this? /** * * img src = /images/myimage.jpg / * */ http://livedocs.adobe.com/flex/gumbo/html/WSd0ded3821e0d52fe1e63e3d11c2f44bc36-8000.html Thank you
[flexcoders] Re: Need help fast: Mouse and ketboard event
Use an event Listener and a timer to change the selection of the button. Here is a quick and dirty example: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; applicationComplete=onApplicationComplete() mx:Script ![CDATA[ import flash.utils.Timer; import flash.events.TimerEvent; private function onApplicationComplete():void { stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, true); stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, false); } private function onKeyDown(event:KeyboardEvent):void { var myTimer:Timer = new Timer(100); myTimer.addEventListener(timer, timerHandler); myTimer.start(); switch(event.keyCode) { case 49: one.selected = true; break; } } public function timerHandler(event:TimerEvent):void { one.selected = false; } ]] /mx:Script mx:Grid mx:GridRow mx:GridItem mx:Button id=one label=1 width=100/ /mx:GridItem /mx:GridRow /mx:Grid /mx:Application HTH Steve --- In flexcoders@yahoogroups.com, vladakg85 vladak...@... wrote: Hi, I have a list of buttons in my VBox (1,2,3,4,5,6...) and I can click with mouse on each of them. Now I need to make numeric keyboard to register click on some of this buttons. If I press 5 on numpad button on the screen must flash a little (like it is pressed for real with mouse). But I can't figure out how to do this, help please? Thanks
[flexcoders] Chart font image quality
Hi, I am trying to add some charts to a PDF using AlivePDF. Adding the image to the PDF looks horrible (very fuzzy font). I have tried using the ImageCapture with a high dpi, which looks alot better, but there are still a lot of 'artifacts' around the text in the chart labels. I also tried to use a bitmap font from a Flash swf, but am getting the same noise around the text. Is there anyway to get the image of a chart that is good enough to print without the labels looking like this? Especially when I have 'real' text along side this chart image, the result is very disappointing. I really need a printable report that looks nice. I suppose AlivePDF has nothing to do with it really, it's more of getting a high quality image. Thanks for any suggestions...
[flexcoders] Is anyone an ACE for Flex 3 with AIR?
Thinking about going for the ACE exam and was wondering how many people on the thread is an ACE for Flex with AIR and if it really means anything in the 'real world'? What was the test like? Any sections jump out at ya?
[flexcoders] Re: Loading local SWFs in AIR to local-with-network sandbox
Reading the documentation you pointed to, if you load from within the application directory the file will have full access. Loading from network or remote, it will be in the remote sandbox. Loading from outside the application directory will allow you to give the different security sandboxes being mention (local-with-network being one of them). Try moving the loaded swf file outside the application directory.
RE: [flexcoders] Re: How to customize ThousandSeparator to display price in INR format
That's correct. Improved locale-aware formatting capabilities that will handle this case are being built for a future version of the Flash Player. But the current Flex formatters only know how to insert a thousandsSeparator every three digits. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of ursprakash6 Sent: Tuesday, July 28, 2009 12:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How to customize ThousandSeparator to display price in INR format Hi Dhanasekar as far as i know there is no way to achieve this directly,there is no properies are provided,so you need to derive mx.formatters.NumberFormatter and mx.formatters.NumberBase. Gnanz.../ a href='http://gnanz-flexworld.blogspot.com'Flex Samples/a --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, dhansekarank dhansekar...@... wrote: All, I need to format the below amount in indian rupee(INR) format. Amount: 1000.00 When i use the default ThousandSeparator it return the amount as follows: mx:NumberFormatter id=numberFormatter precision=2 useThousandsSeparator=true thousandsSeparatorFrom=, thousandsSeparatorTo=,/ numberFormatter.format(Amount) --- 1,000,000,000.00 it's in US dollar format i want it as, numberFormatter.format(Amount) --- 1,00,00,00,000.00 it's in INR rupee format Please some one tell me how to do this, by, Dhanasekaran
RE: [flexcoders] Re: Question about a flex component
Use any program that can produce a GIF or PNG and draw a left-pointing and a right-pointing triangle. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Tuesday, July 28, 2009 5:43 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Does anyone know of icons or images I can use in my buttons instead of labeling them Previous and Next. I tried to google it and I did not find anything. Thanks. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
[flexcoders] [Flex3]loading external xml file and using the Initialization splash
my application needs to load an external xml file when startup. how can I make use of the application initialization splash? I dont mean to use another loading or initialization splash. I want to just extend the application initialization splash. like start the xml loading after application's preInitialize event and before the initialize event. but I wonder how can I pause the initializing process until the xml is loaded. thanks Joe -- View this message in context: http://www.nabble.com/-Flex3-loading-external-xml-file-and-using-the-%22Initialization%22-splash-tp24639680p24639680.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Populating Datagrid
I'm new to Flex (just started looking at it 2 days ago) but I've been working on this problem all day long. I'm trying to create and populate a datagrid based on field names specified in a CSV list, with separate data that is also going to be CSV but from a different source in the same order if that makes sense. I've figured out how to make the first section of code below work as I would expect, buildDG takes the CSV string and generates the columns and headers in the datagrid like I want. The part I need help on is getting the code in addDGRow to work, a function that will accept CSV data in the same order as the headers and add that data as a new row in the datagrid. I've been working on this all day and can't figure out how to do this. Any help would be greatly appreciated. Thanks, Josh private function init():void { buildDG(Col1,Col2,Col3,Col4,Col5,Col6); } private function buildDG(sCSV:String):void { var aCSV:Array = sCSV.split(,); for ( var i:int = 0; i aCSV.length; i++) { var dgc:DataGridColumn = new DataGridColumn(aCSV[i]); var cols:Array = dgCSV.columns; cols.push(dgc); dgCSV.columns = cols; } } private function addDGRow(sCSVData:String):void { // Code for adding a row to the datagrid assuming sCSVData is CSV data in the same order as sCSV above } ... mx:DataGrid id=dgCSV /mx:DataGrid
[flexcoders] Need help Combobox label property
Hi, I am using combobox for which the bound data is coming from an arraycollection. My arraycollection has two properties called countryname(labelField) and countrycode. When i submit my page, the countrycode from my combo is saved to the DB. During retrieval I am given only countrycode and not countryname. How can I show the equivalent countryname as selectedItem in my combobox? Presently I am looping through the arraycollection and showing the equivalent countyname. Is there any other way to do it? Any help is highly appreciated... Regards, Ganesh Sundar R.
Re: [flexcoders] Who can explain me this:
Here's my guess as to what's going on underneath the hood... private var a:Object = {data:String}; Let's create an object that lives at memory address 123 RAM Lane. This variable 'a' gives me the object that lives at that address. private var b:Object = {data:String}; Let's create an object that lives at memory address 456 Silicon Drive. This variable 'b' gives me the object that lives at that address. private var testx:Array = [a] The first entry of this array is this object that the variable 'a' is pointing to. Looks like that's the object at 123 RAM lane. So the first entry of this array is 'The object that lives at 123 RAM Lane' trace(testx[0].data) // 1st - 100 According to the first entry of my array, I want to be looking at the object that lives at 123 RAM Lane. That's an object with a 'data' variable of 100 a.data = 1000 This variable 'a' is looking at an object that lives at 123 RAM Lane. Let's take this object and set it's 'data' variable to 1000 a = b; You know this variable 'a' that's looking at the object that lives at 123 RAM Lane? Let's have it look at the object that lives at 456 Silicon Drive trace(testx[0].data) // 3rd - 1000 According to the first entry of my array, I want to be looking at the object that lives at 123 RAM lane. That's an object with a 'data' variable of 1000 Basically, it's the fact that when you assign objects to variables, you're not assigning the entire object, but a pointer to where that object lives in memory. And then, when you stored that object in an array, I'm guessing that Flex stored The address of the object that 'a' is pointing to instead of anything related to the actual variable called 'a'. That's why you can change what a is pointing to without actually changing what the first element in your array is pointing to. At least, I'm pretty sure that's what's going on. Somebody out there feel free to correct me if I'm wrong... --Todd On Mon, Jul 27, 2009 at 6:17 PM, lytvynyuk lytvyn...@yahoo.com wrote: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=init() mx:Script ![CDATA[ import mx.collections.ArrayCollection; private var a:Object = {data:String}; private var b:Object = {data:String}; [Bindable] private var testx:Array = [a] private function init():void { b.data = 200; a.data = 100 trace(testx[0].data) // 1st - 100 a.data = 1000 trace(testx[0].data) // 2nd - 1000 a = b; trace(testx[0].data) // 3rd - 1000 } ]] /mx:Script /mx:Application Why third trace(...) outputs 1000 not 200!? :)
RE: [flexcoders] Who can explain me this:
You're exactly correct. I offered some ASCII-art diagrams of this yesterday, but your explanation in English is better. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Todd Kerpelman Sent: Monday, July 27, 2009 6:35 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Who can explain me this: Here's my guess as to what's going on underneath the hood... private var a:Object = {data:String}; Let's create an object that lives at memory address 123 RAM Lane. This variable 'a' gives me the object that lives at that address. private var b:Object = {data:String}; Let's create an object that lives at memory address 456 Silicon Drive. This variable 'b' gives me the object that lives at that address. private var testx:Array = [a] The first entry of this array is this object that the variable 'a' is pointing to. Looks like that's the object at 123 RAM lane. So the first entry of this array is 'The object that lives at 123 RAM Lane' trace(testx[0].data) // 1st - 100 According to the first entry of my array, I want to be looking at the object that lives at 123 RAM Lane. That's an object with a 'data' variable of 100 a.data = 1000 This variable 'a' is looking at an object that lives at 123 RAM Lane. Let's take this object and set it's 'data' variable to 1000 a = b; You know this variable 'a' that's looking at the object that lives at 123 RAM Lane? Let's have it look at the object that lives at 456 Silicon Drive trace(testx[0].data) // 3rd - 1000 According to the first entry of my array, I want to be looking at the object that lives at 123 RAM lane. That's an object with a 'data' variable of 1000 Basically, it's the fact that when you assign objects to variables, you're not assigning the entire object, but a pointer to where that object lives in memory. And then, when you stored that object in an array, I'm guessing that Flex stored The address of the object that 'a' is pointing to instead of anything related to the actual variable called 'a'. That's why you can change what a is pointing to without actually changing what the first element in your array is pointing to. At least, I'm pretty sure that's what's going on. Somebody out there feel free to correct me if I'm wrong... --Todd On Mon, Jul 27, 2009 at 6:17 PM, lytvynyuk lytvyn...@yahoo.commailto:lytvyn...@yahoo.com wrote: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=init() mx:Script ![CDATA[ import mx.collections.ArrayCollection; private var a:Object = {data:String}; private var b:Object = {data:String}; [Bindable] private var testx:Array = [a] private function init():void { b.data = 200; a.data = 100 trace(testx[0].data) // 1st - 100 a.data = 1000 trace(testx[0].data) // 2nd - 1000 a = b; trace(testx[0].data) // 3rd - 1000 } ]] /mx:Script /mx:Application Why third trace(...) outputs 1000 not 200!? :)
[flexcoders] Re: Question about a flex component
How do I remove a specific item from a HorizontalList whose dataprovider is an ArrayCollection? Thanks, --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
RE: [flexcoders] Re: Question about a flex component
The ASDoc for ArrayCollection lists removeItemAt() as an inherited method. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Tuesday, July 28, 2009 10:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component How do I remove a specific item from a HorizontalList whose dataprovider is an ArrayCollection? Thanks, --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on
[flexcoders] AIR html component
Hi if I load www.google.com in a HTML component like this mx:HTML id=html location=http://www.google.com; then how can I access the JavaScript functions in the google page?
[flexcoders] Re: Populating Datagrid
You need to populate something like an ArrayCollection and then set the dataProvider of your DataGrid to that ArrayCollection. Here is a quick and dirty example: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute initialize=init() mx:Script ![CDATA[ import mx.controls.dataGridClasses.DataGridColumn; import mx.collections.ArrayCollection; [Bindable] private var dgCSVArrColl:ArrayCollection = new ArrayCollection(); private function init():void { buildDG(Col1, Col2, Col3, Col4, Col5, Col6); addDGRow(1, 2, 3, 4, 5, 6); addDGRow(9, 8, 7, 6, 5, 4); } private function buildDG(sCSV:String):void { var aCSV:Array = sCSV.split(,); for(var i:int = 0; i aCSV.length; i++) { var dgc:DataGridColumn = new DataGridColumn(aCSV[i]); var cols:Array = dgCSV.columns; cols.push(dgc); dgCSV.columns = cols; } } private function addDGRow(sCSVData:String):void { // Code for adding a row to the datagrid assuming sCSVData is CSV data // in the same order as sCSV above var lCSV:Array = sCSVData.split(,); var cols:Array = dgCSV.columns; if(cols.length == lCSV.length) { var dataItem:Object = new Object(); for(var i:int = 0; i cols.length; i++) { dataItem[(cols[i] as DataGridColumn).dataField] = lCSV[i]; } dgCSVArrColl.addItem(dataItem); } } ]] /mx:Script mx:DataGrid id=dgCSV dataProvider={dgCSVArrColl}/ /mx:Application --- In flexcoders@yahoogroups.com, Josh Keller jeepi...@... wrote: I'm new to Flex (just started looking at it 2 days ago) but I've been working on this problem all day long. I'm trying to create and populate a datagrid based on field names specified in a CSV list, with separate data that is also going to be CSV but from a different source in the same order if that makes sense. I've figured out how to make the first section of code below work as I would expect, buildDG takes the CSV string and generates the columns and headers in the datagrid like I want. The part I need help on is getting the code in addDGRow to work, a function that will accept CSV data in the same order as the headers and add that data as a new row in the datagrid. I've been working on this all day and can't figure out how to do this. Any help would be greatly appreciated. Thanks, Josh private function init():void { buildDG(Col1,Col2,Col3,Col4,Col5,Col6); } private function buildDG(sCSV:String):void { var aCSV:Array = sCSV.split(,); for ( var i:int = 0; i aCSV.length; i++) { var dgc:DataGridColumn = new DataGridColumn(aCSV[i]); var cols:Array = dgCSV.columns; cols.push(dgc); dgCSV.columns = cols; } } private function addDGRow(sCSVData:String):void { // Code for adding a row to the datagrid assuming sCSVData is CSV data in the same order as sCSV above } ... mx:DataGrid id=dgCSV /mx:DataGrid
[flexcoders] Re: Question about a flex component
How do I extract the data portion of the item if the item looks like Object in the example below. --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
[flexcoders] Re: Question about a flex component
item.data --- In flexcoders@yahoogroups.com, veena_kris2003 v.kri...@... wrote: How do I extract the data portion of the item if the item looks like Object in the example below. --- In flexcoders@yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
Re: [flexcoders] Re: Question about a flex component
What type do i get back? On Tue, Jul 28, 2009 at 2:52 PM, valdhor valdhorli...@embarqmail.comwrote: item.data --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, veena_kris2003 v.kri...@... wrote: How do I extract the data portion of the item if the item looks like Object in the example below. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com[mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.com
[flexcoders] Re: Question about a flex component
Looks like an int to me. --- In flexcoders@yahoogroups.com, veena pandit v.kri...@... wrote: What type do i get back? On Tue, Jul 28, 2009 at 2:52 PM, valdhor valdhorli...@...wrote: item.data --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, veena_kris2003 v.kris21@ wrote: How do I extract the data portion of the item if the item looks like Object in the example below. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com[mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com
Re: [flexcoders] Need help Combobox label property
If I understand correctly, you have a ComboBox with a dataProvider, and want to set the selectedIndex / selectedItem of that dataProvider knowing only piece of data (the CountryCode). Is that correct? Unfortunately, your approach is the way to do it using the built in Flex ComboBox. Our Flextras AutoCompleteComboBox implemented a selectedValue property, which allows you to do just that, though http://www.flextras.com/?event=ProductHomeproductID=10 Does this answer the question? gan_sun2006 wrote: Hi, I am using combobox for which the bound data is coming from an arraycollection. My arraycollection has two properties called countryname(labelField) and countrycode. When i submit my page, the countrycode from my combo is saved to the DB. During retrieval I am given only countrycode and not countryname. How can I show the equivalent countryname as selectedItem in my combobox? Presently I am looping through the arraycollection and showing the equivalent countyname. Is there any other way to do it? Any help is highly appreciated... Regards, Ganesh Sundar R. -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl.com/684b5h http://www.twitter.com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras.com?c=104 -- http://www.theflexshow.com http://www.jeffryhouser.com -- Part of the DotComIt Brain Trust
[flexcoders] Inculding a image in my documentation by using ASDoc
Hi there, I was trying to display an image in my documentation by using Asdoc, but it didn't show up at all. The image does exist on this path. /** * img src = /images/newImage.jpg / */ http://livedocs.adobe.com/flex/gumbo/html/WSd0ded3821e0d52fe1e63e3d11c2f44bc36-8000.html Any suggestions? Thank you
RE: [flexcoders] Re: Question about a flex component
The compiler wouldn't have a declaration of 'data', so would assume item.data has type *. At runtime it would have type int if its value is 1. But you could use class to define data items with strongly typed properties: public class MyItem { public var label:String: public var data:int; } and then the compiler would know that 'data' is int at compile-time. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Tuesday, July 28, 2009 11:57 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Looks like an int to me. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, veena pandit v.kri...@... wrote: What type do i get back? On Tue, Jul 28, 2009 at 2:52 PM, valdhor valdhorli...@...wrote: item.data --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com, veena_kris2003 v.kris21@ wrote: How do I extract the data portion of the item if the item looks like Object in the example below. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com[mailto: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In
RE: [flexcoders] A simply question about img tag in ASDoc
Should it omit the leading slash? As in: img src = images/myimage.jpg / Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of flexawesome Sent: Tuesday, July 28, 2009 10:00 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] A simply question about img tag in ASDoc Hi there, I was trying to add an image by using the ASDoc, but it didn't show up in my doc, the path of the logo does exist. Any suggestion on this? /** * * img src = /images/myimage.jpg / * */ http://livedocs.adobe.com/flex/gumbo/html/WSd0ded3821e0d52fe1e63e3d11c2f44bc36-8000.html Thank you inline: image001.jpginline: image002.jpg
[flexcoders] Re: A simply question about img tag in ASDoc
I have tried the path without the leading slash, but still didn't work. :( --- In flexcoders@yahoogroups.com, Stephen Gilson smgil...@... wrote: Should it omit the leading slash? As in: img src = images/myimage.jpg / Stephen From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of flexawesome Sent: Tuesday, July 28, 2009 10:00 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] A simply question about img tag in ASDoc Hi there, I was trying to add an image by using the ASDoc, but it didn't show up in my doc, the path of the logo does exist. Any suggestion on this? /** * * img src = /images/myimage.jpg / * */ http://livedocs.adobe.com/flex/gumbo/html/WSd0ded3821e0d52fe1e63e3d11c2f44bc36-8000.html Thank you
[flexcoders] Hslider [1 Attachment]
Hi I have one requirement in my project.Please help me How can do that. It is releated to HSLIDER in FLEX3. PFA Document which contain UI image and explanation. Please share me your experience. Thanks in advance, Ramesh
[flexcoders] Doubt with Tree Control
Hi Guys, I have a little doubt about Tree Control: Supposing I'm having the following xml: root plant name=Plant 1 machine name=Machine 1 item name=Item 1 / /machine /plant /root I wanna display just Plant and Machine inside it. I don't wanna display the Item node at all. I know the labelFunction where I can choose which parameter should I use to give the name of my tree component, but I don't know how to skip a specific node of my XML structure. Can someone help me with that? Thanks in advance, -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
[flexcoders] AIR app, need MouseMove events NOT bounded by screen
This AIR app is to be embedded in a consumer electronics product. It is a transparent UI that indirectly controls an underlying map application by sending messages via sockets. The product actually has a joystick and not a mouse and one requirement is that moving the joystick will cause the map to pan. In development, using a real mouse, when the mouse pointer hits a screen boundary, MouseMove events are no longer dispatched in that direction. In a corner, all events cease. This is causing me problems with continuing to send messages to the application to continue panning. I am hoping the joystick will behave differently, but am also looking for any other suggestions. I have considered using a timer to send repeated increments (the back-end app only needs position deltas), but I haven't figured out how to stop that. As far as I can tell, there is no way to set the position of the system cursor. If I could reset the mouse x,y to some positive values when it approached an edge, that would work as well. Is there anyway I can get deeper into the mouse event? If I could get a generic moving event, that would also suffice. Any thoughts? Tracy Spratt
RE: [flexcoders] AIR app, need MouseMove events NOT bounded by screen
Is the mouse button down? If so, you should still get mouseMove from the stage. 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 Tracy Spratt Sent: Tuesday, July 28, 2009 3:17 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] AIR app, need MouseMove events NOT bounded by screen This AIR app is to be embedded in a consumer electronics product. It is a transparent UI that indirectly controls an underlying map application by sending messages via sockets. The product actually has a joystick and not a mouse and one requirement is that moving the joystick will cause the map to pan. In development, using a real mouse, when the mouse pointer hits a screen boundary, MouseMove events are no longer dispatched in that direction. In a corner, all events cease. This is causing me problems with continuing to send messages to the application to continue panning. I am hoping the joystick will behave differently, but am also looking for any other suggestions. I have considered using a timer to send repeated increments (the back-end app only needs position deltas), but I haven't figured out how to stop that. As far as I can tell, there is no way to set the position of the system cursor. If I could reset the mouse x,y to some positive values when it approached an edge, that would work as well. Is there anyway I can get deeper into the mouse event? If I could get a generic moving event, that would also suffice. Any thoughts? Tracy Spratt
Re: [flexcoders] AIR app, need MouseMove events NOT bounded by screen
Hi Tracy, The joystick will not trigger events like the keyboard arrows? I would expect it from a joystick Regards On Tue, Jul 28, 2009 at 7:16 PM, Tracy Spratt tr...@nts3rd.com wrote: This AIR app is to be embedded in a consumer electronics product. It is a transparent UI that indirectly controls an underlying map application by sending messages via sockets. The product actually has a joystick and not a mouse and one requirement is that moving the joystick will cause the map to pan. In development, using a real mouse, when the mouse pointer hits a screen boundary, MouseMove events are no longer dispatched in that direction. In a corner, all events cease. This is causing me problems with continuing to send messages to the application to continue panning. I am hoping the joystick will behave differently, but am also looking for any other suggestions. I have considered using a timer to send repeated increments (the back-end app only needs position deltas), but I haven't figured out how to stop that. As far as I can tell, there is no way to set the position of the system cursor. If I could reset the mouse x,y to some positive values when it approached an edge, that would work as well. Is there anyway I can get deeper into the mouse event? If I could get a generic moving event, that would also suffice. Any thoughts? Tracy Spratt -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
[flexcoders] Re: Doubt with Tree Control
Did the trick with dataDescriptor atribute from Tree Control. Hope this helps someone else in future references. Regards, PS On Tue, Jul 28, 2009 at 7:03 PM, Pedro Sena sena.pe...@gmail.com wrote: Hi Guys, I have a little doubt about Tree Control: Supposing I'm having the following xml: root plant name=Plant 1 machine name=Machine 1 item name=Item 1 / /machine /plant /root I wanna display just Plant and Machine inside it. I don't wanna display the Item node at all. I know the labelFunction where I can choose which parameter should I use to give the name of my tree component, but I don't know how to skip a specific node of my XML structure. Can someone help me with that? Thanks in advance, -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */ -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
[flexcoders] Re: Sideways text
In this example, you are not using an embedded font. Google flex 3 embed font and you'll see what we mean. --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: Really? When I try mx:Label x=100 y=100 text=Hello rotation=90 blendMode=layer/ I don't see anything. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Amy Sent: Saturday, July 25, 2009 3:30 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Sideways text --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: If you use an embedded font I think you can rotate Flex 3 text components. But if you want to use a device font, you would have to develop custom components that use FTE or TLF instead of TextField to render their text, and you'd have to require Flash Player 10. Looking at how Flex 4 implements its new text components would probably be useful if you're going to do this. I think an easier way is to just set the blendMode on the text component to layer. -Amy
Re: [flexcoders] AIR html component
browser.domWindow where browser is the mx:HTML component. Don't know if you can call them via that interface though; maybe the 'javascript:my_js_function()' in the location bar trick works? 2009/7/29 hworke kanps...@gmail.com: Hi if I load www.google.com in a HTML component like this mx:HTML id=html location=http://www.google.com; then how can I access the JavaScript functions in the google page? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] how to cleanly reduce the height of a TitleWindow's title bar
I'm unhappy with how tall the title bars are by default for TitleWindows in my application. We have some (possibly modified) Panels with shorter titlebars. Does anyone know of a clean way to get the title bars of the TitleWindows to be a bit shorter without hard-coding any sizes? I'm looking for something like a CSS attribute I can use in the style I have designated for the title bar, which already selects the font, size, and color of the text in the title bar. Thanks for your help, Andrew -- === Andrew D. Ball 勃安 deus caritas est http://www.ibiblio.org/adball/blog/
Re: [flexcoders] Need help Combobox label property
look at combo boxes labelfunction the function will then inspect the countrycode and you'll have a nasty switch statement that will output the correct country name -mL gan_sun2006 wrote: Hi, I am using combobox for which the bound data is coming from an arraycollection. My arraycollection has two properties called countryname(labelField) and countrycode. When i submit my page, the countrycode from my combo is saved to the DB. During retrieval I am given only countrycode and not countryname. How can I show the equivalent countryname as selectedItem in my combobox? Presently I am looping through the arraycollection and showing the equivalent countyname. Is there any other way to do it? Any help is highly appreciated... Regards, Ganesh Sundar R. Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail.
[flexcoders] Re: how to cleanly reduce the height of a TitleWindow's title bar
Hi Andrew, Have you tried the headerHeight Style in CSS? TitleWindow { header-height: 20; } -TH --- In flexcoders@yahoogroups.com, Andrew Ball anb...@... wrote: I'm unhappy with how tall the title bars are by default for TitleWindows in my application. We have some (possibly modified) Panels with shorter titlebars. Does anyone know of a clean way to get the title bars of the TitleWindows to be a bit shorter without hard-coding any sizes? I'm looking for something like a CSS attribute I can use in the style I have designated for the title bar, which already selects the font, size, and color of the text in the title bar. Thanks for your help, Andrew -- === Andrew D. Ball åå® deus caritas est http://www.ibiblio.org/adball/blog/
Re: [flexcoders] Need help Combobox label property
I started to give him a similar answer, but then realized he may be talking about setting the selectedItem on the ComboBox. He mentioned he already had a labelField which seems to be exactly what he needs for display purposes without a complicated switch statement. Ganesh, if neither answer helps you, could you elaborate on the problem? Mark Lapasa wrote: look at combo boxes labelfunction the function will then inspect the countrycode and you'll have a nasty switch statement that will output the correct country name -mL gan_sun2006 wrote: Hi, I am using combobox for which the bound data is coming from an arraycollection. My arraycollection has two properties called countryname(labelField) and countrycode. When i submit my page, the countrycode from my combo is saved to the DB. During retrieval I am given only countrycode and not countryname. How can I show the equivalent countryname as selectedItem in my combobox? Presently I am looping through the arraycollection and showing the equivalent countyname. Is there any other way to do it? Any help is highly appreciated... Regards, Ganesh Sundar R. Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail. -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl.com/684b5h http://www.twitter.com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras.com?c=104 -- http://www.theflexshow.com http://www.jeffryhouser.com -- Part of the DotComIt Brain Trust
RE: [flexcoders] Re: Sideways text
I know I'm not embedding a font. Amy said that setting blendMode=layer allows you to rotate a non-embedded font. That was news to me, and when I tried it I couldn't confirm her statement. So I'm skeptical that it's true. I think you have to embed a font to be able to rotate text in TextField-based components. But I'd love to be proven wrong. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of postwick Sent: Tuesday, July 28, 2009 4:44 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Sideways text In this example, you are not using an embedded font. Google flex 3 embed font and you'll see what we mean. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: Really? When I try mx:Label x=100 y=100 text=Hello rotation=90 blendMode=layer/ I don't see anything. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of Amy Sent: Saturday, July 25, 2009 3:30 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Sideways text --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: If you use an embedded font I think you can rotate Flex 3 text components. But if you want to use a device font, you would have to develop custom components that use FTE or TLF instead of TextField to render their text, and you'd have to require Flash Player 10. Looking at how Flex 4 implements its new text components would probably be useful if you're going to do this. I think an easier way is to just set the blendMode on the text component to layer. -Amy
Re: [flexcoders] AIR html component
Thanks Sam. I have also just seen your below reply on june 11th: -- You can access the HTML DOM of that page like this, and get whatever you want, just like you can in JS: var forms:* = browser.domWindow.document.getElementsByTagName(form); var loginForm:* = null; for each (var f:* in forms) { if (f.innerText.toLowerCase().indexOf(login) = 0) { loginForm = f; break; } } -- Your examples works fine. But the examples in this adobe link does not work: http://labs.adobe.com/wiki/index.php/AIR:Articles:Using_HTML_in_Flex-based_Adobe_AIR_Applications The complete example in this example does not work!!! And as you see the map example the call the java script function just like this html.javaScriptWindow.locateHouse(.) but it does not work javaScriptWindow gives error message!!! On Tue, Jul 28, 2009 at 6:43 PM, Sam Laisamuel@gmail.com wrote: browser.domWindow where browser is the mx:HTML component. Don't know if you can call them via that interface though; maybe the 'javascript:my_js_function()' in the location bar trick works? 2009/7/29 hworke kanps...@gmail.com: Hi if I load www.google.com in a HTML component like this mx:HTML id=html location=http://www.google.com; then how can I access the JavaScript functions in the google page? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Why is my dragInitiator selectedItem null on the first drag?
I am using a List as drag source. When the list loads nothing is selected. If I grab an item and start drag and then drop, the drop target reports the dragInitiator list selectedItem is null. If I instead click on the source list first and then drag, the selectedItem is populated. Is there another way to get the content of the drag without having to click on the item first? ascii
[flexcoders] Frustrating examples from ADOBE
It is really exciting when you are looking for a solution and suddenly find a perfect example in a Adobe page- but guess how you will feel if it does not work? Every time I am searching for something like Adobe air html this following link show up on top of my search http://labs.adobe.com/wiki/index.php/Apollo:Articles:Using_HTML_in_Flex-based_Apollo_Applications It has example and it does not work!! Why Adobe? Why keeping the examples those do not work. These just eat up our energy and time! So FRUSTRATING
[flexcoders] Re: Loading local SWFs in AIR to local-with-network sandbox
Well, I don't use the application directory, I use the app-storage directory which is different. And as you wrote it, I should be able to determine which sandbox will the SWF be loaded into. But if you make a test case you will see that there's no way to load into the local-with-network sandbox even though it is stated in the docs. This is my problem. I really hope someone can prove me wrong. Daniel --- In flexcoders@yahoogroups.com, wrhinfl wrhi...@... wrote: Reading the documentation you pointed to, if you load from within the application directory the file will have full access. Loading from network or remote, it will be in the remote sandbox. Loading from outside the application directory will allow you to give the different security sandboxes being mention (local-with-network being one of them). Try moving the loaded swf file outside the application directory.
RE: [flexcoders] AIR app, need MouseMove events NOT bounded by screen
No, the joystick is like moving the mouse without any button down. I am currently listening to systemManager, I'll try stage to see if the behavior is any different. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, July 28, 2009 6:36 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] AIR app, need MouseMove events NOT bounded by screen Is the mouse button down? If so, you should still get mouseMove from the stage. Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs. http://blogs.adobe.com/aharui adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Tuesday, July 28, 2009 3:17 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] AIR app, need MouseMove events NOT bounded by screen This AIR app is to be embedded in a consumer electronics product. It is a transparent UI that indirectly controls an underlying map application by sending messages via sockets. The product actually has a joystick and not a mouse and one requirement is that moving the joystick will cause the map to pan. In development, using a real mouse, when the mouse pointer hits a screen boundary, MouseMove events are no longer dispatched in that direction. In a corner, all events cease. This is causing me problems with continuing to send messages to the application to continue panning. I am hoping the joystick will behave differently, but am also looking for any other suggestions. I have considered using a timer to send repeated increments (the back-end app only needs position deltas), but I haven't figured out how to stop that. As far as I can tell, there is no way to set the position of the system cursor. If I could reset the mouse x,y to some positive values when it approached an edge, that would work as well. Is there anyway I can get deeper into the mouse event? If I could get a generic moving event, that would also suffice. Any thoughts? Tracy Spratt
RE: [flexcoders] AIR app, need MouseMove events NOT bounded by screen
I have tested with a joystick and it behaves the same as moving the mouse with no button pressed, and events stop at the screen boundaries. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Pedro Sena Sent: Tuesday, July 28, 2009 6:51 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] AIR app, need MouseMove events NOT bounded by screen Hi Tracy, The joystick will not trigger events like the keyboard arrows? I would expect it from a joystick Regards On Tue, Jul 28, 2009 at 7:16 PM, Tracy Spratt tr...@nts3rd. mailto:tr...@nts3rd.com com wrote: This AIR app is to be embedded in a consumer electronics product. It is a transparent UI that indirectly controls an underlying map application by sending messages via sockets. The product actually has a joystick and not a mouse and one requirement is that moving the joystick will cause the map to pan. In development, using a real mouse, when the mouse pointer hits a screen boundary, MouseMove events are no longer dispatched in that direction. In a corner, all events cease. This is causing me problems with continuing to send messages to the application to continue panning. I am hoping the joystick will behave differently, but am also looking for any other suggestions. I have considered using a timer to send repeated increments (the back-end app only needs position deltas), but I haven't figured out how to stop that. As far as I can tell, there is no way to set the position of the system cursor. If I could reset the mouse x,y to some positive values when it approached an edge, that would work as well. Is there anyway I can get deeper into the mouse event? If I could get a generic moving event, that would also suffice. Any thoughts? Tracy Spratt -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
Re: [flexcoders] Frustrating examples from ADOBE
This is something we're looking to address, there are a lot of places that link to old pages and we don't want them to break, but we do want to find a way for search results to be more relevant. This is one thing we hope to accomplish with the community help search capabilities, see if initiating the search from http://www.adobe.com/devnet/flex for example helps. Matt On 7/28/09 6:17 PM, hworke kanps...@gmail.com wrote: It is really exciting when you are looking for a solution and suddenly find a perfect example in a Adobe page- but guess how you will feel if it does not work? Every time I am searching for something like Adobe air html this following link show up on top of my search http://labs.adobe.com/wiki/index.php/Apollo:Articles:Using_HTML_in_Flex-based_Apollo_Applications It has example and it does not work!! Why Adobe? Why keeping the examples those do not work. These just eat up our energy and time! So FRUSTRATING
[flexcoders] 50% Promotion for Flex 4 In Action
Manning Publications is having a one day (Weds) 50% off promotion for the upcoming Flex 4 In Action. This give you access to the early edition of the book (you get access to the draft chapters as they're written, and then the final book when complete). http://www.manning.com/ahmed2/ Enter promo code: twtr0729
[flexcoders] Re: Populating Datagrid
That was exactly the information I needed to get me over that hump, thank you very much. Josh --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: You need to populate something like an ArrayCollection and then set the dataProvider of your DataGrid to that ArrayCollection. Here is a quick and dirty example: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute initialize=init() mx:Script ![CDATA[ import mx.controls.dataGridClasses.DataGridColumn; import mx.collections.ArrayCollection; [Bindable] private var dgCSVArrColl:ArrayCollection = new ArrayCollection(); private function init():void { buildDG(Col1, Col2, Col3, Col4, Col5, Col6); addDGRow(1, 2, 3, 4, 5, 6); addDGRow(9, 8, 7, 6, 5, 4); } private function buildDG(sCSV:String):void { var aCSV:Array = sCSV.split(,); for(var i:int = 0; i aCSV.length; i++) { var dgc:DataGridColumn = new DataGridColumn(aCSV[i]); var cols:Array = dgCSV.columns; cols.push(dgc); dgCSV.columns = cols; } } private function addDGRow(sCSVData:String):void { // Code for adding a row to the datagrid assuming sCSVData is CSV data // in the same order as sCSV above var lCSV:Array = sCSVData.split(,); var cols:Array = dgCSV.columns; if(cols.length == lCSV.length) { var dataItem:Object = new Object(); for(var i:int = 0; i cols.length; i++) { dataItem[(cols[i] as DataGridColumn).dataField] = lCSV[i]; } dgCSVArrColl.addItem(dataItem); } } ]] /mx:Script mx:DataGrid id=dgCSV dataProvider={dgCSVArrColl}/ /mx:Application --- In flexcoders@yahoogroups.com, Josh Keller jeepin95@ wrote: I'm new to Flex (just started looking at it 2 days ago) but I've been working on this problem all day long. I'm trying to create and populate a datagrid based on field names specified in a CSV list, with separate data that is also going to be CSV but from a different source in the same order if that makes sense. I've figured out how to make the first section of code below work as I would expect, buildDG takes the CSV string and generates the columns and headers in the datagrid like I want. The part I need help on is getting the code in addDGRow to work, a function that will accept CSV data in the same order as the headers and add that data as a new row in the datagrid. I've been working on this all day and can't figure out how to do this. Any help would be greatly appreciated. Thanks, Josh private function init():void { buildDG(Col1,Col2,Col3,Col4,Col5,Col6); } private function buildDG(sCSV:String):void { var aCSV:Array = sCSV.split(,); for ( var i:int = 0; i aCSV.length; i++) { var dgc:DataGridColumn = new DataGridColumn(aCSV[i]); var cols:Array = dgCSV.columns; cols.push(dgc); dgCSV.columns = cols; } } private function addDGRow(sCSVData:String):void { // Code for adding a row to the datagrid assuming sCSVData is CSV data in the same order as sCSV above } ... mx:DataGrid id=dgCSV /mx:DataGrid