[flexcoders] Re: Webservices problem
Hi, My code looks like below: public function useTest():void{ WSTest.GetData.resultFormat=e4x; WSTest.addEventListener(load, loadHandler); WSTest.GetData.addEventListener(result, resultHandler); WSTest.addEventListener(FaultEvent.FAULT,faultHandler); WSTest.loadWSDL(); } public function loadPostsHandler(event:LoadEvent):void{ WSPosts.GetData(Get Result); } private function resultHandler(event:ResultEvent):void{ Alert.show(+event.result); } private function faultHandler(event:FaultEvent):void{ Alert.show(+event); } WSTest is the id of my WebService. I have also specified useProxy=false I am passing in the parameters correctly. useTest() is called on every button click. The webservice works fine on the first call. It is only on the subsequent calls that an error is thrown. Thanks Regards, Sudha. --- In flexcoders@yahoogroups.com, subeesh a [EMAIL PROTECTED] wrote: Are you passing in the parameters correctly ? . How are you passing the vaues to the webservice method. Post your code snippet here . - Original Message From: sudha_bsb [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, 20 December, 2007 12:15:36 PM Subject: [flexcoders] Webservices problem Hi, I have a webservice that I invoke back to back on a button click. On the first click the webservice returns the expected result. However, on successive clicks, I get the following error: [FaultEvent fault=[RPC Fault faultString= Array of input arguments did not contain a required parameter at position 2 faultCode=Client. Input faultDetail= null] messageId=null type=fault bubbles=false cancelable=true eventPhase=2] I am using Flex 2.0.1 Could anyone help me out to resolve this issue? Thanks Regards, Sudha. Chat on a cool, new interface. No download required. Go to http://in.messenger.yahoo.com/webmessengerpromo.php
[flexcoders] How to draw a rect border on a rotated image
Hello all I find if I rotate the image (by setting the rotation to some value in Image property) to some degree, the axis of the object has been changed. So if I want to draw a rect around the image object, how can I do it. And, I find if I setting rotation of an object will cause the object been rotated from it's (0, 0) point. How can I rotate it around some other point, such as the center of the image? == Make Every Day Count Larry Zhang
[flexcoders] Re: Problem with RSL and SWFLoaders
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I think you'd have to debug through it and see what is going on. However, before doing that, is it possible to re-implement this set of apps? Do these sub-apps ever need to run on their own? If not, you should consider using Modules. If that's too big an effort but those sub-apps don't need to run on their own, you should not build them using RSLs and simply extern all of the classes in the RSL when you build them. It will prevent them from even trying to load the RSL, but they'll remain small and run fine because they'll find the classes in the main app's applicationDomain. This should make your sub-apps show up even faster since they don't need to wait for the 3MB RSL load. I would expect this to solve your problem as well as there might be issues when more than one loader is trying to load the same bits. Hi Alex, It certainly looks like a problem with multiple loaders loading the same stuff at the same time. I have logged bug SDK-14085 for this. Unfortunately I cannot try your suggestions because each application does indeed have to be able to run on its own - the system I have created allows the applications to be removed from the main application window and opened in a new browser window. They can then be resized/minimised/moved to different monitors etc etc. Thanks for your help with this, Nick.
[flexcoders] Re: const?
I think you still pretty much get the concept of const. It means the value of yyy cannot be changed after initialisation. To actually see it used in methods like this.. I assume the example you gave is a bit 'stripped down' :p If I get it correctly, everything is ActionScript is passed by reference, so to expand your example a bit: function xxx() { const yyy:Number = 99; abc(yyy); } function abc(zzz:Number) { zzz *= 10; } Not big of an example, not even sure if it's correct. But when this is done I assume an error will be thrown, saying that the assignment to zzz in function abc is illegal for the argument yyy, being const. However this is an assumption, based on how I used const in other programming languages. I have no experience with it in AS --Johan --- In flexcoders@yahoogroups.com, reflexactions [EMAIL PROTECTED] wrote: I thought I understood the meaning and use of const until I saw Adobe use it inside methods... function xxx(){ const yyy:Number=99 } What is the effect of that and what is the benefit? tks
[flexcoders] Repeater and click
Hi, I have this code mx:Repeater id=newRepeater dataProvider={newsRequest.lastResult.news.noti} count=2 mx:Label y={20+(newRepeater.currentIndex*35)} text={newRepeater.currentItem.data} color=0xcc/ mx:Label y={32+(newRepeater.currentIndex*35)} text={newRepeater.currentItem.titol} color=0xff width=200 useHandCursor=true click=openSite(newRepeater.currentItem.url) buttonMode=true mouseChildren=false/ mx:Label text={newRepeater.currentItem.url} / /mx:Repeater All work okay, but when i press Label, error say: Error: Repeater is not executing. at mx.core::Repeater/get currentItem() at vidi_new/___Label3_click() How i can pass repeater data to a function? Thk. Giro.
[flexcoders] Re: How do I make the background fill the whole screen, not just the Application
That works in the default NO_SCALE scaleMode. But I need my app to be SHOW_ALL. So everything gets scaled to the maximum width/height of the window. Here is another example: http://kolt-siewerts.com/flexTest/helloWorld/ (right-click for source view) The text scales just like I want it to: according to the window-scale. But if you scale the browser window to an extreme 5:1 ratio, you see a black bar at the sides. And no, setting maxWidth or minWidth does not work ;) --- In flexcoders@yahoogroups.com, Joseph Balderson [EMAIL PROTECTED] wrote: Your Application should stretch with the inner browser width height by default, you don't need to monkey with the Stage object like you do in Flash. If what you want is a background which covers the whole browser screen, let the Application fill up the space. Then place the rest of your content in another container. For instance, if you want your content to be centred on the stage but your content to absolutely positioned, use the following code: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical horizontalAlign=center verticalAlign=middle backgroundColor=#00 backgroundGradientAlphas=[1.0,1.0] backgroundGradientColors=[0x00, 0xAA] mx:Canvas backgroundColor=#FF width=400 height=400 mx:Button label=daButton1 top=20 left=20/ mx:Button label=daButton2 right=20 bottom=20/ /mx:Canvas /mx:Application The two buttons use constrained layout positioning as opposed to absolute positioning, so they float a certain distance from the sides of the canvas container. ___ Joseph Balderson, Flash Platform Developer | http://joeflash.ca Writing partner, Community MX | http://www.communitymx.com Abobe Certified Developer Trainer
[flexcoders] [FB 3 b3] Module created from class not created where I want
Hi there, I've created a Flex Project to test the Modules. So I have 2 Modules that I load dynamicly. This Module are ceated from classes that are in package folder com.mysociety.labs.test.moduletest Trouble is that swf for modules are created in the same folders on the bin repositeroy. I would like to change this, but editing Output SWF property don't seems to have any effect... Bug or Not ? -- BenoƮt Milgram / Flapflap http://www.kilooctet.net I'm also a music mashup / bootlegs producer : http://www.djgaston.net
[flexcoders] Re: Loading mask or overlay for datagrids while loading
Because that is not the way I want? It's not only ment for datagrids, also for components that load data. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: How about using PopUpManager to popup something over the datagrid? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of brey_magenta Sent: Monday, December 17, 2007 12:08 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Loading mask or overlay for datagrids while loading Well, for example, using a mask? I know you can put a 'mask' over any visible object but I don't know how to make a mask which shows a animated loading swf/image. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: There are so many options, I don't know where to start. You can use masks, overlays, popups, effects, transitions. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of brey_magenta Sent: Wednesday, December 12, 2007 11:50 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Loading mask or overlay for datagrids while loading I've been wondering how to show a nice loading animation while a datagrid or other component is loading and fading it out when it's done loading. I've been looking everywhere for a nice solution but I haven't found a decent one so far. Is there an easy way? By using a mask or something?
[flexcoders] Re: const?
Actually I wouldnt mind betting that code of yours would run without any error at all, native types are passed by value not reference. --- In flexcoders@yahoogroups.com, johantrax [EMAIL PROTECTED] wrote: I think you still pretty much get the concept of const. It means the value of yyy cannot be changed after initialisation. To actually see it used in methods like this.. I assume the example you gave is a bit 'stripped down' :p If I get it correctly, everything is ActionScript is passed by reference, so to expand your example a bit: function xxx() { const yyy:Number = 99; abc(yyy); } function abc(zzz:Number) { zzz *= 10; } Not big of an example, not even sure if it's correct. But when this is done I assume an error will be thrown, saying that the assignment to zzz in function abc is illegal for the argument yyy, being const. However this is an assumption, based on how I used const in other programming languages. I have no experience with it in AS --Johan --- In flexcoders@yahoogroups.com, reflexactions reflexactions@ wrote: I thought I understood the meaning and use of const until I saw Adobe use it inside methods... function xxx(){ const yyy:Number=99 } What is the effect of that and what is the benefit? tks
[flexcoders] Re: const?
Then it's out of my league, perhaps someone from Adobe could help us out? (subtile hint ;) --- In flexcoders@yahoogroups.com, reflexactions [EMAIL PROTECTED] wrote: Actually I wouldnt mind betting that code of yours would run without any error at all, native types are passed by value not reference.
[flexcoders] Center an MDIWindow of FlexMDI
Hi people!! how to do centralize an MDIWindow? thx
Re: [flexcoders] Repeater and click
Hi Giro, Once initialization has been done which is the case when the click event happened, you must use the getRepeaterItem() method of the repeated component instance instead of currentItem property. Hope this helps, Giro wrote: Hi, I have this code mx:Repeater id=newRepeater dataProvider={newsRequest.lastResult.news.noti} count=2 mx:Label y={20+(newRepeater.currentIndex*35)} text={newRepeater.currentItem.data} color=0xcc/ mx:Label y={32+(newRepeater.currentIndex*35)} text={newRepeater.currentItem.titol} color=0xff width=200 useHandCursor=true click=openSite(newRepeater.currentItem.url) buttonMode=true mouseChildren=false/ mx:Label text={newRepeater.currentItem.url} / /mx:Repeater All work okay, but when i press Label, error say: Error: Repeater is not executing. at mx.core::Repeater/get currentItem() at vidi_new/___Label3_click() How i can pass repeater data to a function? Thk. Giro. -- Christophe
[flexcoders] Re: State transitions and List components
you can use indexToItemRenderer() to get the item renderer at a specified index. - venkat http://www.venkatj.com --- In flexcoders@yahoogroups.com, rohit2b [EMAIL PROTECTED] wrote: Hi, I'm trying to have state transitions in an mxml component that has a List item that uses custom item renderers. Is it possible to access the children of the List item as UI components, and to get each child's x and y position? I haven't been able to find a way to do so. The List has a data provider which is an array of data objects. I need to be able to access the rendered UI component for each data object in the List. Any help would be greatly appreciated. Thanks, Rohit
[flexcoders] Re: How to draw a rect border on a rotated image
you can rotate an object around any arbitrary point using matrix transformations. public static function rotateAroundInternalPoint(m:Matrix, x:Number, y:Number, angleDegrees:Number):void { var point:Point = new Point(x, y); point = m.transformPoint(point); m.tx -= point.x; m.ty -= point.y; m.rotate(angleDegrees*(Math.PI/180)); m.tx += point.x; m.ty += point.y; } you can then apply the matrix on the component transform. --- In flexcoders@yahoogroups.com, Larry Zhang [EMAIL PROTECTED] wrote: Hello all I find if I rotate the image (by setting the rotation to some value in Image property) to some degree, the axis of the object has been changed. So if I want to draw a rect around the image object, how can I do it. And, I find if I setting rotation of an object will cause the object been rotated from it's (0, 0) point. How can I rotate it around some other point, such as the center of the image? == Make Every Day Count Larry Zhang
[flexcoders] hibernate -FDS on tomcat server
I have configured hibernate -FDS on tomcat server. For that my data-management-config.xml looks like this ?xml version=1.0 encoding=UTF-8? service id=data-service class=flex.data.DataService adapters adapter-definition id=actionscript class=flex.data.adapters.ASObjectAdapter default=true/ adapter-definition id=java-dao class=flex.data.adapters.JavaAdapter/ /adapters default-channels channel ref=my-rtmp/ /default-channels destination id=hibernate-finover adapter ref=java-dao / properties use-transactionstrue/use-transactions sourceflex.data.assemblers.HibernateAssembler/source scopeapplication/scope metadata identity property=bienm/ /metadata network session-timeout20/session-timeout paging enabled=false pageSize=10 / throttle-inbound policy=ERROR max-frequency=500/ throttle-outbound policy=REPLACE max-frequency=500/ /network server hibernate-entitycom.un.itsd.mgt.hibernate.mapping.VwFinBgtMain/hibernate-entity fill-method namefill/name paramsjava.util.List/params /fill-method fill-configuration use-query-cachefalse/use-query-cache allow-hql-queriestrue/allow-hql-queries /fill-configuration /server /properties /destination /service And services-config.xml is like this; ?xml version=1.0 encoding=UTF-8? services-config services service-include file-path=remoting-config.xml / service-include file-path=proxy-config.xml / service-include file-path=messaging-config.xml / service-include file-path=data-management-config.xml / /services security login-command class=flex.messaging.security.JRunLoginCommand server=JRun/ !-- Uncomment the correct app server login-command class=flex.messaging.security.TomcatLoginCommand server=Tomcat/ login-command class=flex.messaging.security.WeblogicLoginCommand server=Weblogic/ login-command class=flex.messaging.security.WebSphereLoginCommand server=WebSphere/ -- security-constraint id=basic-read-access auth-methodBasic/auth-method roles roleguests/role roleaccountants/role roleemployees/role rolemanagers/role /roles /security-constraint /security channels channel-definition id=my-amf class=mx.messaging.channels.AMFChannel endpoint url=http://{server.name}:{server.port}/{context.root}/messagebroker/amf; class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled /properties /channel-definition channel-definition id=my-secure-amf class=mx.messaging.channels.SecureAMFChannel endpoint url=https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure; class=flex.messaging.endpoints.SecureAMFEndpoint/ properties !--HTTPS requests on some browsers do not work when pragma no-cache are set-- add-no-cache-headersfalse/add-no-cache-headers /properties /channel-definition channel-definition id=my-polling-amf class=mx.messaging.channels.AMFChannel endpoint url=http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling; class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledtrue/polling-enabled polling-interval-seconds8/polling-interval-seconds /properties /channel-definition channel-definition id=my-rtmp class=mx.messaging.channels.RTMPChannel endpoint url=rtmp://{server.name}:2038 class=flex.messaging.endpoints.RTMPEndpoint/ properties idle-timeout-minutes20/idle-timeout-minutes !-- for deployment on WebSphere, must be mapped to a WorkManager available in the web application's jndi context. websphere-workmanager-jndi-namejava:comp/env/wm/MessagingWorkManager/websphere-workmanager-jndi-name -- /properties /channel-definition channel-definition id=my-http class=mx.messaging.channels.HTTPChannel endpoint url=http://{server.name}:{server.port}/{context.root}/messagebroker/http; class=flex.messaging.endpoints.HTTPEndpoint/ /channel-definition channel-definition id=my-secure-http class=mx.messaging.channels.SecureHTTPChannel endpoint url=https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure; class=flex.messaging.endpoints.SecureHTTPEndpoint/ properties
Re: [flexcoders] Re: const?
Maybe you could help yourself? From the Flex 2 manual pages: http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=03_Language_and_Syntax_160_13.html Constants ActionScript 3.0 supports the const statement, which you can use to create constants. Constants are properties with a fixed value that cannot be altered. You can assign a value to a constant only once, and the assignment must occur in close proximity to the declaration of the constant. For example, if a constant is declared as a member of a class, you can assign a value to that constant only as part of the declaration or inside the class constructor. Paul - Original Message - From: johantrax [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 12:14 PM Subject: [flexcoders] Re: const? Then it's out of my league, perhaps someone from Adobe could help us out? (subtile hint ;) --- In flexcoders@yahoogroups.com, reflexactions [EMAIL PROTECTED] wrote: Actually I wouldnt mind betting that code of yours would run without any error at all, native types are passed by value not reference. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] PopUp removal
My popup A opens popup B. Upon item selection within popup B I want to close both popup A and then popup B. I can close popup B with PopUpManager.removePopUp(this), but, before this, how can I remove popup A please?
[flexcoders] Re: const?
Thanks for the advice, Maybe you could read the question, I am talking about Adobe declaring a const inside a function and asking what is the use and benefit of that. No part of my question is covered by that help topic. --- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: Maybe you could help yourself? From the Flex 2 manual pages: http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwh elp.htm? context=LiveDocs_Book_Partsfile=03_Language_and_Syntax_160_13.html Constants ActionScript 3.0 supports the const statement, which you can use to create constants. Constants are properties with a fixed value that cannot be altered. You can assign a value to a constant only once, and the assignment must occur in close proximity to the declaration of the constant. For example, if a constant is declared as a member of a class, you can assign a value to that constant only as part of the declaration or inside the class constructor. Paul - Original Message - From: johantrax [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 12:14 PM Subject: [flexcoders] Re: const? Then it's out of my league, perhaps someone from Adobe could help us out? (subtile hint ;) --- In flexcoders@yahoogroups.com, reflexactions reflexactions@ wrote: Actually I wouldnt mind betting that code of yours would run without any error at all, native types are passed by value not reference. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com Yahoo! Groups Links
[flexcoders] Re: Center an MDIWindow of FlexMDI
Do you just mean center it in relation to its parent container? If so, you treat it just like any other component as its really just a subclassed Panel with some extra stuff added on. win.x = (win.parent.width - win.width) / 2; win.y = (win.parent.height - win.height) / 2; HTH, Ben --- In flexcoders@yahoogroups.com, Bit [EMAIL PROTECTED] wrote: Hi people!! how to do centralize an MDIWindow? thx
[flexcoders] Re: PopUp removal
pass in popup A as a variable instance into popup B and call PopUpManager.removePopUp(parentInstance) - venkat http://www.venkatj.com --- In flexcoders@yahoogroups.com, candysmate [EMAIL PROTECTED] wrote: My popup A opens popup B. Upon item selection within popup B I want to close both popup A and then popup B. I can close popup B with PopUpManager.removePopUp(this), but, before this, how can I remove popup A please?
Re: [flexcoders] AS 3 and Flex naming convention
Muzak wrote: There's a non-official guide here: http://blog.dclick.com.br/2007/02/13/adobe_flex_coding_guidelines_english/ http://blog.dclick.com.br/wp-content/uploads/adobe-flex-coding-guidelines-v12-english.pdf Thank you, it is very interesting and I follow the most part of the rules. I haven't found any suggestion how to name event and event handlers. Looking at UIComponent.as it seems that events doesn't have any special suffix (eg itemSelectedEvt or itemSelectedEvent) instead of function handler that always use the handler suffix (eg updateCompleteHandler(event:FlexEvent):void). I don't like very much to use a suffix for event handlers because at some point they create a semantic friction, but if I have to do I would probably prefer to use the prefix on (onCreationCompletePod) as in the dashboard application: http://examples.adobe.com/flex3/labs/dashboard/srcview/index.html -- FABIO SERRA - faser(at)faser.net PGP available -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Repeater and click
--- In flexcoders@yahoogroups.com, Giro [EMAIL PROTECTED] wrote: Hi, I have this code mx:Repeater id=newRepeater dataProvider={newsRequest.lastResult.news.noti} count=2 mx:Label y={20+(newRepeater.currentIndex*35)} text={newRepeater.currentItem.data} color=0xcc/ mx:Label y={32+(newRepeater.currentIndex*35)} text={newRepeater.currentItem.titol} color=0xff width=200 useHandCursor=true click=openSite(newRepeater.currentItem.url) buttonMode=true mouseChildren=false/ mx:Label text={newRepeater.currentItem.url} / /mx:Repeater All work okay, but when i press Label, error say: Error: Repeater is not executing. at mx.core::Repeater/get currentItem() at vidi_new/___Label3_click() How i can pass repeater data to a function? Thk. Giro. this is your code click=openSite(newRepeater.currentItem.url) use this code click=openSite(event.currentTarget.getRepeateItem().url)
Re: [flexcoders] Repeater and click
this is your code click=openSite(newRepeater.currentItem.url) use this click=openSite(event.currentTarget.getRepeaterItem().url) On Dec 20, 2007 11:57 AM, Giro [EMAIL PROTECTED] wrote: Hi, I have this code mx:Repeater id=newRepeater dataProvider={ newsRequest.lastResult.news.noti} count=2 mx:Label y={20+(newRepeater.currentIndex*35)} text={ newRepeater.currentItem.data} color=0xcc/ mx:Label y={32+(newRepeater.currentIndex*35)} text={ newRepeater.currentItem.titol} color=0xff width=200 useHandCursor=true click=openSite(newRepeater.currentItem.url) buttonMode=true mouseChildren=false/ mx:Label text={newRepeater.currentItem.url} / /mx:Repeater All work okay, but when i press Label, error say: Error: Repeater is not executing. at mx.core::Repeater/get currentItem() at vidi_new/___Label3_click() How i can pass repeater data to a function? Thk. Giro.
[flexcoders] Connecting Flex with SQL Server
hi I am new in Flex Development ?Can anybody tell me procedure to connect to SQL Server Systemetically. I need your help ? Regards Rajesh
[flexcoders] Drag and scroll problem in tileList
Hi list, I have a very annoying problem. I got a tileList with an itemRenderer. The itemRenderer contains a draggable zone. Because it's a manual drag'n'drop, I set the dragEnabled value to false, because I don't want the user to be able to drag the entire item. I also add allowDragSelection parameter to false, because I don't want the list to scroll while dragging. The problem is that the list is still scrolling. And I don't find any way to prevent that. The only solution I found is to set the dragEnabled value to true, and prevent drop operations... I think that the answer to my problem just need to answer one question : how is it possible to stop a list from scrolling ?
[flexcoders] Re: FlexMDI How to get DRAG_END event to fire
Well, I just tried that and the event still doesn't fire. Here is my complete application... ?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 flexmdi.events.MDIManagerEvent; import flexmdi.managers.MDIManager; import flexmdi.containers.MDIWindow; private function init():void { var win1:MDIWindow = new MDIWindow(); win1.width = win1.height = 300; win1.title = Window One; MDIManager.global.add(win1); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_DRAG_END, windowEventHandler); } private function windowEventHandler(event:Event):void { if(event is MDIManagerEvent) { trace(event.type); } } ]] /mx:Script mx:Button label=Get Ver click=trace('The button was clicked');/ /mx:Application I added the button control as a sanity check. When I ran it, I clicked the button, moved the window, clicked the button, moved the window,... You get the idea. The output of the trace was... The button was clicked The button was clicked The button was clicked The button was clicked The button was clicked I don't really see what I can be doing wrong. BTW. I am using Flex 3 beta 2 but just noticed beta 3 is out which I am downloading now. Could that have anything to do with it? Thanks for any and all help with this. --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: Hi Steve, I think something else must be interfering with your code. If you paste the following code (pretty identical to yours) into a Script block in a new Flex project you should see windowDragEnd traced out to the console. (init() is called in creationComplete) import flexmdi.events.MDIManagerEvent; import flexmdi.managers.MDIManager; import flexmdi.containers.MDIWindow; private function init():void { var win1:MDIWindow = new MDIWindow(); win1.width = win1.height = 300; win1.title = Window One; MDIManager.global.add(win1); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_DRAG_END, windowEventHandler); } private function windowEventHandler(event:Event):void { if(event is MDIManagerEvent) { trace(event.type); } } HTH, Ben --- In flexcoders@yahoogroups.com, valdhor stevedepp@ wrote: I am using FlexMDI and would like to know when a window has been dragged to a new position so I can save the position. I am adding windows on the fly with... var newWindow:MDIWindow = new MDIWindow(); MDIManager.global.add(newWindow); I have tried... newWindow.addEventListener(MDIWindowEvent.DRAG_END, this.windowDragEndEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_DRAG_END, this.windowDragEndEventHandler); but these do not fire. Anybody have any ideas? If this is not the right forum for these questions, please let me know where to post this. I have checked and cannot find a forum directly related to FlexMDI.
[flexcoders] Re: Center an MDIWindow of FlexMDI
Oh.. thx!! Bit --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: Do you just mean center it in relation to its parent container? If so, you treat it just like any other component as its really just a subclassed Panel with some extra stuff added on. win.x = (win.parent.width - win.width) / 2; win.y = (win.parent.height - win.height) / 2; HTH, Ben --- In flexcoders@yahoogroups.com, Bit sandro_marques@ wrote: Hi people!! how to do centralize an MDIWindow? thx
[flexcoders] Re: Drag and scroll problem in tileList
the scrolling of the list is taken care by the dragScroll() method. it might be possible that this method is being called somehow. you may overwrite it and do nothing in there. that will prevent the scrolling in your case. - venkat http://www.venkatj.com --- In flexcoders@yahoogroups.com, stfblog [EMAIL PROTECTED] wrote: Hi list, I have a very annoying problem. I got a tileList with an itemRenderer. The itemRenderer contains a draggable zone. Because it's a manual drag'n'drop, I set the dragEnabled value to false, because I don't want the user to be able to drag the entire item. I also add allowDragSelection parameter to false, because I don't want the list to scroll while dragging. The problem is that the list is still scrolling. And I don't find any way to prevent that. The only solution I found is to set the dragEnabled value to true, and prevent drop operations... I think that the answer to my problem just need to answer one question : how is it possible to stop a list from scrolling ?
[flexcoders] is there a better way to create an email link?
I found this example that was posted about a year ago on Bruce Phillips' Blog and it works but it also pops up a new browser window along with the email app. Is that supposed to happen or maybe there's a different way to do what I need? What have others done in the past? Thanks, Mark public function goToEmail(event:Event):void { navigateToURL(new URLRequest(mailto:; + event.target.data)); } mx:Repeater id=rp dataProvider={radarArr.getItemAt(0).links.link} mx:LinkButton label=[EMAIL PROTECTED] data=[EMAIL PROTECTED] click=gotoLink(event); / /mx:Repeater
[flexcoders] Re: FlexMDI How to get DRAG_END event to fire
Hmmm, thats pretty odd. I don't have Beta 2 available to test with but that shouldn't be causing any issues because the code was written against Flex 2. Are you able to capture other events from MDIManager? What about events directly from the window? Ben
Re: [flexcoders] Connecting Flex with SQL Server
You need to use a backend (server) language for that, like php, java, .net, etc. and then connect flex to it. On 12/20/07, raj_rkgit [EMAIL PROTECTED] wrote: hi I am new in Flex Development ?Can anybody tell me procedure to connect to SQL Server Systemetically. I need your help ? Regards Rajesh -- Jhonny Everson
[flexcoders] Re: FlexBuilder 3 Beta 2 charting and license
Hi there We purchased FlexBuilder 2 with Charting used the serial number for FlexBuilder 3. This removed the watermark. Now we are running a later build version of FlexBuilder 3 and the watermark has re-appeared. Is there anything we can do to get rid of this? Cheers Tracy B --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: I've applied my Flex 2.0 charting license key to Flex 3.0 beta2 and still see the watermark on the AdvancedDataGrid. Is this expected behavior?
[flexcoders] Re: Any way to cast a string reference of a class name to its Class equivallent
Thanks! --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: There is a getDefinitionByName() function (not method) in the flash.utils package which will give you a Class reference if you give it a fully qualified class name like mx.controls.Button. However, if the class doesn't actually exist in your application or in the Player, it will return null. So you must ensure that classes you want to look up by name actually get linked in. A common way to do that is to declare a static var of that type, even if you don't use this var. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of polestar11 Sent: Wednesday, December 19, 2007 4:05 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Any way to cast a string reference of a class name to its Class equivallent Hi there I have a list of class names stored as strings in an xml file. Is there any way to cast them to actual class items programatically once the file has loaded. Eg. item classname=aClass/ // in code myComponent.setStyle(icon, Class([EMAIL PROTECTED])); Cheers Tracy
[flexcoders] Re: PopUp removal
--- In flexcoders@yahoogroups.com, rueter007 [EMAIL PROTECTED] wrote: pass in popup A as a variable instance into popup B and call PopUpManager.removePopUp(parentInstance) - venkat Much appreciated Venkat - many thanks!
[flexcoders] Re: I could use some help with printing problems that I don't understand
Thanks, I actually was able to fix that first problem (solution is below, please let me know if there's a better way) but now I have another slight problem when printing the DataGrid. IF I keep variableRowHeight set to true, it really doesn't do a good job. It seems to cut off some of the rows that may have a little more text than the rest. If I set it to false, it prints okay but all are the largest size. Any ideas how to fix this? DETAILS FIX ON THE HIDDEN PRINT PAGE: public function resizeTextBoxes(e:Event):void { e.target.height = e.target.height + 10; } mx:Text id=descText text={_ADL.getItemAt (0).deploymentDescription} width=80% selectable=false styleName=detailPrintStyle creationComplete=resizeTextBoxes (event)/ === DATAGRID PRINT: ?xml version=1.0? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:MyComp=print.* backgroundColor=#FF paddingTop=20 paddingBottom=20 paddingLeft=20 mx:Script ![CDATA[ include ../com/decodeAreaCode.as; import mx.core.* [Embed(source=../images/banner.swf,symbol=banner)] [Bindable] public var Banner:Class; // Declare and initialize the variables used in the component. // The application sets the actual prodTotal value. [Bindable] public var pageNumber:Number = 1; [Bindable] public var prodTotal:Number = 0; // Control the page contents by selectively hiding the header and // footer based on the page type. public function showPage(pageType:String):void { if(pageType == first || pageType == middle) { // Hide the footer. //footer.includeInLayout=false; //footer.visible = false; } if(pageType == middle || pageType == last) { // The header won't be used again; hide it. header.includeInLayout=false; header.visible = false; } if(pageType == last) { // Show the footer. //footer.includeInLayout=true; //footer.visible = true; } //Update the DataGrid layout to reflect the results. validateNow(); } public function myDateFormat(item:Object, column:DataGridColumn):String { var newItem:String; var thisDate:String; var result:Array; if (column.headerText == Release to Area Date){ newItem = item.globalReleaseDate; } else { newItem = item.globalDeadline; } return myDateSm.format(newItem) } // ]] /mx:Script !-- date formatter -- mx:DateFormatter id=myDate formatString=D, / mx:DateFormatter id=myDateSm formatString=DD MMM / ! !-- The template for the printed page, with the contents for all pages. -- mx:VBox width=80% horizontalAlign=left mx:Label text=Page {pageNumber}/ /mx:VBox !-- MyComp:FormPrintHeader id=header width=100%/ -- mx:Image source={Banner} id=header width=90%/ !-- The sizeToPage property is true by default, so the last page has only as many grid rows as are needed for the data. - - mx:PrintDataGrid id=myDataGrid width=100% height=100% variableRowHeight=true fontSize=9 !-- Specify the columns to ensure that their order is correct. - - mx:columns mx:DataGridColumn headerText=Deployment dataField=title wordWrap=true / mx:DataGridColumn headerText=Portfolio Name dataField=portfolioName wordWrap=true/ mx:DataGridColumn headerText=Origin dataField=origin/ mx:DataGridColumn headerText=Target(s) dataField=targetAll wordWrap=true width=100 / mx:DataGridColumn headerText=Release to Area Date headerWordWrap=true dataField=globalReleaseDate labelFunction=myDateFormat / mx:DataGridColumn headerText=Deadline dataField=globalDeadline labelFunction=myDateFormat minWidth=100 / /mx:columns /mx:PrintDataGrid !-- Create a FormPrintFooter control and set its prodTotal variable. -- !--MyComp:FormPrintFooter id=footer pTotal={prodTotal}/-- /mx:VBox
RE: [flexcoders] How to get data from my view
If you want, you can create multi modellocators for your application. This is what I do, I have GlobalModal, ConsumerModel, FileMgmtModel, etc... Dimitrios Gianninas RIA Developer and Team Lead Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of CĆ©sar P. Sent: Wednesday, December 19, 2007 5:23 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] How to get data from my view Hi, I have a flex application that has a global toolbar in the top and various tabs in the bottom, like firefox or any tabbed app. In each tab I have different forms with different information. For each form I have a model that stores the information. In the toolbar I have buttons for save, new, delete. The question is how do I get the model that I have to save or delete, when every model is in a different tab, without putting a model for each form inside my ModelLocator as I don't want to have 10-15 models inside my ModelLocator. This is my first Flex application so I'm new to the technology, I have more experience in Java. Thanks -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message Ć©lectronique et ses piĆØces jointes peuvent contenir des renseignements confidentiels, exclusifs ou lĆ©galement privilĆ©giĆ©s destinĆ©s au seul usage du destinataire visĆ©. L'expĆ©diteur original ne renonce Ć aucun privilĆØge ou Ć aucun autre droit si le prĆ©sent message a Ć©tĆ© transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'ĆŖtes pas le destinataire visĆ© du prĆ©sent message ou si vous l'avez reƧu par erreur, veuillez cesser immĆ©diatement de le lire et le supprimer, ainsi que toutes ses piĆØces jointes, de votre systĆØme. La lecture, la distribution, la copie ou tout autre usage du prĆ©sent message ou de ses piĆØces jointes par des personnes autres que le destinataire visĆ© ne sont pas autorisĆ©s et pourraient ĆŖtre illĆ©gaux. Si vous avez reƧu ce courrier Ć©lectronique par erreur, veuillez en aviser l'expĆ©diteur.
[flexcoders] Re: Drag and scroll problem in tileList
Thank you so much ! It works perfectly now ;-) I didn't see that. Sometimes when you search for days and days everywhere, you just miss the most logical things to do before going further...
Re: [flexcoders] Re: const?
- Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 1:41 PM Subject: [flexcoders] Re: const? Thanks for the advice, Maybe you could read the question, I am talking about Adobe declaring a const inside a function and asking what is the use and benefit of that. What is so different about using const inside a function? Seems to me they are just saying this value will not change after declaration. They are simply saying this is not a variable, it will not be altered. This technique is often used for some special marker or value. I really don't see the relevance of whether it's inside an adobe function or class, or anyone else's function or class. No part of my question is covered by that help topic. I think it's all covered by that topic. What else is it that you are asking? Paul --- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: Maybe you could help yourself? From the Flex 2 manual pages: http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwh elp.htm? context=LiveDocs_Book_Partsfile=03_Language_and_Syntax_160_13.html Constants ActionScript 3.0 supports the const statement, which you can use to create constants. Constants are properties with a fixed value that cannot be altered. You can assign a value to a constant only once, and the assignment must occur in close proximity to the declaration of the constant. For example, if a constant is declared as a member of a class, you can assign a value to that constant only as part of the declaration or inside the class constructor. Paul - Original Message - From: johantrax [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 12:14 PM Subject: [flexcoders] Re: const? Then it's out of my league, perhaps someone from Adobe could help us out? (subtile hint ;) --- In flexcoders@yahoogroups.com, reflexactions reflexactions@ wrote: Actually I wouldnt mind betting that code of yours would run without any error at all, native types are passed by value not reference. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Re: const?
const are usually declared const becuase they are public or protected and accesible by other user or subclass and you wish to protect them with they const keyword so they cant be changed. Inside a function that is a few lines of code written by yourself you dont normally have a problem in having to protect yourself from assigning a value to a variable again unless you have a split personality. Maybe you code like that all the time but I cant say I have seen that before... If you dont understand the diference between class members and function vars well... not much I can say.. --- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: - Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 1:41 PM Subject: [flexcoders] Re: const? Thanks for the advice, Maybe you could read the question, I am talking about Adobe declaring a const inside a function and asking what is the use and benefit of that. What is so different about using const inside a function? Seems to me they are just saying this value will not change after declaration. They are simply saying this is not a variable, it will not be altered. This technique is often used for some special marker or value. I really don't see the relevance of whether it's inside an adobe function or class, or anyone else's function or class. No part of my question is covered by that help topic. I think it's all covered by that topic. What else is it that you are asking? Paul --- In flexcoders@yahoogroups.com, Paul Andrews paul@ wrote: Maybe you could help yourself? From the Flex 2 manual pages: http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwh elp.htm? context=LiveDocs_Book_Partsfile=03_Language_and_Syntax_160_13.html Constants ActionScript 3.0 supports the const statement, which you can use to create constants. Constants are properties with a fixed value that cannot be altered. You can assign a value to a constant only once, and the assignment must occur in close proximity to the declaration of the constant. For example, if a constant is declared as a member of a class, you can assign a value to that constant only as part of the declaration or inside the class constructor. Paul - Original Message - From: johantrax johan.temmerman@ To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 12:14 PM Subject: [flexcoders] Re: const? Then it's out of my league, perhaps someone from Adobe could help us out? (subtile hint ;) --- In flexcoders@yahoogroups.com, reflexactions reflexactions@ wrote: Actually I wouldnt mind betting that code of yours would run without any error at all, native types are passed by value not reference. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com Yahoo! Groups Links
[flexcoders] Re: const?
unless you have a split personality. Well... it might be you just provided the answer there. When working on a project having the size of Flex, you work in a team. Most probably a short function is indeed written by one person. But what guarantees that nobody else will one day pass by and alter your functions? In the case of shared work, defining that variable as a const is a much quicker way of telling others that it's a marker/whatever, than having to put comment out there, saying: //next is a variable //I pray to you and the lord to not change it // because it just holds some value I need to remember var pleaseDoNotChangeMe:Number = 3.1415...; // End of Prayer ;) --Johan
[flexcoders] Flex 3 Beta 3 no syntax coloring or indenting
Well, I just uninstalled beta 2 and installed beta 3. Now, there is no syntax coloring or indenting. Has anybody else experienced this? Is there a simple way to turn it back on just as it was?
Re: [flexcoders] Flex 3 Beta 3 no syntax coloring or indenting
mine did that too, i was using the plugin and had a different xml editor that was opening when i opened mxml files- On Dec 20, 2007 10:00 AM, valdhor [EMAIL PROTECTED] wrote: Well, I just uninstalled beta 2 and installed beta 3. Now, there is no syntax coloring or indenting. Has anybody else experienced this? Is there a simple way to turn it back on just as it was?
Re: [flexcoders] AS 3 and Flex naming convention
The most important thing about naming conventions is actually having one ;-) Which one is not that important (IMO) as long as it's clear and consistent and you (and your team) stick by it. I use the Handler suffix for event handlers, often in combination with the instance id/name that invokes it. listItemClickHandler, submitClickHandler, videoCompleteHandler, etc.. Where the first part would be the id of a control. I think Adobe (FLex 2 framework) sometimes uses an underscore between the instance id and the suffix videoID_completeHandler listID_itemClickHandler buttonID_clickHander etc.. regards, Muzak - Original Message - From: Fabio Serra [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 11:36 AM Subject: Re: [flexcoders] AS 3 and Flex naming convention Muzak wrote: There's a non-official guide here: http://blog.dclick.com.br/2007/02/13/adobe_flex_coding_guidelines_english/ http://blog.dclick.com.br/wp-content/uploads/adobe-flex-coding-guidelines-v12-english.pdf Thank you, it is very interesting and I follow the most part of the rules. I haven't found any suggestion how to name event and event handlers. Looking at UIComponent.as it seems that events doesn't have any special suffix (eg itemSelectedEvt or itemSelectedEvent) instead of function handler that always use the handler suffix (eg updateCompleteHandler(event:FlexEvent):void). I don't like very much to use a suffix for event handlers because at some point they create a semantic friction, but if I have to do I would probably prefer to use the prefix on (onCreationCompletePod) as in the dashboard application: http://examples.adobe.com/flex3/labs/dashboard/srcview/index.html -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: FlexBuilder 3 Beta 2 charting and license
As previously stated in this discussion: It is expected behaviour, since beta3 is already configured for use with FB3 licenses, not the ones from FB2. Matt stated in another thread here that if you really are in a position where you absolutely need the watermark to be removed during this beta-period, you can mail him with a request off-list. Link to post: http://tech.groups.yahoo.com/group/flexcoders/message/96530 --Johan --- In flexcoders@yahoogroups.com, polestar11 [EMAIL PROTECTED] wrote: Hi there We purchased FlexBuilder 2 with Charting used the serial number for FlexBuilder 3. This removed the watermark. Now we are running a later build version of FlexBuilder 3 and the watermark has re-appeared. Is there anything we can do to get rid of this? Cheers Tracy B
Re: [flexcoders] Re: const?
- Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 2:51 PM Subject: [flexcoders] Re: const? const are usually declared const becuase they are public or protected and accesible by other user or subclass and you wish to protect them with they const keyword so they cant be changed. const isn't there for the explicit protection of class members, though const is often used to allow public access to class constants and it's used because they are constants not variables. const wasn't created for this specific scenario. Inside a function that is a few lines of code written by yourself you dont normally have a problem in having to protect yourself from assigning a value to a variable again unless you have a split personality. That's me then. I consider it good practice and many others do so as well. If it's a constant unchanging value I'll declare it as a const and in capitals only. The length of the function is immaterial - you are signalling the intended use to the developer and the compiler. Maybe you code like that all the time but I cant say I have seen that before... Where have you been? If you dont understand the diference between class members and function vars well... not much I can say.. Well, you've interpreted my const comments as a lack of knowledge about classes. It doesn't say anything about me, because it's completely the wrong assumption. Paul --- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: - Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 1:41 PM Subject: [flexcoders] Re: const? Thanks for the advice, Maybe you could read the question, I am talking about Adobe declaring a const inside a function and asking what is the use and benefit of that. What is so different about using const inside a function? Seems to me they are just saying this value will not change after declaration. They are simply saying this is not a variable, it will not be altered. This technique is often used for some special marker or value. I really don't see the relevance of whether it's inside an adobe function or class, or anyone else's function or class. No part of my question is covered by that help topic. I think it's all covered by that topic. What else is it that you are asking? Paul --- In flexcoders@yahoogroups.com, Paul Andrews paul@ wrote: Maybe you could help yourself? From the Flex 2 manual pages: http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwh elp.htm? context=LiveDocs_Book_Partsfile=03_Language_and_Syntax_160_13.html Constants ActionScript 3.0 supports the const statement, which you can use to create constants. Constants are properties with a fixed value that cannot be altered. You can assign a value to a constant only once, and the assignment must occur in close proximity to the declaration of the constant. For example, if a constant is declared as a member of a class, you can assign a value to that constant only as part of the declaration or inside the class constructor. Paul - Original Message - From: johantrax johan.temmerman@ To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 12:14 PM Subject: [flexcoders] Re: const? Then it's out of my league, perhaps someone from Adobe could help us out? (subtile hint ;) --- In flexcoders@yahoogroups.com, reflexactions reflexactions@ wrote: Actually I wouldnt mind betting that code of yours would run without any error at all, native types are passed by value not reference. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Re: const?
I work in a team and have so done for the last 20+ years and never yet declared a variable with function level scope as const just to prevent some other person coming along later and changing the code value of the variable if they think it is needed. ...and if thats was the case why dont we see widespread use of this style within Adobe code... If I need something like pi as a const I would declare a class member const for pi, not a function scoped const var. But seems you guys program different from the way we do I guess, --- In flexcoders@yahoogroups.com, johantrax [EMAIL PROTECTED] wrote: unless you have a split personality. Well... it might be you just provided the answer there. When working on a project having the size of Flex, you work in a team. Most probably a short function is indeed written by one person. But what guarantees that nobody else will one day pass by and alter your functions? In the case of shared work, defining that variable as a const is a much quicker way of telling others that it's a marker/whatever, than having to put comment out there, saying: //next is a variable //I pray to you and the lord to not change it // because it just holds some value I need to remember var pleaseDoNotChangeMe:Number = 3.1415...; // End of Prayer ;) --Johan
[flexcoders] Enabling/Disabling Components
What's the easiest way to make components visible/invisible in a VBox/HBox so that they collapse their real estate. When you just set visible=false, the space for the component is still reserved in the associated VBox/HBox. In addition, setting width=0 or height=0 collapses the space for the component but doesn't collapse the gap space between components. Is there an easy way to keep components in a VBox/HBox so they are still available via Actionscript but make them invisible *AND* also collapse their real estate (including gap space)? A common example: I have a form that shows either a combo box *or* a text box depending on selections made by the user. When the form changes from one to the other, I want to keep both controls but make one invisible (and collapse the associated space). I can do this with a Canvas using absolute layout (I just make the controls overlap and then set one visible and the other invisible), but I'm tyring to get it to work in a VBox/HBox form if possible.
RE: [flexcoders] Flex 3 Beta 3 no syntax coloring or indenting
Mine is doing it as well. Clint Tredway Cynergy Systems | Consultant 706 7th St SE, Washington DC, 20003 W. http://www.cynergysystems.com E. [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Anderson Sent: Thursday, December 20, 2007 9:04 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex 3 Beta 3 no syntax coloring or indenting mine did that too, i was using the plugin and had a different xml editor that was opening when i opened mxml files- On Dec 20, 2007 10:00 AM, valdhor [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Well, I just uninstalled beta 2 and installed beta 3. Now, there is no syntax coloring or indenting. Has anybody else experienced this? Is there a simple way to turn it back on just as it was?
[flexcoders] Re: Enabling/Disabling Components
includeInLayout=false visible=false - venkat http://www.venkatj.com --- In flexcoders@yahoogroups.com, byte.sensei [EMAIL PROTECTED] wrote: What's the easiest way to make components visible/invisible in a VBox/HBox so that they collapse their real estate. When you just set visible=false, the space for the component is still reserved in the associated VBox/HBox. In addition, setting width=0 or height=0 collapses the space for the component but doesn't collapse the gap space between components. Is there an easy way to keep components in a VBox/HBox so they are still available via Actionscript but make them invisible *AND* also collapse their real estate (including gap space)? A common example: I have a form that shows either a combo box *or* a text box depending on selections made by the user. When the form changes from one to the other, I want to keep both controls but make one invisible (and collapse the associated space). I can do this with a Canvas using absolute layout (I just make the controls overlap and then set one visible and the other invisible), but I'm tyring to get it to work in a VBox/HBox form if possible.
[flexcoders] Re: Enabling/Disabling Components
Sweet - Thanks! --- In flexcoders@yahoogroups.com, rueter007 [EMAIL PROTECTED] wrote: includeInLayout=false visible=false - venkat http://www.venkatj.com --- In flexcoders@yahoogroups.com, byte.sensei byte.sensei@ wrote: What's the easiest way to make components visible/invisible in a VBox/HBox so that they collapse their real estate. When you just set visible=false, the space for the component is still reserved in the associated VBox/HBox. In addition, setting width=0 or height=0 collapses the space for the component but doesn't collapse the gap space between components. Is there an easy way to keep components in a VBox/HBox so they are still available via Actionscript but make them invisible *AND* also collapse their real estate (including gap space)? A common example: I have a form that shows either a combo box *or* a text box depending on selections made by the user. When the form changes from one to the other, I want to keep both controls but make one invisible (and collapse the associated space). I can do this with a Canvas using absolute layout (I just make the controls overlap and then set one visible and the other invisible), but I'm tyring to get it to work in a VBox/HBox form if possible.
[flexcoders] Re: const?
So your telling me that when you write a function if you have a var that wont change its value for the duration of that function say like: override protected function updateDisplayList(...):void{ var count:int=numChildren; ..loop code.. ...finished } you consider that bad code as count should be declared as a const --- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: - Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 2:51 PM Subject: [flexcoders] Re: const? const are usually declared const becuase they are public or protected and accesible by other user or subclass and you wish to protect them with they const keyword so they cant be changed. const isn't there for the explicit protection of class members, though const is often used to allow public access to class constants and it's used because they are constants not variables. const wasn't created for this specific scenario. Inside a function that is a few lines of code written by yourself you dont normally have a problem in having to protect yourself from assigning a value to a variable again unless you have a split personality. That's me then. I consider it good practice and many others do so as well. If it's a constant unchanging value I'll declare it as a const and in capitals only. The length of the function is immaterial - you are signalling the intended use to the developer and the compiler. Maybe you code like that all the time but I cant say I have seen that before... Where have you been? If you dont understand the diference between class members and function vars well... not much I can say.. Well, you've interpreted my const comments as a lack of knowledge about classes. It doesn't say anything about me, because it's completely the wrong assumption. Paul --- In flexcoders@yahoogroups.com, Paul Andrews paul@ wrote: - Original Message - From: reflexactions reflexactions@ To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 1:41 PM Subject: [flexcoders] Re: const? Thanks for the advice, Maybe you could read the question, I am talking about Adobe declaring a const inside a function and asking what is the use and benefit of that. What is so different about using const inside a function? Seems to me they are just saying this value will not change after declaration. They are simply saying this is not a variable, it will not be altered. This technique is often used for some special marker or value. I really don't see the relevance of whether it's inside an adobe function or class, or anyone else's function or class. No part of my question is covered by that help topic. I think it's all covered by that topic. What else is it that you are asking? Paul --- In flexcoders@yahoogroups.com, Paul Andrews paul@ wrote: Maybe you could help yourself? From the Flex 2 manual pages: http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwh elp.htm? context=LiveDocs_Book_Partsfile=03_Language_and_Syntax_160_13.html Constants ActionScript 3.0 supports the const statement, which you can use to create constants. Constants are properties with a fixed value that cannot be altered. You can assign a value to a constant only once, and the assignment must occur in close proximity to the declaration of the constant. For example, if a constant is declared as a member of a class, you can assign a value to that constant only as part of the declaration or inside the class constructor. Paul - Original Message - From: johantrax johan.temmerman@ To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 12:14 PM Subject: [flexcoders] Re: const? Then it's out of my league, perhaps someone from Adobe could help us out? (subtile hint ;) --- In flexcoders@yahoogroups.com, reflexactions reflexactions@ wrote: Actually I wouldnt mind betting that code of yours would run without any error at all, native types are passed by value not reference. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%
[flexcoders] start position for Flex pages
Hi, I put all my pages under ViewStack,I want to reset the position of all pages to zero through Flex. Is it possible to do this? That means the pages display on the top part when I change to a new page because all the page is very long now. Please help me out. Mark
Re: [flexcoders] Re: const?
- Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 3:21 PM Subject: [flexcoders] Re: const? I work in a team and have so done for the last 20+ years and never yet declared a variable with function level scope as const just to prevent some other person coming along later and changing the code value of the variable if they think it is needed. 20+ years? LOL, I have the drop on you.. It's not just 'for some other person', it would be for the original developer too. ...and if thats was the case why dont we see widespread use of this style within Adobe code... Bad practice? I haven't gone looking through the adobe code to root this out. If I need something like pi as a const I would declare a class member const for pi, not a function scoped const var. Depends if you intend to use the constant outside the function. If it should be accessible outside the function, it should be a class constant, as you say. But seems you guys program different from the way we do I guess, Yes, but why wouldn't you declare a value intended to be used as a constant, as const? Paul --- In flexcoders@yahoogroups.com, johantrax [EMAIL PROTECTED] wrote: unless you have a split personality. Well... it might be you just provided the answer there. When working on a project having the size of Flex, you work in a team. Most probably a short function is indeed written by one person. But what guarantees that nobody else will one day pass by and alter your functions? In the case of shared work, defining that variable as a const is a much quicker way of telling others that it's a marker/whatever, than having to put comment out there, saying: //next is a variable //I pray to you and the lord to not change it // because it just holds some value I need to remember var pleaseDoNotChangeMe:Number = 3.1415...; // End of Prayer ;) --Johan -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Re: FlexMDI How to get DRAG_END event to fire
Well, I have just installed Flex 3 beta 3 and tried it again. This is the code: ?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 flexmdi.events.MDIManagerEvent; import flexmdi.events.MDIWindowEvent; import flexmdi.managers.MDIManager; import flexmdi.containers.MDIWindow; private function init():void { var win1:MDIWindow = new MDIWindow(); win1.width = win1.height = 300; win1.title = Window One; var win2:MDIWindow = new MDIWindow(); win2.width = win2.height = 300; win2.title = Window Two; MDIManager.global.add(win1); MDIManager.global.add(win2); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_ADD, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_MINIMIZE, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_RESTORE, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_MAXIMIZE, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_CLOSE, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_FOCUS_START, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_FOCUS_END, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_DRAG_START, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_DRAG, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_DRAG_END, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_RESIZE_START, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_RESIZE, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_RESIZE_END, windowEventHandler); win1.addEventListener(MDIWindowEvent.RESIZE, windowEventHandler); win1.addEventListener(MDIWindowEvent.FOCUS_START, windowEventHandler); win1.addEventListener(MDIWindowEvent.FOCUS_END, windowEventHandler); win1.addEventListener(MDIWindowEvent.MINIMIZE,windowEventHandler); win1.addEventListener(MDIWindowEvent.RESTORE,windowEventHandler); win1.addEventListener(MDIWindowEvent.MAXIMIZE,windowEventHandler); win1.addEventListener(MDIWindowEvent.CLOSE,windowEventHandler); win1.addEventListener(MDIWindowEvent.RESIZE_END,windowEventHandler); win1.addEventListener(MDIWindowEvent.RESIZE_START,windowEventHandler); } private function windowEventHandler(event:Event):void { if(event is MDIManagerEvent) { trace(MDIManagerEvent: + event.type); } if(event is MDIWindowEvent) { trace(MDIWindowEvent: + event.type); } } ]] /mx:Script mx:Button label=Get Ver click=trace('The button was clicked');/ /mx:Application After licking on each window, moving them around a resizining, minimizing maximizing and closing them, this is what I got... MDIWindowEvent: resizeStart MDIManagerEvent: windowResizeStart MDIWindowEvent: resize MDIManagerEvent: windowResize MDIWindowEvent: resize MDIManagerEvent: windowResize MDIWindowEvent: resize MDIManagerEvent: windowResize MDIWindowEvent: resize MDIManagerEvent: windowResize MDIWindowEvent: resize MDIManagerEvent: windowResize MDIWindowEvent: resize MDIManagerEvent: windowResize MDIWindowEvent: resize MDIManagerEvent: windowResize MDIWindowEvent: resize MDIManagerEvent: windowResize MDIWindowEvent: resize
Re: [flexcoders] Re: const?
- Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 3:35 PM Subject: [flexcoders] Re: const? So your telling me that when you write a function if you have a var that wont change its value for the duration of that function say like: override protected function updateDisplayList(...):void{ var count:int=numChildren; ..loop code.. ...finished } I only use constants when the value at declaration time is fixed. I wouldn't consider your example to be a constant because numChildren can potentially change, whether it does or not. It would be misleading to the developer to try and describe a value as const when it was based upon a changing value - definitely bad practice. you consider that bad code as count should be declared as a const No, though the variable may be pointless if numChildren doesn't change and it may be poorly named if numChildren does. Paul snip
[flexcoders] Re: const?
20+ years? LOL, I have the drop on you.. Depends on how big the + is doesnt it lol... Now if were gonna do a how long is my d*** I did start with RPG on an ICL2903, though my first real commercial code was in APL but we better stop before someone works out the dates and says were too old to code. --- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: - Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 3:21 PM Subject: [flexcoders] Re: const? I work in a team and have so done for the last 20+ years and never yet declared a variable with function level scope as const just to prevent some other person coming along later and changing the code value of the variable if they think it is needed. 20+ years? LOL, I have the drop on you.. It's not just 'for some other person', it would be for the original developer too. ...and if thats was the case why dont we see widespread use of this style within Adobe code... Bad practice? I haven't gone looking through the adobe code to root this out. If I need something like pi as a const I would declare a class member const for pi, not a function scoped const var. Depends if you intend to use the constant outside the function. If it should be accessible outside the function, it should be a class constant, as you say. But seems you guys program different from the way we do I guess, Yes, but why wouldn't you declare a value intended to be used as a constant, as const? Paul --- In flexcoders@yahoogroups.com, johantrax johan.temmerman@ wrote: unless you have a split personality. Well... it might be you just provided the answer there. When working on a project having the size of Flex, you work in a team. Most probably a short function is indeed written by one person. But what guarantees that nobody else will one day pass by and alter your functions? In the case of shared work, defining that variable as a const is a much quicker way of telling others that it's a marker/whatever, than having to put comment out there, saying: //next is a variable //I pray to you and the lord to not change it // because it just holds some value I need to remember var pleaseDoNotChangeMe:Number = 3.1415...; // End of Prayer ;) --Johan -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com Yahoo! Groups Links
[flexcoders] Re: FlexMDI How to get DRAG_END event to fire
Further testing...This time I tried it in IE6 (Have been using Firefox 2.0.0.11). This gives the following (Abbreviated): MDIManagerEvent: windowDragStart MDIManagerEvent: windowDrag MDIManagerEvent: windowDragEnd MDIManagerEvent: windowDragStart MDIManagerEvent: windowDrag MDIManagerEvent: windowDragEnd MDIManagerEvent: windowDragStart MDIManagerEvent: windowDrag MDIManagerEvent: windowDragEnd MDIWindowEvent: maximize MDIManagerEvent: windowMaximize MDIWindowEvent: restore MDIManagerEvent: windowRestore MDIWindowEvent: close MDIManagerEvent: windowClose Note that there are no MDIWindow drag events generated but MDIManager drag events are. Also, there are no focus events. As a newb, I don't really understand why there would be a difference between Firefox and IE. Don't they use the same Flash Player? Anyway, I hope this helps to narrow down where the problem is.
[flexcoders] HTTPService.send() not retreving URL information or maybe not excecuting
Hello, I want to thank Tracy for the help a few days ago on this application. Everything is work great now, execpt I can not call the dbRecords.send () in my function. dbRecords is my HTTPService id. When I goto debug the applicaiton lastResult = null for dbRecords. Does anyone have an idea on what I am missing. All the documentation I read says this should work. But its not excecuting the HTTPService. I hard coded the url to print xml as output. that is all the url prints to the webpage. ?xml version=1.0 encoding=utf-8 MasterFile Records EvnProd/Evn DeplCA/Depl R_id12312/R_id R_nameTest_REcord_Name/R_name /Records /MasterFile ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=dbRecords.send() mx:Script ![CDATA[ private function onComboChangeTableSelect(event:Event):void { var ini:String = new String (event.target.selectedItem); var sURL:String = http://localhost/cgi- bin/dbRecords.cgi?ini= + ini; dbRecords.url = sURL; dbRecords.send(); } ]] /mx:Script mx:XML id=sqlQuerey source=http://localhost/cgi- bin/dbtables.cgi / mx:ComboBox id=ini dataProvider={sqlQuerey.name} rowCount=30 change=onComboChangeTableSelect(event) / mx:HTTPService id=dbRecords resultFormat=text/ /mx:Application
Re: [flexcoders] Re: const?
Ideally a const inside a function allows you to use an identifier for a constant value, which is replaced back to the value by the compiler. So you have the advantage of using an identifier, eg. changes are concentrated in one place, and the advantage of a const, which is the speed. I'm not sure though, if the compiler really replaces the value back. Cheers On Dec 20, 2007 4:55 PM, Paul Andrews [EMAIL PROTECTED] wrote: - Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 3:35 PM Subject: [flexcoders] Re: const? So your telling me that when you write a function if you have a var that wont change its value for the duration of that function say like: override protected function updateDisplayList(...):void{ var count:int=numChildren; ..loop code.. ...finished } I only use constants when the value at declaration time is fixed. I wouldn't consider your example to be a constant because numChildren can potentially change, whether it does or not. It would be misleading to the developer to try and describe a value as const when it was based upon a changing value - definitely bad practice. you consider that bad code as count should be declared as a const No, though the variable may be pointless if numChildren doesn't change and it may be poorly named if numChildren does. Paul snip -- Ralf Bokelberg [EMAIL PROTECTED] Flex Flash Consultant based in Cologne/Germany
[flexcoders] Re: Flex 3 Beta 3 no syntax coloring or indenting
Well, I figured it out. I had to read the release notes which told me I had to: 1. Go to the install directory; drive:\Program Files\Adobe\Flex Builder 3, or the root of the Eclipse install directory if using the Flex Builder Plug in 2. Edit FlexBuilder.ini or Eclipse.ini in a text editor 3. Add the following to the top of the file (not the bottom) -clean 4. Launch Flex Builder or Eclipse 5. Remove Āclean after exiting Flex Builder or Eclipse Of course, the first time I did it, I left FlexBuilder.ini open when I tried and nothing changed. Then I did it again after saving and closing the file and VOILA; Everything was back to normal.
[flexcoders] Re: FlexMDI How to get DRAG_END event to fire
What happens if you use the code found here? http://www.returnundefined.com/flexmdi/explorer/srcview/index.html Ben --- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote: Further testing...This time I tried it in IE6 (Have been using Firefox 2.0.0.11). This gives the following (Abbreviated): MDIManagerEvent: windowDragStart MDIManagerEvent: windowDrag MDIManagerEvent: windowDragEnd MDIManagerEvent: windowDragStart MDIManagerEvent: windowDrag MDIManagerEvent: windowDragEnd MDIManagerEvent: windowDragStart MDIManagerEvent: windowDrag MDIManagerEvent: windowDragEnd MDIWindowEvent: maximize MDIManagerEvent: windowMaximize MDIWindowEvent: restore MDIManagerEvent: windowRestore MDIWindowEvent: close MDIManagerEvent: windowClose Note that there are no MDIWindow drag events generated but MDIManager drag events are. Also, there are no focus events. As a newb, I don't really understand why there would be a difference between Firefox and IE. Don't they use the same Flash Player? Anyway, I hope this helps to narrow down where the problem is.
RE: [flexcoders] Repeater and click
Also, you will find using Repeater much easier if you create a custom component, and repeat that. Pass in a ref to the entire currentItem. Then, in that component, you can code normally. Also, you can dispatch an event, and the handler can access the entire dataProvider Item through the event.target proprety. Below are some snippets: Tracy Goal: Display a list of items using a complex display for each item, and have each of those items behave like a menu element and respond to a click anywhere on the item by running a handler function. One solution is to use a Repeater with a custom component In the main app or component, declare the Repeater, and the click handler function. mx:Application ... mx:Script![CDATA[ import MyRepeaterItem; ... private function onRPItemClick(oEvent:Event):void { var xmlItem:XML = XML(oEvent.target); }//onRPItemClick ]]/mx:Script mx:VBox ... mx:Repeater id=rp dataProvider={_xmlData} ... !-- Note we pass in the entire currentItem, and define a click handler -- MyRepeaterItem xmlItem={rp.currentItem} itemClick=onRPItemClick(event) .../ /mx:Repeater /mx:VBox /mx:Application And in the component, MyRepeaterItem.mxml: ?xml version=1.0 encoding=utf-8? mx:HBox mouseChildren=false buttonMode=true click=onClick(event) !-- The metadata tag below allows us to define an itemClick handler in mxml, as in the code above -- mx:Metadata [Event(name=itemClick, type=flash.events.Event)] /mx:Metadata mx:Script![CDATA[ [Bindable]private var _xmlItem:XML; /** Setter function */ public function set xmlItem(xml:XML):void { _xmlItem = xml; //do any special, non-bound ui stuff you want }//set xmlItem /** Getter function */ public function get xmlItem():XML { return _xmlItem; }//get xmlItem /** Outer VBox Click handler function */ private function onClick():void { dispatchEvent(new Event(itemClick,false); //we do not need/want this event to bubble }//onClick ]]/mx:Script !-- Now declare the Item UI -- mx:Text id=lbDescription text=[EMAIL PROTECTED] width=100% height=100% / /mx:HBox From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ali Erken Sent: Thursday, December 20, 2007 6:21 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Repeater and click this is your code click=openSite(newRepeater.currentItem.url) use this click=openSite(event.currentTarget.getRepeaterItem ().url) On Dec 20, 2007 11:57 AM, Giro [EMAIL PROTECTED] wrote: Hi, Ā I have this code Ā mx:Repeater id=newRepeater dataProvider={newsRequest.lastResult.news.noti} count=2 mx:Label y={20+(newRepeater.currentIndex*35)} text={newRepeater.currentItem.data} color=0xcc/ Ā Ā Ā mx:Label y={32+(newRepeater.currentIndex*35)} text={newRepeater.currentItem.titol} color=0xff width=200 useHandCursor=true click=openSite(newRepeater.currentItem.url) buttonMode=true mouseChildren=false/ Ā Ā Ā mx:Label text={newRepeater.currentItem.url} / /mx:Repeater Ā All work okay, but when i press Label, error say: Ā Error: Repeater is not executing. Ā Ā Ā at mx.core::Repeater/get currentItem() Ā Ā Ā at vidi_new/___Label3_click() Ā Ā How i can pass repeater data to a function? Ā Ā Thk. Ā Giro.
[flexcoders] Re: Flex 3 Beta 3 no syntax coloring or indenting
This is an issue related to some caching that Eclipse does -- when you install one beta and run it for a while, and then install a later beta, Eclipse still has out-of-date cache information. This has been fixed for release, but for beta 3, the workaround is to exit Flex Builder, and then launch it once with the -clean command-line option. If you aren't sure how to do that, I think there are instructions in the readme. - Mike Morearty, Adobe Flex Builder team --- In flexcoders@yahoogroups.com, Clint Tredway [EMAIL PROTECTED] wrote: Mine is doing it as well. Clint Tredway Cynergy Systems | Consultant 706 7th St SE, Washington DC, 20003 W. http://www.cynergysystems.com E. [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Anderson Sent: Thursday, December 20, 2007 9:04 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex 3 Beta 3 no syntax coloring or indenting mine did that too, i was using the plugin and had a different xml editor that was opening when i opened mxml files- On Dec 20, 2007 10:00 AM, valdhor [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Well, I just uninstalled beta 2 and installed beta 3. Now, there is no syntax coloring or indenting. Has anybody else experienced this? Is there a simple way to turn it back on just as it was?
RE: [flexcoders] Connecting Flex with SQL Server
Theoretically SQL Server can respond directly to http requests. I haven't done it, but recall some posts on the subject. Check the archives, or google. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jhonny Everson Sent: Thursday, December 20, 2007 9:17 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Connecting Flex with SQL Server You need to use a backend (server) language for that, like php, java, .net, etc. and then connect flex to it. On 12/20/07, raj_rkgit [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: hi I am new in Flex Development ?Can anybody tell me procedure to connect to SQL Server Systemetically. I need your help ? Regards Rajesh -- Jhonny Everson
[flexcoders] Re: FlexMDI How to get DRAG_END event to fire
Just noticed that your code doesn't define any drag listeners on the window, so thats why you're not seeing those. I would also check to see what version of the player you have in each browser. Ben
RE: [flexcoders] Flex 3 Beta 3 no syntax coloring or indenting
Have you exited and restarted? I had an issue with the undo history not working, but restarting corrected it. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Clint Tredway Sent: Thursday, December 20, 2007 10:28 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex 3 Beta 3 no syntax coloring or indenting Mine is doing it as well. Clint Tredway Cynergy Systems | Consultant 706 7th St SE, Washington DC, 20003 W. http://www.cynergysystems.com http://www.cynergysystems.com E. [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Anderson Sent: Thursday, December 20, 2007 9:04 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex 3 Beta 3 no syntax coloring or indenting mine did that too, i was using the plugin and had a different xml editor that was opening when i opened mxml files- On Dec 20, 2007 10:00 AM, valdhor [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Well, I just uninstalled beta 2 and installed beta 3. Now, there is no syntax coloring or indenting. Has anybody else experienced this? Is there a simple way to turn it back on just as it was?
[flexcoders] data binding question
Hi I do not know why the data binding doesn't work.Please help me out. mx:Script ![CDATA[ private function getTotal():Number{ var cost1:Number= Number(cost1.text) var cost2:Number= Number(cost2.text) var cost : Number = cost1+cost2; return cost; } ]] /mx:Script mx:TextInput id=cost1 / mx:TextInput id=cost2 / mx:TextInput id=course_total text={getTotal()}/ Thanks Mark
RE: [flexcoders] HTTPService.send() not retreving URL information or maybe not excecuting
Do not bind to lastResult. It is too hard to debug. You don't even know if your call is executing, returning or erroring. Use a result handler. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of brian_garcia81 Sent: Thursday, December 20, 2007 11:18 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] HTTPService.send() not retreving URL information or maybe not excecuting Hello, I want to thank Tracy for the help a few days ago on this application. Everything is work great now, execpt I can not call the dbRecords.send () in my function. dbRecords is my HTTPService id. When I goto debug the applicaiton lastResult = null for dbRecords. Does anyone have an idea on what I am missing. All the documentation I read says this should work. But its not excecuting the HTTPService. I hard coded the url to print xml as output. that is all the url prints to the webpage. ?xml version=1.0 encoding=utf-8 MasterFile Records EvnProd/Evn DeplCA/Depl R_id12312/R_id R_nameTest_REcord_Name/R_name /Records /MasterFile ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=vertical creationComplete=dbRecords.send() mx:Script ![CDATA[ private function onComboChangeTableSelect(event:Event):void { var ini:String = new String (event.target.selectedItem); var sURL:String = http://localhost/cgi- http://localhost/cgi- bin/dbRecords.cgi?ini= + ini; dbRecords.url = sURL; dbRecords.send(); } ]] /mx:Script mx:XML id=sqlQuerey source=http://localhost/cgi- http://localhost/cgi- bin/dbtables.cgi / mx:ComboBox id=ini dataProvider={sqlQuerey.name} rowCount=30 change=onComboChangeTableSelect(event) / mx:HTTPService id=dbRecords resultFormat=text/ /mx:Application
RE: [flexcoders] data binding question
I think that since there is no argument to the function, binding does not know when to execute. Try: text={getTotal(cost1.text,cost2.text)} private function getTotal(cost1:String,cost2:string):Number{ return (number(cost1) + Number(cost2)); Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markflex2007 Sent: Thursday, December 20, 2007 11:41 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] data binding question Hi I do not know why the data binding doesn't work.Please help me out. mx:Script ![CDATA[ private function getTotal():Number{ var cost1:Number= Number(cost1.text) var cost2:Number= Number(cost2.text) var cost : Number = cost1+cost2; return cost; } ]] /mx:Script mx:TextInput id=cost1 / mx:TextInput id=cost2 / mx:TextInput id=course_total text={getTotal()}/ Thanks Mark
[flexcoders] Problems displaying images stored in SQL Server as Datatype ĀimageĀ
I am trying to display an Image stored in SQL Server as datatype 'image' and it only shows a portion of the image. It seems to be tied to the size (kb) of the image since the larger the image the less of it is shown before it cuts off(sometimes it cuts off mid line so it's about the file size and not fitting the image on the screen). Here is the code I am using that deals with the image. [Bindable] public var theImage:ByteArray = new ByteArray; private function getScans_result(event:ResultEvent):void{ var imageByteArray:ByteArray = event.result[0].Image; theImage = imageByteArray } mx:Image id=theIMG width=160 height=220 source={theImage}/ Any Thoughts??
[flexcoders] Re: FlexMDI How to get DRAG_END event to fire
OK, my bad on the window drag listeners. I just added them all in and tried on IE6. This gives me both MDIWindow Drag Events and MDIManager Drag Events. I then tried again on Firefox and everything worked. Huh?? Let me do some more testing. --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: Just noticed that your code doesn't define any drag listeners on the window, so thats why you're not seeing those. I would also check to see what version of the player you have in each browser. Ben
RE: [flexcoders] Connecting Flex with SQL Server
Using direct HTTP calls to MSSQL requires embedding sql server username/password into the swf which is not a good idea. Sam --- We're Hiring! Seeking a passionate developer to join our team building Flex based products. Position is in the Washington D.C. metro area. If interested contact [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Thursday, December 20, 2007 11:35 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Connecting Flex with SQL Server Theoretically SQL Server can respond directly to http requests. I haven't done it, but recall some posts on the subject. Check the archives, or google. Tracy On 12/20/07, raj_rkgit [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: hi I am new in Flex Development ?Can anybody tell me procedure to connect to SQL Server Systemetically. I need your help ? Regards Rajesh
[flexcoders] Re: FlexMDI How to get DRAG_END event to fire
If I use that code then I get the drag events but that uses mdiCanvas.windowManager. I don't want to use a canvas; I would much rather use the global functions. My application has a docked ApplicationControlBar and I want my flexMDI windows to be able to float on top of this bar. The only way I see to do that is with the global manager. --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: What happens if you use the code found here? http://www.returnundefined.com/flexmdi/explorer/srcview/index.html Ben
[flexcoders] How to compare with NaN?
Hi, I have the simple code here var Total_cost : Number = Number(cost1) + Number(cost2); if (Total_cost == NaN) { Total_cost = -1; } I get a error.Please help me out.Thanks Mark
Re: [flexcoders] Connecting Flex with SQL Server
As the other responders have mentioned, it depends on your need for security. You can set up an HTTP endpoint in SQL Server 2005 to respond directly to requests, but there is that issue of sending passwords directly to the database. Most people use a back-end application server to be the interface to the database. -Mike Chabot On Dec 20, 2007 11:59 AM, Samuel R. Neff [EMAIL PROTECTED] wrote: Using direct HTTP calls to MSSQL requires embedding sql server username/password into the swf which is not a good idea. Sam --- We're Hiring! Seeking a passionate developer to join our team building Flex based products. Position is in the Washington D.C. metro area. If interested contact [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Thursday, December 20, 2007 11:35 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Connecting Flex with SQL Server Theoretically SQL Server can respond directly to http requests. I haven't done it, but recall some posts on the subject. Check the archives, or google. Tracy On 12/20/07, raj_rkgit [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: hi I am new in Flex Development ?Can anybody tell me procedure to connect to SQL Server Systemetically. I need your help ? Regards Rajesh
RE: [flexcoders] Re: I could use some help with printing problems that I don't understand
If you make a simple test case that doesn't require server data (has the data in the MXML) please file a bug. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mark Sent: Thursday, December 20, 2007 6:30 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: I could use some help with printing problems that I don't understand Thanks, I actually was able to fix that first problem (solution is below, please let me know if there's a better way) but now I have another slight problem when printing the DataGrid. IF I keep variableRowHeight set to true, it really doesn't do a good job. It seems to cut off some of the rows that may have a little more text than the rest. If I set it to false, it prints okay but all are the largest size. Any ideas how to fix this? DETAILS FIX ON THE HIDDEN PRINT PAGE: public function resizeTextBoxes(e:Event):void { e.target.height = e.target.height + 10; } mx:Text id=descText text={_ADL.getItemAt (0).deploymentDescription} width=80% selectable=false styleName=detailPrintStyle creationComplete=resizeTextBoxes (event)/ === DATAGRID PRINT: ?xml version=1.0? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml xmlns:MyComp=print.* backgroundColor=#FF paddingTop=20 paddingBottom=20 paddingLeft=20 mx:Script ![CDATA[ include ../com/decodeAreaCode.as; import mx.core.* [Embed(source=../images/banner.swf,symbol=banner)] [Bindable] public var Banner:Class; // Declare and initialize the variables used in the component. // The application sets the actual prodTotal value. [Bindable] public var pageNumber:Number = 1; [Bindable] public var prodTotal:Number = 0; // Control the page contents by selectively hiding the header and // footer based on the page type. public function showPage(pageType:String):void { if(pageType == first || pageType == middle) { // Hide the footer. //footer.includeInLayout=false; //footer.visible = false; } if(pageType == middle || pageType == last) { // The header won't be used again; hide it. header.includeInLayout=false; header.visible = false; } if(pageType == last) { // Show the footer. //footer.includeInLayout=true; //footer.visible = true; } //Update the DataGrid layout to reflect the results. validateNow(); } public function myDateFormat(item:Object, column:DataGridColumn):String { var newItem:String; var thisDate:String; var result:Array; if (column.headerText == Release to Area Date){ newItem = item.globalReleaseDate; } else { newItem = item.globalDeadline; } return myDateSm.format(newItem) } // ]] /mx:Script !-- date formatter -- mx:DateFormatter id=myDate formatString=D, / mx:DateFormatter id=myDateSm formatString=DD MMM / ! !-- The template for the printed page, with the contents for all pages. -- mx:VBox width=80% horizontalAlign=left mx:Label text=Page {pageNumber}/ /mx:VBox !-- MyComp:FormPrintHeader id=header width=100%/ -- mx:Image source={Banner} id=header width=90%/ !-- The sizeToPage property is true by default, so the last page has only as many grid rows as are needed for the data. - - mx:PrintDataGrid id=myDataGrid width=100% height=100% variableRowHeight=true fontSize=9 !-- Specify the columns to ensure that their order is correct. - - mx:columns mx:DataGridColumn headerText=Deployment dataField=title wordWrap=true / mx:DataGridColumn headerText=Portfolio Name dataField=portfolioName wordWrap=true/ mx:DataGridColumn headerText=Origin dataField=origin/ mx:DataGridColumn headerText=Target(s) dataField=targetAll wordWrap=true width=100 / mx:DataGridColumn headerText=Release to Area Date headerWordWrap=true dataField=globalReleaseDate labelFunction=myDateFormat / mx:DataGridColumn headerText=Deadline dataField=globalDeadline labelFunction=myDateFormat minWidth=100 / /mx:columns /mx:PrintDataGrid !-- Create a FormPrintFooter control and set its prodTotal variable. -- !--MyComp:FormPrintFooter id=footer pTotal={prodTotal}/-- /mx:VBox
[flexcoders] Re: FlexMDI How to get DRAG_END event to fire
Well, color me totally confused. I have no idea what I did but now it works (Although I still do not see any focus events; But I don't need those right now). Here is the pared down code which works... ?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 flexmdi.events.MDIManagerEvent; import flexmdi.managers.MDIManager; import flexmdi.containers.MDIWindow; private function init():void { var win1:MDIWindow = new MDIWindow(); win1.width = win1.height = 300; win1.title = Window One; var win2:MDIWindow = new MDIWindow(); win2.width = win2.height = 300; win2.title = Window Two; MDIManager.global.add(win1); MDIManager.global.add(win2); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_FOCUS_START, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_FOCUS_END, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_DRAG_START, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_DRAG_END, windowEventHandler); } private function windowEventHandler(event:Event):void { if(event is MDIManagerEvent) { var mgrEvent:MDIManagerEvent = event as MDIManagerEvent; trace(mgrEvent.window.title + MDIManagerEvent: + event.type); } } ]] /mx:Script /mx:Application If I move both of the windows, this is what is output... Window Two MDIManagerEvent: windowDragStart Window Two MDIManagerEvent: windowDragEnd Window One MDIManagerEvent: windowDragStart Window One MDIManagerEvent: windowDragEnd
[flexcoders] Cant get a module to build
I have an application with more than 15 modules. I seem to currently have about 7 modules that wont build. No errors show up just there is no swf generated for some modules. The project has these modules set correctly on the modules tab and I dont see a difference between the ones that generate and the ones that dont. Any ides
[flexcoders] Re: How to compare with NaN?
if (isNaN(Total_cost)) { Total_cost = -1; } - venkat http://www.venkatj.com --- In flexcoders@yahoogroups.com, markflex2007 [EMAIL PROTECTED] wrote: Hi, I have the simple code here var Total_cost : Number = Number(cost1) + Number(cost2); if (Total_cost == NaN) { Total_cost = -1; } I get a error.Please help me out.Thanks Mark
RE: [flexcoders] Re: Loading mask or overlay for datagrids while loading
A mask in Flash is a specific thing that clips the object it masks. I think you really want an overlay and PopUpManager is a good way to overlay things temporarily. Whether you want it for the datagrid or other components doesn't matter. The Alert puts up a transparent blur over the whole app via PopUpManager. You can popup some animation in a similar way at specific sizes and positions. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of brey_magenta Sent: Thursday, December 20, 2007 3:06 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Loading mask or overlay for datagrids while loading Because that is not the way I want? It's not only ment for datagrids, also for components that load data. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: How about using PopUpManager to popup something over the datagrid? From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of brey_magenta Sent: Monday, December 17, 2007 12:08 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Loading mask or overlay for datagrids while loading Well, for example, using a mask? I know you can put a 'mask' over any visible object but I don't know how to make a mask which shows a animated loading swf/image. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: There are so many options, I don't know where to start. You can use masks, overlays, popups, effects, transitions. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of brey_magenta Sent: Wednesday, December 12, 2007 11:50 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Loading mask or overlay for datagrids while loading I've been wondering how to show a nice loading animation while a datagrid or other component is loading and fading it out when it's done loading. I've been looking everywhere for a nice solution but I haven't found a decent one so far. Is there an easy way? By using a mask or something?
RE: [flexcoders] Find and focus next PopUp
If the popups had focus, Flex will focus the topmost one. There might be a bug in 2.x though. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of reflexactions Sent: Wednesday, December 19, 2007 11:27 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Find and focus next PopUp If I have a number of popup windows open and then I close(removePopUp) one popup window, how do I find and then focus the next popup window. Alternatively how do I do it if instead I hide it instead of removing it. Shouldnt this be handled automatically by the SytemManager or PopUpManager? tks
RE: [flexcoders] Problem with XMLListCollection binding with listcontrol
Try just adding item tag and not the outer order tag From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Gupta, Pradeep Sent: Wednesday, December 19, 2007 10:05 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Problem with XMLListCollection binding with listcontrol Hi, I am facing one problem while modifying the XMLListcollection binded with the list control. Every thing works fine as expected but when I modify the list (addition or renaming the list) through User Interface such as Pop up the added element the whole xml of the added item gets added however I was expecting the value of a particular tag. For e.g. XML is shown below List control has items binded to description element then it shows Big Screen Television DVD Player But when I add LCD Player through UI order item id = 3456 descriptionLCD Player/description price1299.99/pricequantity1/quantity /item /order is created. Any clues?? I am using the E4x format for the received xml and already defined the namespaces required for the xml parsing. public var xdata:XML = order item id = 3456 descriptionBig Screen Television/description price1299.99/pricequantity1/quantity /item item id = 56789 descriptionDVD Player/description price399.99/price quantity1/quantity /item /order; Thanks
[flexcoders] Re: FlexMDI How to get DRAG_END event to fire
Strange indeed :) I know the code I pointed you to used a canvas, I just wanted to see if that made a difference. Maybe try converting that file to use the global instance and see if that works? Ben --- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote: Well, color me totally confused. I have no idea what I did but now it works (Although I still do not see any focus events; But I don't need those right now). Here is the pared down code which works... ?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 flexmdi.events.MDIManagerEvent; import flexmdi.managers.MDIManager; import flexmdi.containers.MDIWindow; private function init():void { var win1:MDIWindow = new MDIWindow(); win1.width = win1.height = 300; win1.title = Window One; var win2:MDIWindow = new MDIWindow(); win2.width = win2.height = 300; win2.title = Window Two; MDIManager.global.add(win1); MDIManager.global.add(win2); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_FOCUS_START, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_FOCUS_END, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_DRAG_START, windowEventHandler); MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_DRAG_END, windowEventHandler); } private function windowEventHandler(event:Event):void { if(event is MDIManagerEvent) { var mgrEvent:MDIManagerEvent = event as MDIManagerEvent; trace(mgrEvent.window.title + MDIManagerEvent: + event.type); } } ]] /mx:Script /mx:Application If I move both of the windows, this is what is output... Window Two MDIManagerEvent: windowDragStart Window Two MDIManagerEvent: windowDragEnd Window One MDIManagerEvent: windowDragStart Window One MDIManagerEvent: windowDragEnd
RE: [flexcoders] State transitions and List components
indexToItemRenderer, localToGlobal. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of rohit2b Sent: Wednesday, December 19, 2007 7:28 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] State transitions and List components Hi, I'm trying to have state transitions in an mxml component that has a List item that uses custom item renderers. Is it possible to access the children of the List item as UI components, and to get each child's x and y position? I haven't been able to find a way to do so. The List has a data provider which is an array of data objects. I need to be able to access the rendered UI component for each data object in the List. Any help would be greatly appreciated. Thanks, Rohit
RE: [flexcoders] Re: Why does my Tree Control Vertically scrolls on its own ?
If the tree is a droptarget, the dragscroll will kick in to allow you a chance to scroll before dropping. If you don't ever want to drop on that tree, set dropEnabled=false From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of helihobby Sent: Wednesday, December 19, 2007 6:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Why does my Tree Control Vertically scrolls on its own ? I was doing ... DragManager.acceptDragDrop(target); But why would this screw it up ? Regards, Sean. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , helihobby [EMAIL PROTECTED] wrote: It sure was ... I did: override protected function dragScroll():void {} Which solved the problem ... Thanks. Any idea what it was being called ? My dropTarget was set on another canvas ... Can you explain ? Thank you for all the help, sean. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: That's probably the dragScroll kicking in. Is dropTarget=true? From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of helihobby Sent: Wednesday, December 19, 2007 1:26 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Why does my Tree Control Vertically scrolls on its own ? Hi All, I have my mx:tree set to liveScrolling false and yet when I drag items out of the Tree the vertical scroll bar / tree scrolls down as if I am scrolling down ... I wish for the tree to remain on its current scroll position ... Is this a bug in Flex SDK 2.01 ? Regards, Sean.
Re: [flexcoders] Re: const?
- Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 4:13 PM Subject: [flexcoders] Re: const? 20+ years? LOL, I have the drop on you.. Depends on how big the + is doesnt it lol... Now if were gonna do a how long is my d*** I did start with RPG on an ICL2903, though my first real commercial code was in APL but we better stop before someone works out the dates and says were too old to code. Ah yes, the. ICL 2900 series - famous for it's muted colour scheme, if I remember correctly.. ;-) OK, enough wandering..
Re: [flexcoders] Re: const?
Talking about ancient times - In Pascal you were able to declare local member variables. I always found it useful, if you need the var in one place only. Cheers Ralf.
Re: [flexcoders] Parallel Source Folders
Okay, I guess this answers my question. Bummer. http://www.joeberkovitz.com/blog/2007/10/31/flex-builder-source-folders-need-to-go-back-in-the-oven/ OR http://tinyurl.com/33wqtg ___ Joseph Balderson, Flash Platform Developer | http://joeflash.ca Writing partner, Community MX | http://www.communitymx.com Abobe Certified Developer Trainer Joseph Balderson wrote: Apologies for the noob question, but is it at all possible to declare parallel source folders for MXML files, all of which point to the source root of the application? In projects where I don't need SVN, just prototyping a few things, the source folder can get cluttered with drafts of stuff, so I'd like to have a drafts and a src folder, like so /src /drafts ...both of which are considered source folders attached to the application root. I've searched through all the Build settings for the project, but can't seem to get this to work in FlexBuilder. Do I need to add something to a config file or as a -compiler directive to initiate this? And has this been made any easier to set up in FB 3?
[flexcoders] Namespaced XML as a dataProvider for ColumnSeries
Hello, I'm having a problem with using XML that contains namespaces as a data provider for a ColumnChart. When setting the yField property of the ColumnSeries, nothing shows up in the chart if I just use the local name portion, and there seems to be no way to specify a namespace. There is a similar problem with the dataField property of the DataGridColumn, and the workaround in that case is to use the labelFunction to display the data. Is there a similar workaround (or any workaround at all, really) that would work in my situation, or do I have to bite the bullet and just strip all the namespaces from the XML I am using as a data provider? Thanks in advance, Wesley
[flexcoders] Re: FlexMDI How to get DRAG_END event to fire
Maybe I will give that a try. I have been thinking about why it suddenly worked. When you asked what version of Flash Player I was running, I went to http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507 to find out. The page came up quite quick but the movie took about 15 seconds. I am just wondering whether my flash player had been cached and going to the adobe page above caused it to completely reload the latest Flash Player I had just installed? Other than that, I am stumped. --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: Strange indeed :) I know the code I pointed you to used a canvas, I just wanted to see if that made a difference. Maybe try converting that file to use the global instance and see if that works?
[flexcoders] Button White Background..
I wnat to change the background color of button to white but its not changing the color plz help me and let me know what is problm here is my code thanks in advance and Happy Eid to all group members... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Style Button { fill-colors: #ff, #ff; } /mx:Style mx:Button label=i am not changing background why/ /mx:Application Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
[flexcoders] URLRequest file upload doesn't work with security?
I have a Flex application that uploads a file to the server and works great by itself. However, when I team it up with JCIFS for SSO it stops working. What is strange is that loading images and any other HTTP requests seem to work just fine, but when I do a URLRequest to upload the file it re-challenges the browser for authentication and I get a prompt to log-in. Is there something I can do to make this file upload work the same way all the other requests work so I don't get challenged after I've technically already been authenticated? I've verified the headers on the server and IE gets the JSESSIONID and Firefox does not, but both still prompt for authentication at upload time. Help is greatly appreciated.
[flexcoders] Re: Button White Background..
There is no problem in your code. and it works too. try using this as a sample fill-colors: #00, #00; you will see that the colors are in fact changing. its just that the white fill colors are hard to distinguish. - venkat http://www.venkatj.com --- In flexcoders@yahoogroups.com, Parjan Arjan [EMAIL PROTECTED] wrote: I wnat to change the background color of button to white but its not changing the color plz help me and let me know what is problm here is my code thanks in advance and Happy Eid to all group members... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Style Button { fill-colors: #ff, #ff; } /mx:Style mx:Button label=i am not changing background why/ /mx:Application Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
[flexcoders] IE keeps growing and growing and growing
I'm changing the selectedIndex of a data grid with a simple function call triggered by a Timer. I posted something a few weeks ago about the same topic when changing an image. I was under the impression that it was the image that was makeing the IE object size grow but it seems with this new test that there is another issue with automating a function with a Timer. Does anybody have any work arounnd for this problem? I can't belive that this type of thing is an issue with a platform like flex. Here is the working code...it's pretty straight forward. I just don't get it. ---CODE--- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical width=577 height=68 horizontalAlign=center paddingBottom=0 paddingLeft=0 paddingRight=0 paddingTop=0 verticalAlign=middle initialize=RSSfeed.send() creationComplete=ShortTimer() mx:Script ![CDATA[ import mx.controls.Alert; private function nav(myUrl:String):void { var urlToNav:URLRequest = new URLRequest(myUrl); navigateToURL(urlToNav,_blank); } [Bindable] private var num:int = 1; move the visible section of the data grid in focus private function changeIndex():void { entries.scrollToIndex(num);//entries refers to the data grid below if (num RSSfeed.lastResult.rss.channel.item.length){ num++;//increase if thess than the length of the feed }else{ num = 1;//set back to 1 } } private function ShortTimer():void { // creates a new five-second Timer var minuteTimer:Timer = new Timer(1000, 5); // designates listeners for the interval event and the completion event minuteTimer.addEventListener(TimerEvent.TIMER, onTick); minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete); // starts the timer ticking minuteTimer.start(); } private function onTick(evt:TimerEvent):void { if(evt.target.currentCount == 5){ ShortTimer(); } } public function onTimerComplete(evt:TimerEvent):void { changeIndex() ShortTimer(); } ]] /mx:Script mx:Style DataGrid { backgroundAlpha: 1; backgroundColor: #00; alternatingItemColors: #ff, #eff1f2; horizontalGridLines: true; letterSpacing: 0; horizontalGridLineColor: #99; verticalGridLines: false; useRollOver: false; borderThickness: 2; borderColor: #ff; selectionColor: #00; color: #ff; textSelectedColor: #ff; textIndent: 0; dropShadowEnabled: true; shadowDistance: 3; shadowDirection: right; fontSize: 14; fontWeight: normal; headerStyleName: mydataGridHeaderStyle; } .mydataGridHeaderStyle { color: #99; letterSpacing: 0; } /mx:Style mx:HTTPService showBusyCursor=true id=RSSfeed url=http://www.weather.gov/alerts/ma.rss; resultFormat=object / mx:DataGrid sortableColumns=false width=506 height=48 id=entries dataProvider={RSSfeed.lastResult.rss.channel.item} horizontalCenter=0 verticalCenter=0 click=nav(RSSfeed.lastResult.rss.channel.item [entries.selectedIndex].link) cornerRadius=6 borderStyle=solid borderColor=#00ff00 alternatingItemColors=[#00, #00] selectedIndex=1 mx:columns mx:DataGridColumn dataField=title headerText=Mass Weather Advisory Feed fontSize=9 wordWrap=true/ /mx:columns /mx:DataGrid /mx:Application
[flexcoders] Re: How to compare with NaN?
Try isNan() . eg: if ( isNaN(Total_Cost) ) --- In flexcoders@yahoogroups.com, markflex2007 [EMAIL PROTECTED] wrote: Hi, I have the simple code here var Total_cost : Number = Number(cost1) + Number(cost2); if (Total_cost == NaN) { Total_cost = -1; } I get a error.Please help me out.Thanks Mark
[flexcoders] apply style sheet to as3 - only application?
hi there. i can apply a stylesheet no problem, to a mxml application. however, in an as3 only application, i cant seem to figure out how to do this. i can TextFormat using a stylesheet, when its text, no problem. just cant figure out how to do it for the whole app. mainly i want a background gradient and some background alpha changes. thanks for any help tony -- 'Never have anything in your life that you can't walk out on in thirty seconds flat, if you spot the heat coming around the corner' robert deniro - heat (1995)
RE: [flexcoders] IE keeps growing and growing and growing
You have exponential timer creation occurring! At 5 ticks your timer will complete. Both onTick and onTimerComplete will occur (in that order), and 2 more timers will get created. In 5 seconds both onTick and onTimerComplete will occur on both of those timers and 4 more timers will get created. in 5 seconds. 8 more. 16 more.. 32 more. etc. To protect against this kind of bad coding, a good practice for timers is to declare them on the class (not within the function as you have), and when you want to start them, check to make sure they aren't running first, if they are, stop them beforehand. and don't declare new timers if at all possible - instead use the reset function. HTH! Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of doepositive Sent: Thursday, December 20, 2007 12:03 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] IE keeps growing and growing and growing I'm changing the selectedIndex of a data grid with a simple function call triggered by a Timer. I posted something a few weeks ago about the same topic when changing an image. I was under the impression that it was the image that was makeing the IE object size grow but it seems with this new test that there is another issue with automating a function with a Timer. Does anybody have any work arounnd for this problem? I can't belive that this type of thing is an issue with a platform like flex. Here is the working code...it's pretty straight forward. I just don't get it. ---CODE--- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical width=577 height=68 horizontalAlign=center paddingBottom=0 paddingLeft=0 paddingRight=0 paddingTop=0 verticalAlign=middle initialize=RSSfeed.send() creationComplete=ShortTimer() mx:Script ![CDATA[ import mx.controls.Alert; private function nav(myUrl:String):void { var urlToNav:URLRequest = new URLRequest(myUrl); navigateToURL(urlToNav,_blank); } [Bindable] private var num:int = 1; move the visible section of the data grid in focus private function changeIndex():void { entries.scrollToIndex(num);//entries refers to the data grid below if (num RSSfeed.lastResult.rss.channel.item.length){ num++;//increase if thess than the length of the feed }else{ num = 1;//set back to 1 } } private function ShortTimer():void { // creates a new five-second Timer var minuteTimer:Timer = new Timer(1000, 5); // designates listeners for the interval event and the completion event minuteTimer.addEventListener(TimerEvent.TIMER, onTick); minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete); // starts the timer ticking minuteTimer.start(); } private function onTick(evt:TimerEvent):void { if(evt.target.currentCount == 5){ ShortTimer(); } } public function onTimerComplete(evt:TimerEvent):void { changeIndex() ShortTimer(); } ]] /mx:Script mx:Style DataGrid { backgroundAlpha: 1; backgroundColor: #00; alternatingItemColors: #ff, #eff1f2; horizontalGridLines: true; letterSpacing: 0; horizontalGridLineColor: #99; verticalGridLines: false; useRollOver: false; borderThickness: 2; borderColor: #ff; selectionColor: #00; color: #ff; textSelectedColor: #ff; textIndent: 0; dropShadowEnabled: true; shadowDistance: 3; shadowDirection: right; fontSize: 14; fontWeight: normal; headerStyleName: mydataGridHeaderStyle; } .mydataGridHeaderStyle { color: #99; letterSpacing: 0; } /mx:Style mx:HTTPService showBusyCursor=true id=RSSfeed url=http://www.weather.gov/alerts/ma.rss; resultFormat=object / mx:DataGrid sortableColumns=false width=506 height=48 id=entries dataProvider={RSSfeed.lastResult.rss.channel.item} horizontalCenter=0 verticalCenter=0 click=nav(RSSfeed.lastResult.rss.channel.item [entries.selectedIndex].link) cornerRadius=6 borderStyle=solid borderColor=#00ff00 alternatingItemColors=[#00, #00] selectedIndex=1 mx:columns mx:DataGridColumn dataField=title headerText=Mass Weather Advisory Feed fontSize=9 wordWrap=true/ /mx:columns /mx:DataGrid /mx:Application
[flexcoders] Re: IE keeps growing and growing and growing
I think it may have to do with calling addEventListener. I think it may be adding and adding and adding. Is there a way to create a timer that calls a function every time an interval is reached? I've experimented with using useWeakReference but I don't see a difference. Any help would be appreciated. --- In flexcoders@yahoogroups.com, doepositive [EMAIL PROTECTED] wrote: I'm changing the selectedIndex of a data grid with a simple function call triggered by a Timer. I posted something a few weeks ago about the same topic when changing an image. I was under the impression that it was the image that was makeing the IE object size grow but it seems with this new test that there is another issue with automating a function with a Timer. Does anybody have any work arounnd for this problem? I can't belive that this type of thing is an issue with a platform like flex. Here is the working code...it's pretty straight forward. I just don't get it. ---CODE- -- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical width=577 height=68 horizontalAlign=center paddingBottom=0 paddingLeft=0 paddingRight=0 paddingTop=0 verticalAlign=middle initialize=RSSfeed.send() creationComplete=ShortTimer() mx:Script ![CDATA[ import mx.controls.Alert; private function nav(myUrl:String):void { var urlToNav:URLRequest = new URLRequest(myUrl); navigateToURL(urlToNav,_blank); } [Bindable] private var num:int = 1; move the visible section of the data grid in focus private function changeIndex():void { entries.scrollToIndex(num);//entries refers to the data grid below if (num RSSfeed.lastResult.rss.channel.item.length){ num++;//increase if thess than the length of the feed }else{ num = 1;//set back to 1 } } private function ShortTimer():void { // creates a new five-second Timer var minuteTimer:Timer = new Timer(1000, 5); // designates listeners for the interval event and the completion event minuteTimer.addEventListener(TimerEvent.TIMER, onTick); minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete); // starts the timer ticking minuteTimer.start(); } private function onTick(evt:TimerEvent):void { if(evt.target.currentCount == 5){ ShortTimer(); } } public function onTimerComplete(evt:TimerEvent):void { changeIndex() ShortTimer(); } ]] /mx:Script mx:Style DataGrid { backgroundAlpha: 1; backgroundColor: #00; alternatingItemColors: #ff, #eff1f2; horizontalGridLines: true; letterSpacing: 0; horizontalGridLineColor: #99; verticalGridLines: false; useRollOver: false; borderThickness: 2; borderColor: #ff; selectionColor: #00; color: #ff; textSelectedColor: #ff; textIndent: 0; dropShadowEnabled: true; shadowDistance: 3; shadowDirection: right; fontSize: 14; fontWeight: normal; headerStyleName: mydataGridHeaderStyle; } .mydataGridHeaderStyle { color: #99; letterSpacing: 0; } /mx:Style mx:HTTPService showBusyCursor=true id=RSSfeed url=http://www.weather.gov/alerts/ma.rss; resultFormat=object / mx:DataGrid sortableColumns=false width=506 height=48 id=entries dataProvider={RSSfeed.lastResult.rss.channel.item} horizontalCenter=0 verticalCenter=0 click=nav(RSSfeed.lastResult.rss.channel.item [entries.selectedIndex].link) cornerRadius=6 borderStyle=solid borderColor=#00ff00 alternatingItemColors=[#00, #00] selectedIndex=1 mx:columns mx:DataGridColumn dataField=title headerText=Mass Weather Advisory Feed fontSize=9 wordWrap=true/ /mx:columns /mx:DataGrid /mx:Application
[flexcoders] Event after ScrollEvent?
The scroll event fires when scrolling occurs, but before the child content has shifted. Here is the documentation: 'At the time when this event is dispatched, the scrollbar has been updated to the new position, but the container's child objects have not been shifted to reflect the new scroll position.' What events are available to listen to so that I will know that the content has shifted? I have tried listening to the UPDATE_COMPLETE event at various levels, but this doesn't seem to work for me all the time either. I am immediately calling getRect() on one of the child objects to get it's position relative to objects higher in my application. At the time I make this call, the returned rect is not always the updated rect that reflects the scroll that has just occurred. Thanks, Gary
RE: [flexcoders] Re: IE keeps growing and growing and growing
Yes, it does. I don't understand why you are creating a timer for 5 seconds and then starting it again. Why not just create a timer forever? Just do this, mx:Script ![CDATA[ import mx.controls.Alert; private var minuteTimer:Timer = null; private function nav(myUrl:String):void { var urlToNav:URLRequest = new URLRequest(myUrl); navigateToURL(urlToNav,_blank); } [Bindable] private var num:int = 1; move the visible section of the data grid in focus private function changeIndex():void { entries.scrollToIndex(num);//entries refers to the data grid below if (num RSSfeed.lastResult.rss.channel.item.length){ num++;//increase if thess than the length of the feed }else{ num = 1;//set back to 1 } } private function ShortTimer():void { // creates a new five-second Timer if(minuteTimer==null) { var minuteTimer:Timer = new Timer(1000); // designates listeners for the interval event and the completion event minuteTimer.addEventListener(TimerEvent.TIMER, onTick); minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete); } // starts the timer ticking minuteTimer.start(); } private function onTick(evt:TimerEvent):void { if(evt.target.currentCount%5==0){ changeIndex(); } } public function onTimerComplete(evt:TimerEvent):void { minuteTimer=null; } ]] /mx:Script From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of doepositive Sent: Thursday, December 20, 2007 12:30 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: IE keeps growing and growing and growing I think it may have to do with calling addEventListener. I think it may be adding and adding and adding. Is there a way to create a timer that calls a function every time an interval is reached? I've experimented with using useWeakReference but I don't see a difference. Any help would be appreciated. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , doepositive [EMAIL PROTECTED] wrote: I'm changing the selectedIndex of a data grid with a simple function call triggered by a Timer. I posted something a few weeks ago about the same topic when changing an image. I was under the impression that it was the image that was makeing the IE object size grow but it seems with this new test that there is another issue with automating a function with a Timer. Does anybody have any work arounnd for this problem? I can't belive that this type of thing is an issue with a platform like flex. Here is the working code...it's pretty straight forward. I just don't get it. ---CODE- -- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical width=577 height=68 horizontalAlign=center paddingBottom=0 paddingLeft=0 paddingRight=0 paddingTop=0 verticalAlign=middle initialize=RSSfeed.send() creationComplete=ShortTimer() mx:Script ![CDATA[ import mx.controls.Alert; private function nav(myUrl:String):void { var urlToNav:URLRequest = new URLRequest(myUrl); navigateToURL(urlToNav,_blank); } [Bindable] private var num:int = 1; move the visible section of the data grid in focus private function changeIndex():void { entries.scrollToIndex(num);//entries refers to the data grid below if (num RSSfeed.lastResult.rss.channel.item.length){ num++;//increase if thess than the length of the feed }else{ num = 1;//set back to 1 } } private function ShortTimer():void { // creates a new five-second Timer var minuteTimer:Timer = new Timer(1000, 5); // designates listeners for the interval event and the completion event minuteTimer.addEventListener(TimerEvent.TIMER, onTick); minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete); // starts the timer ticking minuteTimer.start(); } private function onTick(evt:TimerEvent):void { if(evt.target.currentCount == 5){ ShortTimer(); } } public function onTimerComplete(evt:TimerEvent):void { changeIndex() ShortTimer(); } ]] /mx:Script mx:Style DataGrid { backgroundAlpha: 1; backgroundColor: #00; alternatingItemColors: #ff, #eff1f2; horizontalGridLines: true; letterSpacing: 0; horizontalGridLineColor: #99; verticalGridLines: false; useRollOver: false; borderThickness: 2; borderColor: #ff; selectionColor: #00; color: #ff; textSelectedColor: #ff; textIndent: 0; dropShadowEnabled: true; shadowDistance: 3; shadowDirection: right; fontSize: 14; fontWeight: normal; headerStyleName: mydataGridHeaderStyle; } .mydataGridHeaderStyle { color: #99; letterSpacing: 0; } /mx:Style mx:HTTPService showBusyCursor=true id=RSSfeed url=http://www.weather.gov/alerts/ma.rss; resultFormat=object / mx:DataGrid sortableColumns=false width=506 height=48 id=entries dataProvider={RSSfeed.lastResult.rss.channel.item} horizontalCenter=0 verticalCenter=0 click=nav(RSSfeed.lastResult.rss.channel.item