RE: [flexcoders] Flex Datagrid bottom row cutoff
Fix the height to rowCount * rowHeight + viewMetrics.top + viewMetrics.bottom Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of flexaustin Sent: Thursday, October 22, 2009 8:38 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Datagrid bottom row cutoff My datagrids bottom row is getting cutoff, how do I stop this? J
RE: [flexcoders] Disable sort when values in grid change (on propertyChanged)
Try blocking the collectionEvent. It will have kind = CollectionEventKind.REFRESH. Note that any scrolling will be incorrect since it will use the new sort order. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of tntomek Sent: Thursday, October 22, 2009 5:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Disable sort when values in grid change (on propertyChanged) I don't want my grid reordering itself on every propertyChanged event that would cause the sort order to change, can I prevent this somehow? I understand this is default behavior but it's not an option for our customer, and it is really annoying when the 1000 row grid is re-ordered every time user changes any values, not to mention slow. I tried returning 0 from sortComparer with no luck, grid still seems to reorder itself according to original data provider and not the sorted view when sort() was set. Specifically using AdvancedDataGrid and I'm starting to run out of ideas. Do I reset the dataprovider every time I decide to change my sort? I'm already intercepting headerRelease and setting sort explicitly as well as calling sort from controls outside the grid. How would I get the currently sorted list from my ArrayCollection, does the baseclass CollectionView have a current sorted view? Is there really no way to take a snapshot or current view and set it to current? Is there a way to tell sort() to physically move the rows instead of maintaining a view? What I found online: http://www.actionscript.org/forums/showthread.php3?t=199554 Not an option since grid is sortable, I just want to suppress the updates AFTER initial sort
RE: [flexcoders] ArrayCollection of VO's Memory Leak??
The profiler should be able to show you who is still referencing the objects. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Jake Churchill Sent: Thursday, October 22, 2009 10:57 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] ArrayCollection of VO's Memory Leak?? Hi all, I have a charting application where I have an ArrayCollection of VO's. The chart has several series, each looking at one property in the VO. There are several controls that when changed, require a re-calculation of the VO's in the ArrayCollection. Before I do the re-calculation, I call .removeAll() on the ArrayCollection and re-populate it with new VO's. When I run the profiler, my VO instances grow with each re-calculation. So, why doesn't the garbage collector take care of the objects that got removed from the ArrayCollection? How can I fix this? Please help. Thanks! -Jake
RE: [flexcoders] Can you take a Canvas and save it as a PNG?
BitmapData.draw, then PNGEncoder Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Paul Johnston Sent: Thursday, October 22, 2009 7:24 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Can you take a Canvas and save it as a PNG? Have a client needing image work done in an AIR application to be saved as an image. It's all working on a Canvas object, but I can't see a toImage() or toBitmap() methods to do that. Is it possible? Paul
RE: [flexcoders] Question about overlay and transparency
It will have to be parented somewhere else and positioned back where you need it so it doesn't fall under a parent that has alpha1. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of guytom19 Sent: Thursday, October 22, 2009 6:43 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question about overlay and transparency Hello, I'm failing to achieve something that sounded trivial at first - please see if you have an idea: - We have a video player - The video player loads a flex application - This flex application we'd like to have a semi transparent (alpha=0.5) black background - on top of the black background there should be an opaque image and a text container That's it... Problem is - whenever we put a backgroundAlpha in the loaded application , or alpha in the SWFLoader that loads it, there's no way to make one of the components opaque. I'm sure it's simple but can't find it. Help appreciated. Guy
RE: [flexcoders] Flex Profiler Questions
1. The profiler post on my blog attempts to explain the difference between profiler memory, System.totalMemory and process memory. Profiler memory is the memory attributed to AS properties. The player has lots of other backing objects allocated in System.totalMemory. Fonts and bitmaps have very small AS representations (a couple of slots for properties). They are mostly buffers the player will use to render. 2. It hasn't been proven, but my theory is that some of the memory attributed to XML is due to the string pool growing and not cleaning up properly. I do have confirmation that XML is not fully parsed. Nodes are turned into structures on-demand so the amount of memory used by XML grows as you traverse it. Also keep in mind that the player rarely, if ever, frees up memory pages because they usually end up sparsely populated so System.totalMemory won't always shrink as much as you would think 3. I'd have to see it in context to remember what it means. A method closure is the association of a method with an object. If you see them in the profiler I think they are simply references to methods in a class. 4. UnloadAndStop is not a giant hammer. It simply stops various media streams as well as dereferences the SWF. It does not free up every AS reference to objects in the SWF so it can't just punt a SWF from memory, you still have to clean those references up some other way. A timer that is still on won't GC. An object listening via weak reference will, but I was told recently that weak references don't get GC'd as quickly as other kinds of references. HTH Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Jesse Warden Sent: Thursday, October 22, 2009 6:46 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Profiler Questions 1. Why doesn't he show assets (bitmaps, fonts, ... the things that take the most RAM)? Profiler reports 6 megs, but System.totalMemory reports 40 megs. No other SWF is open on the system beyond that one (so as not to pollute System.totalMemory accounting for multiple SWF's). 2. I had some XML accounting for 150 megs of 190 megs, yet the profiler didn't show it; said 21 megs. I ran garbage collection multiple times in the profiler, but it still stayed around. Why isn't it picking this massive chunk up? 3. What are Method Closure; event listeners? 4. Running code in Flash, I can confirm from both viewing memory via System.totalMemory + having a timer that traces out a message on every tick that a SWF is in fact unloaded from a Loader in Flash Player 10. Running this code in the profiler shows the Loader never unloading (yes, I'm compiling for 10 and yes I'm using unloadAndStop; remember, same code). The profiler claims Loader still has it's instance around and the timer doesn't die with his weak listener... but does running in Flash.
RE: [flexcoders] Daylight Savings Time issues from Flex to ColdFusion 8.01
Join the club, we have T-Shirts (except it's passing Date from Flex to Java). The last communication we had with Adobe on the issue is that Flash Player on Windows doesn't handle Daylight savings times properly (at least in the UK, and a bunch of other regions in the bug), and it appears the same issue applies to AIR. What I'd love to see, is Adobe allowing us to turn off the daylight savings code completely, and let us handle it ourselves! Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of gareth_arch Sent: 22 October 2009 15:13 To: flexcoders@yahoogroups.com Subject: [flexcoders] Daylight Savings Time issues from Flex to ColdFusion 8.01 I am having some issues with DST when transferring a date from Flex to ColdFusion.
[flexcoders] Re: LCDS : number of flexsessions
Flex sessions should be invalidated once the client is gone or idle-timeout-minutes amount of time passed in RTMP. Which version of LCDS are you using? If you have a repro case that shows the behavior, please open a bug in LCDS bug base: http://bugs.adobe.com/jira/browse/LCDS -Mete --- In flexcoders@yahoogroups.com, Besite - Bart b...@... wrote: Hello, Our application uses amf and rtmp channels. All our destinations have application scope. The rtmp channels in our application have an idle-timeout-minutes property of 20 minutes. In our ds-console we see that the number of Flexsessions keeps growing and growing. After a few hours our application becomes slow and we think that the growing number of flexsessions causes our appication to slow down. What could be the reason that some flexsessions are never ended ? Kind regards Bart Ronsyn
RE: [flexcoders] Daylight Savings Time issues from Flex to ColdFusion 8.01
I should add that Adobe blame Windows for the problem, not the Flash Player. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk
[flexcoders] Livecycle Data Services ES2 : cost per cpu
Hi people, Has anyone got an idea what the cost of a CPU license for LCDS ES2 is ? Thank you Bart Ronsyn
Re: [flexcoders] Daylight Savings Time issues from Flex to ColdFusion 8.01
gareth_arch wrote: I am having some issues with DST when transferring a date from Flex to ColdFusion. the flash client always adjusts for local tz cf only sees the server tz (aka tz hell). you might be better off working w/epoch offsets instead. setTime() getTime() flex side and if you only care about server tz just use normal cf datetime objects on the server. for cf sending back to flex use the undocumented getTime() to convert cf datetime objects to java epoch offset: now=now().getTime();
Re: [flexcoders] Livecycle Data Services ES2 : cost per cpu
You should contact Adobe representative for that. FDS started at 12.000 2CPU and got rebranded to LCDS and got a price increase too (everything which uses LifeCycle is pricy). I wish they they would go to the broader reach approach but I think it's more like the other way around. -- João Fernandes Adobe Certified Expert Adobe Community Expert http://www.onflexwithcf.org http://www.riapt.org Portugal Adobe User Group (http://aug.riapt.org)
[flexcoders] Skinning a scrollbar with Symbols, SWFs with poor mans Flash CS?
Hi, By looking at the .css file from a ScaleNine theme I think I've worked out how to reskin a scrollbar in Flex using symbols from a .SWF file I've also stumbled across a tutorial that shows how to do it using PNG images. I'm guessing the advantage to using Symbols in SWF's is that the images can be vector bsaed in case the flex is scaled using ScaleX and ScaleY (and my does for the visually impaired). My problem is I don't have Flash and I'm guessing to create symbols I need it? Is there a poor mans Flash app? I just want to somehow embed my vector images inside the SWF correctly. Thanks for any help on this fine Friday :) Nick
RE: [flexcoders] Flex Profiler Questions
Respect All I want to get download whiteboard class for making drawing website. an you help for this. Best Regards Manoj Sharma --- On Fri, 10/23/09, Alex Harui aha...@adobe.com wrote: From: Alex Harui aha...@adobe.com Subject: RE: [flexcoders] Flex Profiler Questions To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Date: Friday, October 23, 2009, 12:44 PM 1. The profiler post on my blog attempts to explain the difference between profiler memory, System.totalMemory and process memory. Profiler memory is the memory attributed to AS properties. The player has lots of other backing objects allocated in System.totalMemory. Fonts and bitmaps have very small AS representations (a couple of slots for properties). They are mostly buffers the player will use to render. 2. It hasn’t been proven, but my theory is that some of the memory attributed to XML is due to the string pool growing and not cleaning up properly. I do have confirmation that XML is not fully parsed. Nodes are turned into structures on-demand so the amount of memory used by XML grows as you traverse it. Also keep in mind that the player rarely, if ever, frees up memory pages because they usually end up sparsely populated so System.totalMemory won’t always shrink as much as you would think 3. I’d have to see it in context to remember what it means. A method closure is the association of a method with an object. If you see them in the profiler I think they are simply references to methods in a class. 4. UnloadAndStop is not a giant hammer. It simply stops various media streams as well as dereferences the SWF. It does not free up every AS reference to objects in the SWF so it can’t just punt a SWF from memory, you still have to clean those references up some other way. A timer that is still on won’t GC. An object listening via weak reference will, but I was told recently that weak references don’t get GC’d as quickly as other kinds of references. HTH Alex Harui Flex SDK Developer Adobe Systems Inc. Blog: http://blogs. adobe.com/ aharui From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Jesse Warden Sent: Thursday, October 22, 2009 6:46 AM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Flex Profiler Questions 1. Why doesn't he show assets (bitmaps, fonts, ... the things that take the most RAM)? Profiler reports 6 megs, but System.totalMemory reports 40 megs. No other SWF is open on the system beyond that one (so as not to pollute System.totalMemory accounting for multiple SWF's). 2. I had some XML accounting for 150 megs of 190 megs, yet the profiler didn't show it; said 21 megs. I ran garbage collection multiple times in the profiler, but it still stayed around. Why isn't it picking this massive chunk up? 3. What are Method Closure; event listeners? 4. Running code in Flash, I can confirm from both viewing memory via System.totalMemory + having a timer that traces out a message on every tick that a SWF is in fact unloaded from a Loader in Flash Player 10. Running this code in the profiler shows the Loader never unloading (yes, I'm compiling for 10 and yes I'm using unloadAndStop; remember, same code). The profiler claims Loader still has it's instance around and the timer doesn't die with his weak listener... but does running in Flash.
Re: [flexcoders] Need Clean URL Advice ...
Does this have the same issue when using tinyurl? From: paruliant sondangparul...@yahoo.com Sent: Thursday, October 22, 2009 8:56 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Need Clean URL Advice ... You can try using .htacceshttp://www.yourhtmlsource.com/sitemanagement/urlrewriting.htmlhttp://evolt.org/Making_clean_URLs_with_Apache_and_PHP Thanks and regard's Sondang pangaribuan From: knowself joe.te...@gmail.com To: flexcoders@yahoogroups.com Sent: Thu, October 22, 2009 7:08:20 AM Subject: [flexcoders] Need Clean URL Advice ... Ladies and Gents, I have a client that is troubled by their website being Blacklisted by http://www.surbl. org/ ... when attempting to create ( Bit.Ly ) links for use on twitter and facebook. As a reminder ... SURBLs are lists of web sites that have appeared in unsolicited messages. Unlike most lists, SURBLs are not lists of message senders. What happens is the Bit.Ly links bring up a nasty page ... Warning - this site has been flagged and may contain unsolicited content. The content of this web page appears to contain spam, or links to unsolicited or undesired sites. It seems that somehow my client is being penalized by Bit.Ly through their use of SURBL to vet their links ... And the response from the Bit.Ly guy was the way that url was formatted, I wouldn't doubt it is re-blocked. Looks like some sort of phishing/virus url to me. With the cmd call and curl, etc. Basically, my client is being Blacklisted ... for the style of their URL's ... It's a complicated high volume webisite, but like many websites the command structure is ... Baroque. Question: Is he right? Are ugly URL's grounds for being banned from a certain, trustworthiness ... to be fair, the full reason SURBL bans domains is that they believe these domains have been seen in a certain threshold of spam ... as defined by them. So, without giving away my client ... Here is their URL ... without the actual domain ... it's only a demo !! http://NotaRealDomain.com/?cmd=sb-registerrb=907073cmp=7cxid=0-0fb=truerwrd=1%20John%20Somecurl=www.FitForNothing.comdeno=1 Is that so ugly? Are clean URLs required today ... for high volume websites? Thanks in Advance ... All Mighty and Powerful web405 Joet
[flexcoders] PopupWindow dragging and enforcing main app window bounds
First, thanks to Tracy for answering my question about the columns array of the DataGrid. My question relates to dragging popup-windows. It's possible to drag a popup window outside the main application window's bounds, and if the user happens to release the mouse button at the wrong moment, the popup window can no longer be grabbed. My popup is defined in ActionScript like this: public class MyPopupWindow extends TitleWindow { ... } and is instantiated like this: var popwin = new MyPopupWindow(); var isModal:Boolean=true; PopUpManager.addPopUp(popwin, this, isModal); How would I get a reference to the main application window's bounds? MyPopupWindow instances could be popped up from deep inside nested containers. Do I keep getting parents of parents until there are no more parents to get? If I pass this rectangle to the MyPopupWindow constructor, can MyPopupWindow use those values to prevent itself from being dropped outside those confines, in the stopDragging() method that it inherits from Panel, and relocate itself? What properties contain its its current location relative to the main window's bounds? Or do I need to implement this in the class instance that invokes the PopUpManager.addPopUp method? Thanks
Re: [flexcoders] Ctrl + eh?
Just to add more context, I know children of ListBase don't support Ctrl+A so I added my own keydown listener for Ctrl + A in a datagrid so each index in the dataprovider would be in the .selectedIndicies. However it never gets fired. -mL Mark Lapasa wrote: In IE, why does Ctrl + A in a TextInput work but Ctrl + A in a datagrid doesn't? What is this funny business? Thx, -mL Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail. Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail.
[flexcoders] Re: Delay / Pause between script executions
You definitely want to use Timer here. When you create a timer you can set the interval for the timer and you can set the number of times you want the timer to execute. Using your example you'd get something like: myTimer = new Timer(5000, 3); This will create a timer that executes every 5 seconds and it will do this three times. Now you need two event handlers to handle the actual code execution. Timer has two events of interest timer and timerComplete. TimerComplete is dispatched on the final execution of the timer (based on how many iterations you set). Timer is dispatched on every other execution. So wire up some event listeners for these two events and you're pretty much in business. The only other thing you might need to know is what iteration the Timer is on. Fortunately Timer has a property, currentCount, that tells you the current iteration. You can access this in your event handler by reading event.target as this will be pointing to your Timer object. Check out the livedocs page for any details I missed: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/utils/Timer.html --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Hi Flexcoders, I know this may sound very elementary but I cannot figure the hell out of me how to achieve this. I have a label control. I want to display different messages after every 5 seconds, such as: myLabel.text = This is my first message // Need to delay for about 5 seconds here myLabel.text = This is my second message // Need to delay for about 5 seconds here myLabel.text = This is my last message I cannot figure out how to properly use the pause or timer utilities in achieving this. Any idea would be appreciated. Thanks. Regards, Angelo
[flexcoders] Persistence: storage methods, formats and strategies
I' tried few Flex apps that says something like this: As basic user, you have 500MB of storage limit or As user XYZ, you have 1GB of storage limit and so on. My question is: how these guys persists data? How applications like an image editing and sharing tool or an online collab text editor store data in the Server? In XML format? other formats? How about the hybrid apps, with Flex (online) and AIR (desktop) versions? Could these apps use the same storage method/format/strategy? Please, suggest me keywords so that I can keep searching and learning more about this. And feel free to point me links, blog posts, books an so forth about the issue. Best wishes.
Re: [flexcoders] ArrayCollection of VO's Memory Leak??
Where do you go to see that? All I can see is the number of instances an object has and the memory those instances take up? On Fri, Oct 23, 2009 at 1:10 AM, Alex Harui aha...@adobe.com wrote: The profiler should be able to show you who is still referencing the objects. Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Jake Churchill *Sent:* Thursday, October 22, 2009 10:57 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] ArrayCollection of VO's Memory Leak?? Hi all, I have a charting application where I have an ArrayCollection of VO's. The chart has several series, each looking at one property in the VO. There are several controls that when changed, require a re-calculation of the VO's in the ArrayCollection. Before I do the re-calculation, I call .removeAll() on the ArrayCollection and re-populate it with new VO's. When I run the profiler, my VO instances grow with each re-calculation. So, why doesn't the garbage collector take care of the objects that got removed from the ArrayCollection? How can I fix this? Please help. Thanks! -Jake
[flexcoders] Re: Question?? Best method for plotting a Moving Average
answer.net SQL database through Web services call to Flex.../answer... would like to create a new Array based on existing Array of Ticker data.. So I need to create a new Array Collection then loop through and add the date from the Tickers Array Collection along with the Moving 20 day average of the Close Price... THEN ( I have not mentioned this ) What I REALLY want is a Standard Deviation Calcuation against the Moving Average to plot Upper and Lower Bollinger Bands Here's my initial guesstimate at building the new 20 Day Moving Average Array Collection from the Existing Array_Tickers ArrayCollection [Bindable] public var Array_BBands:ArrayCollection; (new mov avg Ac) public function bld_Array_BBands():void { Array_BBands = new ArrayCollection; for (var i:int=0;iArray_Tickers.length;i++) \\ loop through existing Array_Tickers { Array_BBands.addItem(Array_Tickers.getItemat(i).date); if (i=20) \\ start at 20th row - as Moving Avg is 20 day { var mavg_tick:Int = 0; \\ create variable to hold Moving Average mvag_tick = Array_Tickers.getItemAt(i).close.valueof(); \\ need to pick up the date of the Array_Tickers mvag_tick += Array_Tickers.getItemAt(i-1).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-2).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-3).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-4).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-5).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-6).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-7).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-8).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-9).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-10).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-11).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-12).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-13).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-14).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-15).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-16).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-17).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-18).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-19).close.valueof(); var mavg:Int = (mavg_tick/20); Array_BBands.addItem(mavg); } } } If that works ( and I have no idea if it will ) then I need to get the Standard Deviation calcualted somehow. Because the Formula for what I really want as previously stated is The Bollinger Bands formular or (MA+K*sigma) Moving Average (20 period) + or - depending if it's upper or lower (2 * sigma) Sigma is the Standard Deviation, and I am fairly certain that actionscript does not calculate the Standard Deviation, so I'll need to do that somehow and I have no idea how to do that... This is a lot for me, and I don't expect you or others have the answers but I need to get the Std Deviation caclulated from the Mean Value above and this is how to do that... http://en.wikipedia.org/wiki/Standard_Deviation I am not sure exactly the best way to proceed, but if anyone has a suggestions... I guess I would take the difference of each number in the series above form the mean, divide the sum of the numbers by the count (20) and take the square root. It's a brain teaser and I am working on it a piece at a time. If anyone has a shortcut I'd take it. --- In flexcoders@yahoogroups.com, jc_bad28 jc_ba...@... wrote: How are you receiving your price data to plot? Price feed? Static file? What you could do is create a function to loop through the array and perform the moving average calculation and add the result as an extra column in the array. Are you plotting the full historic price data set? If so, your MA will begin at the nth bar where n is your MA period setting. eg.. a 20 day MA won't start until the 20th day into the data set. If you're using a static dataset, you could do the calculation in Excel and then save the entire datset as XML and just bring that into flex and plot the MA from the existing values. --- In flexcoders@yahoogroups.com, cjsteury2 craigj@ wrote: Hi all,
Re: [flexcoders] Re: Question?? Best method for plotting a Moving Average
We do the same thing. See this screen shot: http://www.reynacho.com/wp-content/uploads/2009/05/cse-charting.jpg There's a lot more than just a moving average and bollinger bands there but those are parts of it. In order to get this data, we first tapped into a feed which you have to pay good money for. I believe we are using NxCore which I think is a DTN product. You might look into that but I know there are others as well. For the data, we pass data into a java library called ta-lib: http://ta-lib.org/ It has methods for moving averages, deviations, etc. We found that the calculations for our app were simply too intense to be done on the client. But, we have 5-7 years worth of data that we are looking at for calculations so you might not run into the same bottleneck we had -Jake On Fri, Oct 23, 2009 at 11:49 AM, cjsteury2 cra...@steury.com wrote: answer.net SQL database through Web services call to Flex.../answer... would like to create a new Array based on existing Array of Ticker data.. So I need to create a new Array Collection then loop through and add the date from the Tickers Array Collection along with the Moving 20 day average of the Close Price... THEN ( I have not mentioned this ) What I REALLY want is a Standard Deviation Calcuation against the Moving Average to plot Upper and Lower Bollinger Bands Here's my initial guesstimate at building the new 20 Day Moving Average Array Collection from the Existing Array_Tickers ArrayCollection [Bindable] public var Array_BBands:ArrayCollection; (new mov avg Ac) public function bld_Array_BBands():void { Array_BBands = new ArrayCollection; for (var i:int=0;iArray_Tickers.length;i++) \\ loop through existing Array_Tickers { Array_BBands.addItem(Array_Tickers.getItemat(i).date); if (i=20) \\ start at 20th row - as Moving Avg is 20 day { var mavg_tick:Int = 0; \\ create variable to hold Moving Average mvag_tick = Array_Tickers.getItemAt(i).close.valueof(); \\ need to pick up the date of the Array_Tickers mvag_tick += Array_Tickers.getItemAt(i-1).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-2).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-3).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-4).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-5).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-6).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-7).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-8).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-9).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-10).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-11).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-12).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-13).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-14).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-15).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-16).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-17).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-18).close.valueof(); mvag_tick += Array_Tickers.getItemAt(i-19).close.valueof(); var mavg:Int = (mavg_tick/20); Array_BBands.addItem(mavg); } } } If that works ( and I have no idea if it will ) then I need to get the Standard Deviation calcualted somehow. Because the Formula for what I really want as previously stated is The Bollinger Bands formular or (MA+K*sigma) Moving Average (20 period) + or - depending if it's upper or lower (2 * sigma) Sigma is the Standard Deviation, and I am fairly certain that actionscript does not calculate the Standard Deviation, so I'll need to do that somehow and I have no idea how to do that... This is a lot for me, and I don't expect you or others have the answers but I need to get the Std Deviation caclulated from the Mean Value above and this is how to do that... http://en.wikipedia.org/wiki/Standard_Deviation I am not sure exactly the best way to proceed, but if anyone has a suggestions... I guess I would take the difference of each number in the series above form the mean, divide the sum of the numbers by the count (20) and take the square root. It's a brain teaser and I am working on it a piece at a time. If anyone has a shortcut I'd take it. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, jc_bad28 jc_ba...@... wrote: How are you receiving your price data to plot? Price feed? Static file? What you could do is create a function to loop through the array and perform the moving average calculation and add the result as an extra column in the array. Are you plotting the full historic price data set? If so, your MA will begin at the nth bar where n is your MA period setting. eg.. a 20 day MA won't start until the 20th day into the data set. If you're using a static dataset, you could do the calculation in Excel and then save the entire datset as XML and just bring
[flexcoders] Re: Best way to call SQL LAST_INSERT_ID through Zend Amf
My recommendation would be to return the record ID as the response to the call to save the record. If the save failed, you could return -1 and use that as a check. --- In flexcoders@yahoogroups.com, steveb805 mestev...@... wrote: Hi, I'm mostly a newbie and am writing a simple Flex app. So far, just a List box, where I am renderering a Checkbox and a :abel field, for a simple To-Do utility. I just added the Add New task functionality, and it's working fine, using the addItem method to add the new object to the List after saving the record to DB via ZendAmf. However it has occurred to me that I need to go back to the database immediately after, to get the record Id via ZendAmf so that the Flex List's new Item has the actual database id. Is it best practice you think to create a ValueObject class for just this integer - the task_id key field - or should I simply just use the existing Value Object for the entire object that represents an entire Task and obviously, just use the task_id field to pass it from db to flex. Steve
[flexcoders] Re: Daylight Savings Time issues from Flex to ColdFusion 8.01
Argh! Not what I was hoping to hear. I've been trying to figure out whether it's something with ColdFusion or Flex, but I guess it's Flex then. I guess we'll have to figure something out for now. I'm still interested to see if anyone's come up with a solution for this (I'll try the epoch idea and see if that changes anything). Thanks, --- In flexcoders@yahoogroups.com, Gregor Kiddie gkid...@... wrote: Join the club, we have T-Shirts (except it's passing Date from Flex to Java). The last communication we had with Adobe on the issue is that Flash Player on Windows doesn't handle Daylight savings times properly (at least in the UK, and a bunch of other regions in the bug), and it appears the same issue applies to AIR. What I'd love to see, is Adobe allowing us to turn off the daylight savings code completely, and let us handle it ourselves! Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@... From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of gareth_arch Sent: 22 October 2009 15:13 To: flexcoders@yahoogroups.com Subject: [flexcoders] Daylight Savings Time issues from Flex to ColdFusion 8.01 I am having some issues with DST when transferring a date from Flex to ColdFusion.
[flexcoders] Re: Delay / Pause between script executions
Here is a simple example: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=onCreationComplete() mx:Script ![CDATA[ private var labelTimer:Timer; private var messages:Array = [This is my first message, This is my second message, This is my last message]; private function onCreationComplete():void { labelTimer = new Timer(5000); // 5 Seconds labelTimer.addEventListener(TimerEvent.TIMER, labelTimerTriggered); labelTimer.start(); } private function labelTimerTriggered(event:TimerEvent):void { timerLabel.text = messages[labelTimer.currentCount % messages.length]; } ]] /mx:Script mx:Label id=timerLabel text=This is my first message/ /mx:Application HTH Steve --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Hi Flexcoders, I know this may sound very elementary but I cannot figure the hell out of me how to achieve this. I have a label control. I want to display different messages after every 5 seconds, such as: myLabel.text = This is my first message // Need to delay for about 5 seconds here myLabel.text = This is my second message // Need to delay for about 5 seconds here myLabel.text = This is my last message I cannot figure out how to properly use the pause or timer utilities in achieving this. Any idea would be appreciated. Thanks. Regards, Angelo
[flexcoders] Does DataGroup support XML?
I am converting my Repeater code to DataGroup code and it doesn't appear to support XML in the dataProvider. Does it support XML or is it something I'm doing? Here is the error message: TypeError: Error #1034: Type Coercion failed: cannot convert xmll...@505bb7e9 to mx.collections.IList. Here is the code: !-- An item renderer function can be defined in order to display a mix of data and graphical items. -- s:DataGroup itemRenderer=CommentItemRenderer x=10 y=140 dataProvider={XML(content1.lastResult).posts.post} s:layout s:VerticalLayout/ /s:layout /s:DataGroup Thanks
[flexcoders] DividedBox without thumb
I don't suppose there's a simple way to get a divided box with no thumb, and no apparent gap. I'm looking for the appearance of a grid (one row) with the resize cursor on the lines between cells. It looks as though I would have to replace the dividerskin with one which drew a line, rather than use a left border of one the contained components.
Re: [flexcoders] Re: Delay / Pause between script executions
Hi Steve, Thanks for the sample code. I was able to come up with something quite similar to what you have posted. One question still remains, though. I tried to issue a timer.stop() command when for example, all the text values have been displayed in the label control, but the timer event does not seem to stop. How to specifically stop the timer once all the messages have been displayed? Thanks. Angelo From: valdhor valdhorli...@embarqmail.com To: flexcoders@yahoogroups.com Sent: Saturday, 24 October, 2009 2:07:16 Subject: [flexcoders] Re: Delay / Pause between script executions Here is a simple example: ?xml version=1.0 encoding=utf- 8? mx:Application xmlns:mx=http: //www.adobe. com/2006/ mxml layout=vertical creationComplete= onCreationCompl ete() mx:Script ![CDATA[ private var labelTimer:Timer; private var messages:Array = [This is my first message, This is my second message, This is my last message]; private function onCreationComplete( ):void { labelTimer = new Timer(5000); // 5 Seconds labelTimer.addEvent Listener( TimerEvent. TIMER, labelTimerTriggered ); labelTimer.start( ); } private function labelTimerTriggered (event:TimerEven t):void { timerLabel.text = messages[labelTimer .currentCount % messages.length] ; } ]] /mx:Script mx:Label id=timerLabel text=This is my first message/ /mx:Application HTH Steve --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi Flexcoders, I know this may sound very elementary but I cannot figure the hell out of me how to achieve this. I have a label control. I want to display different messages after every 5 seconds, such as: myLabel.text = This is my first message // Need to delay for about 5 seconds here myLabel.text = This is my second message // Need to delay for about 5 seconds here myLabel.text = This is my last message I cannot figure out how to properly use the pause or timer utilities in achieving this. Any idea would be appreciated. Thanks. Regards, Angelo
[flexcoders] Re: Disable sort when values in grid change (on propertyChanged)
Unfortunately scrolling is pretty important :) so is my only option to reset dataProvider with new sorted collection? --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Try blocking the collectionEvent. It will have kind = CollectionEventKind.REFRESH. Note that any scrolling will be incorrect since it will use the new sort order. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of tntomek Sent: Thursday, October 22, 2009 5:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Disable sort when values in grid change (on propertyChanged) I don't want my grid reordering itself on every propertyChanged event that would cause the sort order to change, can I prevent this somehow? I understand this is default behavior but it's not an option for our customer, and it is really annoying when the 1000 row grid is re-ordered every time user changes any values, not to mention slow. I tried returning 0 from sortComparer with no luck, grid still seems to reorder itself according to original data provider and not the sorted view when sort() was set. Specifically using AdvancedDataGrid and I'm starting to run out of ideas. Do I reset the dataprovider every time I decide to change my sort? I'm already intercepting headerRelease and setting sort explicitly as well as calling sort from controls outside the grid. How would I get the currently sorted list from my ArrayCollection, does the baseclass CollectionView have a current sorted view? Is there really no way to take a snapshot or current view and set it to current? Is there a way to tell sort() to physically move the rows instead of maintaining a view? What I found online: http://www.actionscript.org/forums/showthread.php3?t=199554 Not an option since grid is sortable, I just want to suppress the updates AFTER initial sort
Re: [flexcoders] Search Suggestion
You're probably looking for AutoSuggest.. One example: http://sherifabdou.com/2008/03/autosuggest-flex/ http://www.sherifabdou.com/FlexAIRExamples/AutoSuggest/AutoSuggestExample.swf And another one: http://elromdesign.com/blog/Flex/API/AutoSuggest/ http://elromdesign.com/blog/2008/02/15/autosuggest/ Hope the links provided helps. Regards, Angelo From: Wiznu Prabowo weeshperb...@yahoo.com To: flexcoders@yahoogroups.com Sent: Thursday, 22 October, 2009 10:00:26 Subject: [flexcoders] Search Suggestion Hi All, I am new in flex, but have several years experience with coldfusion. anyone have a source/tutorial about making Search Suggestion, it will shows up into the selectable list, the suggestion of word/token we looking for, just like the one we found in facebook or google. Thanks for your help, prabowo
Re: [flexcoders] Re: Delay / Pause between script executions
Angelo, The source code on this post provides a means to setup recurring timed events. In fact, the sample does exactly what you describe (updating a label every 5 seconds). Timers in your app... there can be only one. http://www.quilix.com/node/65 Cheers, Rick Winscot www.quilix.com On 10/23/09 3:23 PM, Angelo Anolin angelo_ano...@yahoo.com wrote: Hi Steve, Thanks for the sample code. I was able to come up with something quite similar to what you have posted. One question still remains, though. I tried to issue a timer.stop() command when for example, all the text values have been displayed in the label control, but the timer event does not seem to stop. How to specifically stop the timer once all the messages have been displayed? Thanks. Angelo From: valdhor valdhorli...@embarqmail.com To: flexcoders@yahoogroups.com Sent: Saturday, 24 October, 2009 2:07:16 Subject: [flexcoders] Re: Delay / Pause between script executions Here is a simple example: ?xml version=1.0 encoding=utf- 8? mx:Application xmlns:mx=http: //www.adobe. com/2006/ mxml layout=vertical creationComplete= onCreationCompl ete() mx:Script ![CDATA[ private var labelTimer:Timer; private var messages:Array = [This is my first message, This is my second message, This is my last message]; private function onCreationComplete( ):void { labelTimer = new Timer(5000); // 5 Seconds labelTimer.addEvent Listener( TimerEvent. TIMER, labelTimerTriggered ); labelTimer.start( ); } private function labelTimerTriggered (event:TimerEven t):void { timerLabel.text = messages[labelTimer .currentCount % messages.length] ; } ]] /mx:Script mx:Label id=timerLabel text=This is my first message/ /mx:Application HTH Steve --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi Flexcoders, I know this may sound very elementary but I cannot figure the hell out of me how to achieve this. I have a label control. I want to display different messages after every 5 seconds, such as: myLabel.text = This is my first message // Need to delay for about 5 seconds here myLabel.text = This is my second message // Need to delay for about 5 seconds here myLabel.text = This is my last message I cannot figure out how to properly use the pause or timer utilities in achieving this. Any idea would be appreciated. Thanks. Regards, Angelo
RE: [flexcoders] Re: Disable sort when values in grid change (on propertyChanged)
You could implement some sort of a transaction system where changes are queued to temporary places until committed. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of tntomek Sent: Friday, October 23, 2009 12:30 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Disable sort when values in grid change (on propertyChanged) Unfortunately scrolling is pretty important :) so is my only option to reset dataProvider with new sorted collection? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aha...@... wrote: Try blocking the collectionEvent. It will have kind = CollectionEventKind.REFRESH. Note that any scrolling will be incorrect since it will use the new sort order. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of tntomek Sent: Thursday, October 22, 2009 5:46 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Disable sort when values in grid change (on propertyChanged) I don't want my grid reordering itself on every propertyChanged event that would cause the sort order to change, can I prevent this somehow? I understand this is default behavior but it's not an option for our customer, and it is really annoying when the 1000 row grid is re-ordered every time user changes any values, not to mention slow. I tried returning 0 from sortComparer with no luck, grid still seems to reorder itself according to original data provider and not the sorted view when sort() was set. Specifically using AdvancedDataGrid and I'm starting to run out of ideas. Do I reset the dataprovider every time I decide to change my sort? I'm already intercepting headerRelease and setting sort explicitly as well as calling sort from controls outside the grid. How would I get the currently sorted list from my ArrayCollection, does the baseclass CollectionView have a current sorted view? Is there really no way to take a snapshot or current view and set it to current? Is there a way to tell sort() to physically move the rows instead of maintaining a view? What I found online: http://www.actionscript.org/forums/showthread.php3?t=199554 Not an option since grid is sortable, I just want to suppress the updates AFTER initial sort
RE: [flexcoders] ArrayCollection of VO's Memory Leak??
Double click on the object and it should show you all references to that object. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Jake Churchill Sent: Friday, October 23, 2009 9:30 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] ArrayCollection of VO's Memory Leak?? Where do you go to see that? All I can see is the number of instances an object has and the memory those instances take up? On Fri, Oct 23, 2009 at 1:10 AM, Alex Harui aha...@adobe.commailto:aha...@adobe.com wrote: The profiler should be able to show you who is still referencing the objects. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of Jake Churchill Sent: Thursday, October 22, 2009 10:57 AM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] ArrayCollection of VO's Memory Leak?? Hi all, I have a charting application where I have an ArrayCollection of VO's. The chart has several series, each looking at one property in the VO. There are several controls that when changed, require a re-calculation of the VO's in the ArrayCollection. Before I do the re-calculation, I call .removeAll() on the ArrayCollection and re-populate it with new VO's. When I run the profiler, my VO instances grow with each re-calculation. So, why doesn't the garbage collector take care of the objects that got removed from the ArrayCollection? How can I fix this? Please help. Thanks! -Jake
[flexcoders] Re: Delay / Pause between script executions
Two ways 1. Add the repeat count parameter to the constructor: labelTimer = new Timer(5000, messages.length); 2. A little math is required (Arrays are zero based and the first event triggered will have a count of 1. We need to take that into account): ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=onCreationComplete() mx:Script ![CDATA[ private var labelTimer:Timer; private var messages:Array = [This is my first message, This is my second message, This is my last message]; private function onCreationComplete():void { labelTimer = new Timer(1500); labelTimer.addEventListener(TimerEvent.TIMER, labelTimerTriggered); labelTimer.start(); } private function labelTimerTriggered(event:TimerEvent):void { if(labelTimer.currentCount messages.length - 1) { labelTimer.stop(); } timerLabel.text = messages[(labelTimer.currentCount - 1) % messages.length]; } ]] /mx:Script mx:Label id=timerLabel/ /mx:Application --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Hi Steve, Thanks for the sample code. I was able to come up with something quite similar to what you have posted. One question still remains, though. I tried to issue a timer.stop() command when for example, all the text values have been displayed in the label control, but the timer event does not seem to stop. How to specifically stop the timer once all the messages have been displayed? Thanks. Angelo From: valdhor valdhorli...@... To: flexcoders@yahoogroups.com Sent: Saturday, 24 October, 2009 2:07:16 Subject: [flexcoders] Re: Delay / Pause between script executions Here is a simple example: ?xml version=1.0 encoding=utf- 8? mx:Application xmlns:mx=http: //www.adobe. com/2006/ mxml layout=vertical creationComplete= onCreationCompl ete() mx:Script ![CDATA[ private var labelTimer:Timer; private var messages:Array = [This is my first message, This is my second message, This is my last message]; private function onCreationComplete( ):void { labelTimer = new Timer(5000); // 5 Seconds labelTimer.addEvent Listener( TimerEvent. TIMER, labelTimerTriggered ); labelTimer.start( ); } private function labelTimerTriggered (event:TimerEven t):void { timerLabel.text = messages[labelTimer .currentCount % messages.length] ; } ]] /mx:Script mx:Label id=timerLabel text=This is my first message/ /mx:Application HTH Steve --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi Flexcoders, I know this may sound very elementary but I cannot figure the hell out of me how to achieve this. I have a label control. I want to display different messages after every 5 seconds, such as: myLabel.text = This is my first message // Need to delay for about 5 seconds here myLabel.text = This is my second message // Need to delay for about 5 seconds here myLabel.text = This is my last message I cannot figure out how to properly use the pause or timer utilities in achieving this. Any idea would be appreciated. Thanks. Regards, Angelo
Re: [flexcoders] ArrayCollection of VO's Memory Leak??
Ah, for anyone else curious, you have to take a memory snapshot before this will work On Fri, Oct 23, 2009 at 3:06 PM, Alex Harui aha...@adobe.com wrote: Double click on the object and it should show you all references to that object. Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Jake Churchill *Sent:* Friday, October 23, 2009 9:30 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] ArrayCollection of VO's Memory Leak?? Where do you go to see that? All I can see is the number of instances an object has and the memory those instances take up? On Fri, Oct 23, 2009 at 1:10 AM, Alex Harui aha...@adobe.com wrote: The profiler should be able to show you who is still referencing the objects. Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Jake Churchill *Sent:* Thursday, October 22, 2009 10:57 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] ArrayCollection of VO's Memory Leak?? Hi all, I have a charting application where I have an ArrayCollection of VO's. The chart has several series, each looking at one property in the VO. There are several controls that when changed, require a re-calculation of the VO's in the ArrayCollection. Before I do the re-calculation, I call .removeAll() on the ArrayCollection and re-populate it with new VO's. When I run the profiler, my VO instances grow with each re-calculation. So, why doesn't the garbage collector take care of the objects that got removed from the ArrayCollection? How can I fix this? Please help. Thanks! -Jake
[flexcoders] Modules Loading in same domain
Afternoon, I realize my chances of getting this answered will go down really quick as Friday evening rolls around but working late tonight so really could use some help. I am loading modules using ModuleLoader. Loading fine through Flexbuilder. Loading fine when double click on host.swf when locating host.swf in project folder/bin. When moving files (both host.swf and rendered *.swf) to XAMPP I can no longer load module. If this is a domain issue (even though both are local) how do I change/resolve this? Thanks, Terry
[flexcoders] Copy or enumerate a CSSStyleDeclaration? (Flex 3.4)
I have a custom class that extends Canvas. I'd like this class to have the default styles used by Canvas, plus my own default styles. So I want to get the Canvas CSSStyleDeclaration and copy its properties to a new CSSStyleDeclaration used by my own component (then add my own stuff). I can't see a way to walk through the CSSStyleDeclaration and copy its properties or to separate out the instance so I don't affect all Canvases in the project. Any ideas? Thanks; Amy
[flexcoders] Re: Does DataGroup support XML?
For future reference XMLList needs to be wrapped in XMLListCollection: !-- An item renderer function can be defined in order to display a mix of data and graphical items. -- s:DataGroup itemRenderer=CommentItemRenderer x=10 y=140 width=100% dataProvider={new XMLListCollection(XML(content1.lastResult).posts.post)} s:layout s:VerticalLayout gap=10/ /s:layout /s:DataGroup On Fri, Oct 23, 2009 at 1:07 PM, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com wrote: I am converting my Repeater code to DataGroup code and it doesn't appear to support XML in the dataProvider. Does it support XML or is it something I'm doing? Here is the error message: TypeError: Error #1034: Type Coercion failed: cannot convert xmll...@505bb7e9 to mx.collections.IList. Here is the code: !-- An item renderer function can be defined in order to display a mix of data and graphical items. -- s:DataGroup itemRenderer=CommentItemRenderer x=10 y=140 dataProvider={XML(content1.lastResult).posts.post} s:layout s:VerticalLayout/ /s:layout /s:DataGroup Thanks
[flexcoders] Re: Copy or enumerate a CSSStyleDeclaration? (Flex 3.4)
--- In flexcoders@yahoogroups.com, droponrcll amyblankens...@... wrote: I have a custom class that extends Canvas. I'd like this class to have the default styles used by Canvas, plus my own default styles. So I want to get the Canvas CSSStyleDeclaration and copy its properties to a new CSSStyleDeclaration used by my own component (then add my own stuff). I can't see a way to walk through the CSSStyleDeclaration and copy its properties or to separate out the instance so I don't affect all Canvases in the project. Never mind. Found it in the code to CSSStyleDeclaration.
RE: [flexcoders] Re: Does DataGroup support XML?
In Flex 4/Spark, the dataProvider contract is limited to IList implementations (the Flex framework provides several IList implementations straight out of the box like ArrayCollection, ArrayList, XMLListCollection, XMLList, etc). We decided to do this to reduce complexity which in our dataProvider-aware controls. As part of this, we now don't auto-wrap raw data like Array or XML into ArrayCollections or XMLListCollections, which is why you need to do that manually. Cheers, Deepa Subramaniam Flex SDK Engineer From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of dorkie dork from dorktown Sent: Friday, October 23, 2009 3:26 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Does DataGroup support XML? For future reference XMLList needs to be wrapped in XMLListCollection: !-- An item renderer function can be defined in order to display a mix of data and graphical items. -- s:DataGroup itemRenderer=CommentItemRenderer x=10 y=140 width=100% dataProvider={new XMLListCollection(XML(content1.lastResult).posts.post)} s:layout s:VerticalLayout gap=10/ /s:layout /s:DataGroup On Fri, Oct 23, 2009 at 1:07 PM, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.commailto:dorkiedorkfromdorktown%40gmail.com wrote: I am converting my Repeater code to DataGroup code and it doesn't appear to support XML in the dataProvider. Does it support XML or is it something I'm doing? Here is the error message: TypeError: Error #1034: Type Coercion failed: cannot convert xmll...@505bb7e9 to mx.collections.IList. Here is the code: !-- An item renderer function can be defined in order to display a mix of data and graphical items. -- s:DataGroup itemRenderer=CommentItemRenderer x=10 y=140 dataProvider={XML(content1.lastResult).posts.post} s:layout s:VerticalLayout/ /s:layout /s:DataGroup Thanks
[flexcoders] Free Flash :-D
Any Adobe people out there to answer this? I am lucky to work for a University and recieved a free copy of Flex Builder 3. Will there be a same program for Flash Builder 4 and/or Flash Catalyst? Just wondering. Heard a rumor from my Adobe contact about Flash Builder, but was wondering if anyone else heard anything or about Catslyst. Thanks!
Re: [flexcoders] Free Flash :-D
Not directly helpful, but they did make Flex Builder 3 pretty much immediately available to universities (staff and students) once it was released. I had to re-register though, so I have a key for FB2 and FB3. So if history is anything to go by... fingers crossed P.S. I was surprised to find out that commercial use of that license is allowed; that's unlike other Adobe academically-priced products. Two thumbs up. 2009/10/24 Wally Kolcz wko...@isavepets.com: Any Adobe people out there to answer this? I am lucky to work for a University and recieved a free copy of Flex Builder 3. Will there be a same program for Flash Builder 4 and/or Flash Catalyst? Just wondering. Heard a rumor from my Adobe contact about Flash Builder, but was wondering if anyone else heard anything or about Catslyst. Thanks! -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Re: Does DataGroup support XML?
Thanks On Fri, Oct 23, 2009 at 6:19 PM, Deepa Subramaniam dsubr...@adobe.comwrote: In Flex 4/Spark, the dataProvider contract is limited to IList implementations (the Flex framework provides several IList implementations straight out of the box like ArrayCollection, ArrayList, XMLListCollection, XMLList, etc). We decided to do this to reduce complexity which in our dataProvider-aware controls. As part of this, we now don’t auto-wrap raw data like Array or XML into ArrayCollections or XMLListCollections, which is why you need to do that manually. Cheers, Deepa Subramaniam Flex SDK Engineer *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *dorkie dork from dorktown *Sent:* Friday, October 23, 2009 3:26 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Does DataGroup support XML? For future reference XMLList needs to be wrapped in XMLListCollection: !-- An item renderer function can be defined in order to display a mix of data and graphical items. -- s:DataGroup itemRenderer=CommentItemRenderer x=10 y=140 width=100% dataProvider={new XMLListCollection(XML(content1.lastResult).posts.post)} s:layout s:VerticalLayout gap=10/ /s:layout /s:DataGroup On Fri, Oct 23, 2009 at 1:07 PM, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com dorkiedorkfromdorktown%40gmail.com wrote: I am converting my Repeater code to DataGroup code and it doesn't appear to support XML in the dataProvider. Does it support XML or is it something I'm doing? Here is the error message: TypeError: Error #1034: Type Coercion failed: cannot convert xmll...@505bb7e9 to mx.collections.IList. Here is the code: !-- An item renderer function can be defined in order to display a mix of data and graphical items. -- s:DataGroup itemRenderer=CommentItemRenderer x=10 y=140 dataProvider={XML(content1.lastResult).posts.post} s:layout s:VerticalLayout/ /s:layout /s:DataGroup Thanks
Re: [flexcoders] Free Flash :-D
I'm not sure what we're doing with Catalyst, but Builder will maintain it (you'll have to re-register). Matt On Oct 23, 2009, at 4:29 PM, Wally Kolcz wrote: Any Adobe people out there to answer this? I am lucky to work for a University and recieved a free copy of Flex Builder 3. Will there be a same program for Flash Builder 4 and/or Flash Catalyst? Just wondering. Heard a rumor from my Adobe contact about Flash Builder, but was wondering if anyone else heard anything or about Catslyst. Thanks! -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * 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:flexcoders-dig...@yahoogroups.com mailto:flexcoders-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: flexcoders-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[SOLVED] - [flexcoders] Re: Delay / Pause between script executions
Hi Steve, That got it quick and easy. Thanks a lot. Marking as solved. Regards, Angelo From: valdhor valdhorli...@embarqmail.com To: flexcoders@yahoogroups.com Sent: Saturday, 24 October, 2009 4:11:35 Subject: [flexcoders] Re: Delay / Pause between script executions Two ways 1. Add the repeat count parameter to the constructor: labelTimer = new Timer(5000, messages.length) ; 2. A little math is required (Arrays are zero based and the first event triggered will have a count of 1. We need to take that into account): ?xml version=1.0 encoding=utf- 8? mx:Application xmlns:mx=http: //www.adobe. com/2006/ mxml layout=vertical creationComplete= onCreationCompl ete() mx:Script ![CDATA[ private var labelTimer:Timer; private var messages:Array = [This is my first message, This is my second message, This is my last message]; private function onCreationComplete( ):void { labelTimer = new Timer(1500); labelTimer.addEvent Listener( TimerEvent. TIMER, labelTimerTriggered ); labelTimer.start( ); } private function labelTimerTriggered (event:TimerEven t):void { if(labelTimer. currentCount messages.length - 1) { labelTimer.stop( ); } timerLabel.text = messages[(labelTime r.currentCount - 1) % messages.length] ; } ]] /mx:Script mx:Label id=timerLabel / /mx:Application --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi Steve, Thanks for the sample code. I was able to come up with something quite similar to what you have posted. One question still remains, though. I tried to issue a timer.stop() command when for example, all the text values have been displayed in the label control, but the timer event does not seem to stop. How to specifically stop the timer once all the messages have been displayed? Thanks. Angelo _ _ __ From: valdhor valdhorlists@ ... To: flexcod...@yahoogro ups.com Sent: Saturday, 24 October, 2009 2:07:16 Subject: [flexcoders] Re: Delay / Pause between script executions Here is a simple example: ?xml version=1.0 encoding=utf- 8? mx:Application xmlns:mx=http: //www.adobe. com/2006/ mxml layout=vertical creationComplete= onCreationCompl ete() mx:Script ![CDATA[ private var labelTimer:Timer; private var messages:Array = [This is my first message, This is my second message, This is my last message]; private function onCreationComplete( ):void { labelTimer = new Timer(5000); // 5 Seconds labelTimer.addEvent Listener( TimerEvent. TIMER, labelTimerTriggered ); labelTimer.start( ); } private function labelTimerTriggered (event:TimerEven t):void { timerLabel.text = messages[labelTimer .currentCount % messages.length] ; } ]] /mx:Script mx:Label id=timerLabel text=This is my first message/ /mx:Application HTH Steve --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi Flexcoders, I know this may sound very elementary but I cannot figure the hell out of me how to achieve this. I have a label control. I want to display different messages after every 5 seconds, such as: myLabel.text = This is my first message // Need to delay for about 5 seconds here myLabel.text = This is my second message // Need to delay for about 5 seconds here myLabel.text = This is my last message I cannot figure out how to properly use the pause or timer utilities in achieving this. Any idea would be appreciated. Thanks. Regards, Angelo