Re: [flexcoders] Re: How to debug when I have IE crash?
Thx, I will give it a try On Mon, Jul 27, 2009 at 7:33 AM, jedierikb jedier...@gmail.com wrote: this might be helpful: http://stackoverflow.com/questions/560979/how-to-debug-swf-browser-crashes --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Ronen Naor ronen.f...@... wrote: Hi,We are having quite a lot of IE crashes when running our Flex 3 applications. Usually the clients use IE 7 or 8 and the flash player version is 10. How can I debug it? Is there some kind of logs I can see? Thanks, Ronen
Re: [flexcoders] Re: LCDS fallback and firewalls which inspect packets
On Saturday 25 Jul 2009, Johannes Nel wrote: In our dev and testing environments which are hosted on the amazon cloud this was failing since the kernel did not have syn cookies compiled into the kernel. Once we moved to a production enviroment (also debian but That's odd, but handy to know - it's going to trip others up I'm sure. -- Helping to efficiently improve collaborative sexy innovative 24/365 partnerships as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] showing a preloder as images are loaded
On Monday 27 Jul 2009, stinasius wrote: preloader disappears and the image shows up. can someone please help me out here. Here's one: http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetailsproductId=2postId=7606 There are several more on the first page of http://www.google.com/search?btnG=Google+Searchq=flex+image+loader -- Helping to simultaneously target functionalities as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] FileReference.load()
On Thursday 23 Jul 2009, Richard Rodseth wrote: Thanks for the explanation. More or less what I expected until Gordon made his suggestion. I think I have approval to require 10, but I'd still be interested to know if Gordon concurs with your conclusion. Could you just alter the JavaScript wrapper to use the v9 or v10 version of your app, depending on what is installed in the client ? You can still compile both from the same source code, it seems, and have different code paths taken depending if the the code is running on v9 or v10 player. -- Helping to assertively morph transparent cutting-edge best-of-breed innovative paradigms as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] Future Value AS Function
On Thursday 23 Jul 2009, ashish vyas wrote: applications. It is small piece of AS code. I thought it will useful to my other pals as well and wanted to share it with you. Ace ! I couldn't see it attached anywhere. What licence is it under ? Have you considered a small Google Code project or something to keep them all in ? -- Helping to continuously aggregate principle-centered features as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] world clock
OK here is a question that I am having some trouble with. I have a flex site with coldfusion 8 as the middle ware. I need to set up clocks for different parts of the world. But how do I take into account daylight savings, or the fact that daylight is not always on the same day or even happen at all? So I would want the time for DC, Zulu, and lets say London (and Zulu and London are 1 hour off due to daylight savings) Thanks, Darrin
Re: [flexcoders] world clock
On Monday 27 Jul 2009, Darrin Kay wrote: So I would want the time for DC, Zulu, and lets say London (and Zulu and London are 1 hour off due to daylight savings) CF can do this for you, no ? -- Helping to authoritatively cluster six-generation global strategic performance-oriented products as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] world clock
How so? It can give me server time, but if the server is in London lets say. Daylight savings happens in London 2 weeks after it does in the US. On Mon, Jul 27, 2009 at 1:54 PM, Tom Chiverton tom.chiver...@halliwells.com wrote: On Monday 27 Jul 2009, Darrin Kay wrote: So I would want the time for DC, Zulu, and lets say London (and Zulu and London are 1 hour off due to daylight savings) CF can do this for you, no ? -- Helping to authoritatively cluster six-generation global strategic performance-oriented products as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.Halliwells.com.
[flexcoders] how to separate filename from folder path in flex
hi all, please let me know how to separate filename from folder path... problem: i have to display the content in separate window... and the content is in XML file.. now i can able to get the full path that XML file... but am unable separate it. give me some guidelines how to display the content of xml file into title window am new to this type of work... ..help me out if it silly question also appreciated ur response Thanks and Regards Satish సతీష్ See the Web#39;s breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/
[flexcoders] Re: problem using mx:Glow and mx:Box
Also in the example, the inner hello label gets the glow. It seems like the Glow is applied to the outer and inner borders of the Box, and also to objects inside the Box. Does anybody know how to make the Glow effect just the outside of the Box? Thanks. --- In flexcoders@yahoogroups.com, mitchgrrt mitch_g...@... wrote: I'm trying to put a Glow around a Box, and have the glow show around the outside of the Box's borders but not the inside. Here's part of the code: mx:Glow id=glowImage duration=1000 alphaFrom=1.0 alphaTo=0.3 blurXFrom=0.0 blurXTo=50.0 blurYFrom=0.0 blurYTo=50.0 inner=false color=0x00FF00/ mx:Box height=100 width=200 mouseDownEffect={glowImage} borderColor=black borderStyle=solid mx:Label text=hello / /mx:Box The Glow shows up both inside and outside the Box's borders, even though I set inner=false. Does somebody know how to get it to show just outside the box? Thanks.
[flexcoders] contextMenus and Modules and Tree == Fail
I am having the difficult time, trying to apply a context Menu to a TreeList in module, has anybody had such a difficult time? I've tried this: http://blog.arc90.com/2008/04/adding_a_contextmenu_to_a_flex.php and I've tried this: http://michael.omnicypher.com/2007/02/flex-trees-with-context-menu_14.html Seems when I put my contextMenu inside a module, when I right click nothing shows up, although it's created. Also, when I right click on my module and move the mouse off a big ugly white box fills my container, yuck.. Any suggestions, Thanks, Patrick
[flexcoders] Solved with Inredi-Hack - Re: contextMenus and Modules and Tree == Fail
I added the contextMenu to the application and it worked... seems modules need a lot of improvement in the framework. I have had so many problems with them... BTW, will the 3.4 sdk be improved since 4 is already coming out soon. I would hope so, at least for a year or more. We can't all update to flex4 in at Adobe's pace unfortunately, especially for projects we just started a few months ago... my food for thought. Thanks, Patrick (Now if i can get that big white ugly box from showing up!) --- In flexcoders@yahoogroups.com, djhatrick djhatr...@... wrote: I am having the difficult time, trying to apply a context Menu to a TreeList in module, has anybody had such a difficult time? I've tried this: http://blog.arc90.com/2008/04/adding_a_contextmenu_to_a_flex.php and I've tried this: http://michael.omnicypher.com/2007/02/flex-trees-with-context-menu_14.html Seems when I put my contextMenu inside a module, when I right click nothing shows up, although it's created. Also, when I right click on my module and move the mouse off a big ugly white box fills my container, yuck.. Any suggestions, Thanks, Patrick
[flexcoders] dispatch event from custome borderSkin
I try to make a borderSkin which has a button that controls the its parent visiable. I use parentApplication.dispatch(a event) but it doesn't work. There is somewhere wrong in my code or my train of thought ? This is my code: CSS file Panel { background-color: #3e3e3e; border-color: #22201e; header-height:60; border-alpha: 1; corner-radius: 10; dropShadowStyleName: panelDropShadow; border-skin: ClassReference(assets.skins.myPanelSkin); dropShadowEnabled: false; title-style-name: headerStyle; headerSkin: ClassReference(assets.skins.HeaderSkin); } panelDropShadow { distance:5; size:28; alpha:0.7; } headerStyle { text-align:center; font-size: 15; fontFamily:Century Gothic; border-skin: Embed(source='assets/images/header_bg.png', scaleGridLeft=20, scaleGridRight=200, scaleGridTop=40,scaleGridBottom=42); } myPanelSkin.as public class myPanelSkin extends PanelSkin { private var backgroundComplete:Boolean; public function myPanelSkin() { super(); } override mx_internal function drawBackground(w:Number, h:Number):void { super.drawBackground(w,h); if(!parent || backgroundComplete) return; backgroundComplete = true; var headerSkin:Class = getStyle(headerSkin); if(headerSkin parent is Panel) { var headerInstance:DisplayObject = new headerSkin(); //if(headerInstance is IStyleClient) IStyleClient(headerInstance).styleName = parent; headerInstance.width = w; headerInstance.height = getStyle(headerHeight); var panel:Panel = Panel(parent); panel.rawChildren.addChildAt(headerInstance,2); } } } HeaderSkin.mxml mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=60 styleName=headerStyle mx:Script ![CDATA[ private function biggerHandler(e:MouseEvent):void { //parentApplication.dispatchEvent(new biggerEvent(biggerEvent.BIGGER_EVENT)); //parent.dispatchEvent(new biggerEvent(biggerEvent.BIGGER_EVENT)); parentDocument.dispatchEvent(new biggerEvent(biggerEvent.BIGGER_EVENT)); } ]] /mx:Script mx:Image source=@Embed(source='assets/images/panel_dec_right.png') right=0/ mx:Image source=@Embed(source='assets/images/panel_dec_left.png') left=0/ mx:Button id=bigger label=Big click=biggerHandler(event) right=0/ /mx:Canvas
Re: [flexcoders] FileReference.load()
Yes, I suppose that could work, though it would complicate the build and the test matrix. On Mon, Jul 27, 2009 at 5:31 AM, Tom Chiverton tom.chiver...@halliwells.com wrote: On Thursday 23 Jul 2009, Richard Rodseth wrote: Thanks for the explanation. More or less what I expected until Gordon made his suggestion. I think I have approval to require 10, but I'd still be interested to know if Gordon concurs with your conclusion. Could you just alter the JavaScript wrapper to use the v9 or v10 version of your app, depending on what is installed in the client ? You can still compile both from the same source code, it seems, and have different code paths taken depending if the the code is running on v9 or v10 player. -- Helping to assertively morph transparent cutting-edge best-of-breed innovative paradigms as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.Halliwells.com.
[flexcoders] extending tileList - pagination
Hey all - I'm extending tilelist and am displaying a 3x2 grid (6 items) - I'm trying to see if there's currently a way to display the next/previous 6 items - ie paging back and forthrather than just scrolling, which will always show some items of the current view rather than just 1 item if it's alone on a 'page'. I figure the easiest thing is to abscond the dataprovider and and parse it out internally -- but even looking through TileBase I can't quite figure out the best way to grab that... thougths?
RE: [flexcoders] Re: problem using mx:Glow and mx:Box
Box doesn't have a fill by default, so you're seeing right through the container to the background behind it. The glow you're seeing inside the box is actually just a general glow around each of the container's elements. You'd get the same result with a Canvas, although a Panel has a fillled background and doesn't have this effect. You can get the effect you're looking for by setting a background color on the box: mx:Box height=100 width=200 mouseDownEffect={glowImage} backgroundColor=white borderColor=black borderStyle=solid Chet. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of mitchgrrt Sent: Monday, July 27, 2009 7:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: problem using mx:Glow and mx:Box Also in the example, the inner hello label gets the glow. It seems like the Glow is applied to the outer and inner borders of the Box, and also to objects inside the Box. Does anybody know how to make the Glow effect just the outside of the Box? Thanks. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, mitchgrrt mitch_g...@... wrote: I'm trying to put a Glow around a Box, and have the glow show around the outside of the Box's borders but not the inside. Here's part of the code: mx:Glow id=glowImage duration=1000 alphaFrom=1.0 alphaTo=0.3 blurXFrom=0.0 blurXTo=50.0 blurYFrom=0.0 blurYTo=50.0 inner=false color=0x00FF00/ mx:Box height=100 width=200 mouseDownEffect={glowImage} borderColor=black borderStyle=solid mx:Label text=hello / /mx:Box The Glow shows up both inside and outside the Box's borders, even though I set inner=false. Does somebody know how to get it to show just outside the box? Thanks.
RE: [flexcoders] contextMenus and Modules and Tree == Fail
Make as simple a test case as much as possible and if there is still a problem, file a bug. 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 djhatrick Sent: Monday, July 27, 2009 7:27 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] contextMenus and Modules and Tree == Fail I am having the difficult time, trying to apply a context Menu to a TreeList in module, has anybody had such a difficult time? I've tried this: http://blog.arc90.com/2008/04/adding_a_contextmenu_to_a_flex.php and I've tried this: http://michael.omnicypher.com/2007/02/flex-trees-with-context-menu_14.html Seems when I put my contextMenu inside a module, when I right click nothing shows up, although it's created. Also, when I right click on my module and move the mouse off a big ugly white box fills my container, yuck.. Any suggestions, Thanks, Patrick
[flexcoders] Re: problem using mx:Glow and mx:Box
That worked. Thanks a lot for the help. - Mitch --- In flexcoders@yahoogroups.com, Chet Haase cha...@... wrote: Box doesn't have a fill by default, so you're seeing right through the container to the background behind it. The glow you're seeing inside the box is actually just a general glow around each of the container's elements. You'd get the same result with a Canvas, although a Panel has a fillled background and doesn't have this effect. You can get the effect you're looking for by setting a background color on the box: mx:Box height=100 width=200 mouseDownEffect={glowImage} backgroundColor=white borderColor=black borderStyle=solid Chet.
[flexcoders] Problem with effects
Hi Everyone, I'm having a little trouble here. We've in our project a splashScreen window, where we use an effect on AS3 (Bitfade, if anyone knows). Our trickly problem is: in Flex 3 it works with no problem, but with Flex 4 it doesn't works! I tried: compile a separate file like embbeded in a lib, but nothing seems work about it. Can anyone help me? Thanks!
Re: [flexcoders] world clock
Darrin Kay wrote: How so?� It can give me server time, but if the server is in London lets say.� Daylight savings happens in London 2 weeks after it does in the US. http://www.sustainablegis.com/projects/tz/testTZCFC.cfm
[flexcoders] Re: Question about a flex component
There is an example in the documentation of the HorizontalList: http://livedocs.adobe.com/flex/3/langref/mx/controls/HorizontalList.html#includeExamplesSummary --- In flexcoders@yahoogroups.com, veena_kris2003 v.kri...@... wrote: Do you mind posting a complete example? Hope it is not too much to ask. --- In flexcoders@yahoogroups.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 [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
[flexcoders] Re: better option than repeater?
I don't quite get what you are trying to do. Create a component. This component will display each staff member. Create a public variable to hold each staff record (Value Object) and pass that record to the component inside the repeater. The example I posted shows how to do this. So, there is only one call to the RemoteObject service that returns an array collection of staff objects. The data provider of the repeater is set to this array collection. As the repeater runs, each instance of the component gets one staff record. You use this record to figure out which checkbox is to be set. An mx:RemoteObject can be used wherever you need it. I have components with Remote Objects that are repeated. The first remote object call gets the data for each component which then makes its own RO call to get further data if the user selects that component. As an example, in your situation, you could have each staff member displayed with a button labeled More Info. If a user clicks this button the RO in this component will make a call to the server to get more info for this staff member. HTH Steve --- In flexcoders@yahoogroups.com, postwick p...@... wrote: OK, thanks to the below example, I have made some progress on setting up my first custom itemRenderer. Code can be viewed here: http://www.ubeek.com/Flex/testrend.mxml As I mentioned before, my goal is to display a list of Staff. One of the fields (moduleAccess) in the Staff record is a list of integers (i.e. 1,3,17,25). I have a table that contains a list of modules (SEQ, MODULENAME). For each Staff displayed by the List's itemRenderer, I need to loop through all the modules and output a checkbox...and if the module's SEQ is in the Staff's moduleAccess list then the box should be checked. I tried setting up a remoteObject inside the custom renderer, but no matter where I put it it gave me a parse error. I guess it doesn't like mx:RemoteObject inside a component. So I put it outside the component, but then the script function inside the component didn't seem able to access the RemoteObject's data. Although it was what I initially tried to do (with the RO inside the component) I don't really want to do that as it seems highly inefficient to query the database for every Staff record. It seems I should be able to execute the RO just once and then pass the resulting list of modules to the component so I can loop through it to output all the checkboxes (and for each record check the SEQ against the Staff's moduleAccess, which I know how to do). So the question is - how do call the RO just once and pass the result into the component (as an ArrayCollection or something) so I can loop over it repeatedly instead of actually calling it and hitting the database repeatedly? Thanks, Paul --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: As a quick and dirty... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical xmlns:custom=Components.* mx:Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] private var staffArrColl:ArrayCollection; ]] /mx:Script mx:Repeater id=myStaff dataProvider={staffArrColl} custom:CheckBoxComponent id=checkBoxs person={Person(myStaff.currentItem)} / /mx:Repeater /mx:Application CheckBoxComponent.mxml: ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=onCreationComplete() mx:Script ![CDATA[ import ValueObjects.Person; public var person:Person; private function onCreationComplete():void { // From person object make a remote object call to get Modules and Queues // When remote object calls return, create checkboxes appropriately } ]] /mx:Script /mx:VBox Person.as: package ValueObjects { [RemoteClass(alias=Classes.Testing.Person)] [Bindable] public class Person { //instance variables private var _name:String; private var _id:String; //accessor methods public function get name():String {return _name;} public function get id():String {return _id;} //mutator methods public function set name(name:String):void {_name = name;} public function set id(id:String):void {_id = id;} } // end class }//end package I have not included any remote object calls or result handlers. I'll leave that up to you. Keep in mind that Flex is object oriented. One of the ideas behind OOP is encapsulation. If you can encapsulate all the properties and methods of something and then repeat that, the possibilities are endless. HTH Steve
[flexcoders] Re: Can not select itemrenderer
I don't quite get what you are trying to do but did notice you are missing a super.data = value; --- In flexcoders@yahoogroups.com, Barry bazja...@... wrote: Hi unable to select the following itemRenderer when used in a list. Any advice would be much appreciated. //-- mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalScrollPolicy=off mx:Script ![CDATA[ import com.pbsmedia.kanpeki.domain.calEvent.CalEventType; [Bindable] private var calEventType:CalEventType; override public function set data(value:Object):void { if(value != null) { calEventType = value as CalEventType; colorBar.setStyle(backgroundColor, calEventType.eventColor); } } ]] /mx:Script mx:Image source={calEventType.icon} / mx:Label text={calEventType.name} selectable=true/ mx:HBox height=100% width=100% horizontalAlign=right paddingRight=20 mx:Box id=colorBar width=50 height=100% /mx:Box // The renderer is set up on creation complete of the list's parent component as follows. private function cc():void{ if(_itemRenderer != null) { lt.itemRenderer = getItemRendererFactory(); } } private function getItemRendererFactory():ClassFactory { return new ClassFactory(_itemRenderer); } I can't for the life of me figure out why the list is not selectable if I use this renderer. thanks,
[flexcoders] Re: Measuring the width of a label
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, 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.
RE: [flexcoders] Re: better option than repeater?
This would be my approach: You need two dataProviders (ArrayCollections), one being for the available modules and the other for your list of staff. You'd only need two remote objects to retrieve them. Your modules dataprovider would be passed into each component instance and used by the component to generate your list of available modules with checkboxes. Your repeater is going to accept the staff list dataProvider. As it loops over the ArrayCollection, it will pass the selected modules for a given staff member to your checkbox component. It's up to you to write the setter function to pass the selected values into your checkbox component and to set the 'selected' property of each checkbox accordingly. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Monday, July 27, 2009 2:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: better option than repeater? I don't quite get what you are trying to do. Create a component. This component will display each staff member. Create a public variable to hold each staff record (Value Object) and pass that record to the component inside the repeater. The example I posted shows how to do this. So, there is only one call to the RemoteObject service that returns an array collection of staff objects. The data provider of the repeater is set to this array collection. As the repeater runs, each instance of the component gets one staff record. You use this record to figure out which checkbox is to be set. An mx:RemoteObject can be used wherever you need it. I have components with Remote Objects that are repeated. The first remote object call gets the data for each component which then makes its own RO call to get further data if the user selects that component. As an example, in your situation, you could have each staff member displayed with a button labeled More Info. If a user clicks this button the RO in this component will make a call to the server to get more info for this staff member. HTH Steve --- In flexcoders@yahoogroups.com, postwick p...@... wrote: OK, thanks to the below example, I have made some progress on setting up my first custom itemRenderer. Code can be viewed here: http://www.ubeek.com/Flex/testrend.mxml As I mentioned before, my goal is to display a list of Staff. One of the fields (moduleAccess) in the Staff record is a list of integers (i.e. 1,3,17,25). I have a table that contains a list of modules (SEQ, MODULENAME). For each Staff displayed by the List's itemRenderer, I need to loop through all the modules and output a checkbox...and if the module's SEQ is in the Staff's moduleAccess list then the box should be checked. I tried setting up a remoteObject inside the custom renderer, but no matter where I put it it gave me a parse error. I guess it doesn't like mx:RemoteObject inside a component. So I put it outside the component, but then the script function inside the component didn't seem able to access the RemoteObject's data. Although it was what I initially tried to do (with the RO inside the component) I don't really want to do that as it seems highly inefficient to query the database for every Staff record. It seems I should be able to execute the RO just once and then pass the resulting list of modules to the component so I can loop through it to output all the checkboxes (and for each record check the SEQ against the Staff's moduleAccess, which I know how to do). So the question is - how do call the RO just once and pass the result into the component (as an ArrayCollection or something) so I can loop over it repeatedly instead of actually calling it and hitting the database repeatedly? Thanks, Paul --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: As a quick and dirty... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical xmlns:custom=Components.* mx:Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] private var staffArrColl:ArrayCollection; ]] /mx:Script mx:Repeater id=myStaff dataProvider={staffArrColl} custom:CheckBoxComponent id=checkBoxs person={Person(myStaff.currentItem)} / /mx:Repeater /mx:Application CheckBoxComponent.mxml: ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=onCreationComplete() mx:Script ![CDATA[ import ValueObjects.Person; public var person:Person; private function onCreationComplete():void { // From person object make a remote object call to get Modules and Queues // When remote object calls return, create checkboxes appropriately } ]]
[flexcoders] Adding event listeners to the horizontalList items
I added event listeners to each item, I added the items at runtime to a horizontalList. But not sure how to invoke the listener when the individual item is clicked. I can't define clickFunc because my dataProvider looks like this: mx:dataProvider mx:ArrayCollection/ /mx:dataProvider Thanks, Veena
[flexcoders] Re: Question about a flex component
Hi, Thanks for your answer. Do you mind posting an example? Thanks, Veena --- 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
[flexcoders] Re: Question about a flex component
I need an example of code, that dynamically(at runtime) adds objects to a horizontalList and that has eventhandlers for the selected item in the horizontalList. --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: There is an example in the documentation of the HorizontalList: http://livedocs.adobe.com/flex/3/langref/mx/controls/HorizontalList.html#includeExamplesSummary --- In flexcoders@yahoogroups.com, veena_kris2003 v.kris21@ wrote: Do you mind posting a complete example? Hope it is not too much to ask. --- In flexcoders@yahoogroups.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 [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
[flexcoders] Re: Question about a flex component
None of my messages are getting posted on this forum. The dataProvider is a ArrayCollection of cusom objects. I added listeners to each object before I added the object to the horizontal list at runtime. I am not sure how to propogate the events when an item is selected from the horizontal list. --- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote: You must use the collection API to add the items in order for the necessary events to be dispatched to update the UI. What is the data type of you dataProvider? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 6: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 flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.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: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.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 flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.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: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.commailto:flexcoders%40yahoogroups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.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
I have two problems at this point. I used the following example, to modify my code. But problem 1 is: even though I added an eventListener to the object that I added to the HorizontalList, the eventListener is not getting called when I click on the object in the UI. problem 2 is: the horizontal scroll bar looks wierd, it does not look like it should. How should I proceed? much appreciated, Veena --- 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,
[flexcoders] Re: Question about a flex component
My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- 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] UpLoading an Image on the data grid using coldfusion 8 as a backend
Hi Everyone, I have a problem on Uploading an Image on the datagrid... ( Uploading and saving into the database) Can anyone help me or give me a short example to solve my problem... I'm using coldfusion as the backend... Thank you very much
[flexcoders] adding event listeners
I added an event listener to each button. Added the buttons to the HorizontalList. WHen I click on a button, I want the event listener to be called. It is not getting called. How do I do this?
[flexcoders] Mouse events and overlapping movie clips
If two or move movie clips overlap, everything underneath the top movie clip does not seem to receive mouse events. I tried many things, including setting .mouseEnabled = false; on the top movie clip and its constituents, but it still eats up all mouse interaction. Is there a way around this? Listening to all mouse events and using hitTest is not an option in my case. Please help.
[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
RE: [flexcoders] Re: Question about a flex component
That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- 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
[flexcoders] Re: Question about a flex component
I fixed it so that I called the change=horizontalScrollListChange(event). Then I pass in a ListEvent to the horizontalScrollListChange method. Can I dispatch a MouseEvent from the horizontalScrollListChange method? --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.commailto: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 [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.
RE: [flexcoders] Re: Question about a flex component
Normally only the Player dispatches MouseEvents, in response to the user using the mouse. Why would you want to dispatch a MouseEvent in your code? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Monday, July 27, 2009 3:44 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component I fixed it so that I called the change=horizontalScrollListChange(event). Then I pass in a ListEvent to the horizontalScrollListChange method. Can I dispatch a MouseEvent from the horizontalScrollListChange method? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? 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: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto: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.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.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.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.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.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.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind
[flexcoders] AIR and Right-Click behavior
Folks: I am writing an AIR app that scripts right-clicking an item renderer in a custom component. The mouse event is captured but it seems that the item is immediately deselected (as if a context menu or other modal dialog were showing) before the event is captured. The cutom component is a Fisheye viewer that repositions and scales items on mouseover so any item that is sufficiently repostioned during mouseover snaps back to its non-highlighted position before event capture and therefore the event's target is incorrect or empty. Is there a way to override this behavior in air and maintain the mouseover after a right click? This seems kind of obvious but the docs make no mention as far as I can see. RG
RE: [flexcoders] Re: Sideways text
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 gosm...@... 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] Re: Question about a flex component
It is really complex code. I don't understand it yet. On Mon, Jul 27, 2009 at 7:02 PM, Gordon Smith gosm...@adobe.com wrote: Normally only the Player dispatches MouseEvents, in response to the user using the mouse. Why would you want to dispatch a MouseEvent in your code? Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *veena_kris2003 *Sent:* Monday, July 27, 2009 3:44 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Question about a flex component I fixed it so that I called the change=horizontalScrollListChange(event). Then I pass in a ListEvent to the horizontalScrollListChange method. Can I dispatch a MouseEvent from the horizontalScrollListChange method? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? 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: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.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%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.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 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%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto:
Re: [flexcoders] Thermometer Component
Hi Dan, Have you found what you was looking for? Regards On Sun, Sep 28, 2008 at 1:12 PM, Sajid Hussain enchanter_...@yahoo.comwrote: maybe this could help http://samples.degrafa.com/ThermometerSkin/Thermometer.html http://samples.degrafa.com/ Sajid - Original Message From: Dan Pride danielpr...@yahoo.com To: flexcoders@yahoogroups.com Sent: Sunday, September 28, 2008 6:06:35 PM Subject: [flexcoders] Thermometer Component Thermometer Component I am looking for a component which will reflect a single value like a thermometer. Simple feed in the value and display it with updates. Any idea where to look or if anyone has one for sale this is for a commercial product. Thanks Dan -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
RE: [flexcoders] Re: Question about a flex component
You can try dispatching MouseEvents, but I'm not sure that they'll work exactly the same as a Player-generated one. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena pandit Sent: Monday, July 27, 2009 4:17 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Question about a flex component It is really complex code. I don't understand it yet. On Mon, Jul 27, 2009 at 7:02 PM, Gordon Smith gosm...@adobe.commailto:gosm...@adobe.com wrote: Normally only the Player dispatches MouseEvents, in response to the user using the mouse. Why would you want to dispatch a MouseEvent in your code? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Monday, July 27, 2009 3:44 PM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component I fixed it so that I called the change=horizontalScrollListChange(event). Then I pass in a ListEvent to the horizontalScrollListChange method. Can I dispatch a MouseEvent from the horizontalScrollListChange method? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? 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: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.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.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.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.commailto:flexcoders%2540yahoogroups.commailto:flexcoders%40yahoogroups.commailto: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
[flexcoders] Re: Embedding Multiple Images
Hi, Really sorry for replying late. I was engrossed with many isssues that i didnt turn around to this forum. No, I haven't created any TreeItemRender for this. How to do that ?? Thanks --- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote: Do you have the image TreeItemRender working correctly? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of n_manjunatha Sent: Friday, July 24, 2009 1:02 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Embedding Multiple Images Hi All, I have requirement wherein I have tree and each node of tree has different images. Now when the user clicks each of the tree nodes, at the bottom pane of my application i need to show the image of the tree node and all the associated properties of the node.(very much similar to windows explorer behaviour) However i cant seem to embedd the multiple images. I need to do it dynamically based on click of tree node. Will someone guide me on this Thanks
Re: [flexcoders] Re: Question about a flex component
I'll try it. So how would I do it? On Mon, Jul 27, 2009 at 7:25 PM, Gordon Smith gosm...@adobe.com wrote: You can try dispatching MouseEvents, but I'm not sure that they'll work exactly the same as a Player-generated one. Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *veena pandit *Sent:* Monday, July 27, 2009 4:17 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: Question about a flex component It is really complex code. I don't understand it yet. On Mon, Jul 27, 2009 at 7:02 PM, Gordon Smith gosm...@adobe.com wrote: Normally only the Player dispatches MouseEvents, in response to the user using the mouse. Why would you want to dispatch a MouseEvent in your code? Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *veena_kris2003 *Sent:* Monday, July 27, 2009 3:44 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Question about a flex component I fixed it so that I called the change=horizontalScrollListChange(event). Then I pass in a ListEvent to the horizontalScrollListChange method. Can I dispatch a MouseEvent from the horizontalScrollListChange method? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? 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: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.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%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.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 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,
[flexcoders] Play media with Flex
Hi, I have a question for how to play online video/audio with Flex.I have urk like http://www.abc.com/abc.mp3 http://www.abc.com/abc.flv I want to play them with Flex app.Please give me a idea for this. Thanks a lot. Mark
[flexcoders] Who can explain me this:
?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] Re: Question about a flex component
The same way you dispatch any other event: Construct the Event instance, set its properties, and then call dispatchEvent() on the object that the event should be dispatched from (which generally is 'this'): var mouseEvent:MouseEvent = new MouseEvent(MouseEvent.MOUSE_DOWN); mouseEvent.localX = 10; mouseEvent.localY = 10; ... someComponent.dispatchEvent(mouseEvent); Gordon Smith Adeobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena pandit Sent: Monday, July 27, 2009 4:46 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Question about a flex component I'll try it. So how would I do it? On Mon, Jul 27, 2009 at 7:25 PM, Gordon Smith gosm...@adobe.commailto:gosm...@adobe.com wrote: You can try dispatching MouseEvents, but I'm not sure that they'll work exactly the same as a Player-generated one. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of veena pandit Sent: Monday, July 27, 2009 4:17 PM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Question about a flex component It is really complex code. I don't understand it yet. On Mon, Jul 27, 2009 at 7:02 PM, Gordon Smith gosm...@adobe.commailto:gosm...@adobe.com wrote: Normally only the Player dispatches MouseEvents, in response to the user using the mouse. Why would you want to dispatch a MouseEvent in your code? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Monday, July 27, 2009 3:44 PM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component I fixed it so that I called the change=horizontalScrollListChange(event). Then I pass in a ListEvent to the horizontalScrollListChange method. Can I dispatch a MouseEvent from the horizontalScrollListChange method? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? 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: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.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.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.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
RE: [flexcoders] Who can explain me this:
Because vars like 'a' and 'b', and Array elements like testx[0], store references to Objects. They aren't the Objects themselves. You can have many references to the same Object. Initially you have a -| -- { data: 100 } testx[0] --| b --- { data: 200 } When you assign a.data = 1000 you have a -| -- { data: 1000 } testx[0] --| b --- { data: 200 } When you assign a = b, 'a' now points to the same object as 'b', but testx[0] continues to point to the same object, so you have testx[0] { data: 1000 } a -| -- { data: 200 } b -| Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of lytvynyuk Sent: Monday, July 27, 2009 6:18 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Who can explain me this: ?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] pass variables from flex to javascript
Is there any way to pass variables using ExternalInterface to Javascript from flex ?
[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?
RE: [flexcoders] Loading local SWFs in AIR to local-with-network sandbox
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
RE: [flexcoders] Mouse events and overlapping movie clips
Should be possible. See what the event.target is and make sure it also has mouseEnabled=false. Also mouseChildren flag is important. 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 alekseyvays Sent: Monday, July 27, 2009 2:49 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Mouse events and overlapping movie clips If two or move movie clips overlap, everything underneath the top movie clip does not seem to receive mouse events. I tried many things, including setting .mouseEnabled = false; on the top movie clip and its constituents, but it still eats up all mouse interaction. Is there a way around this? Listening to all mouse events and using hitTest is not an option in my case. Please help.