[flexcoders] Re: Hook/Event when Item Renderers visible in List?
Thanks for the responses. It would help if Adobe documented the "reuse" concept better in their ListBase class. The "reuse" concept may be better optimized for performance, but it causes issues for code that is still running after the change in data. For example, I'm using an HTTPService response to parse the data, but the response comes 2-3 itemrenderer data sets later. Could you suggest any workarounds? Thanks! --- In flexcoders@yahoogroups.com, "Tracy Spratt" wrote: > > Yep, and to follow on a bit: > > > > When working with data driven controls, like List, Tree, DataGrid, you > always work with the *underlying data*, almost never with the rendered UI > item instances. > > > > Do not attempt to create an interactive itemRenderer from scratch unless you > are an expert. Find an example, thare many, and modify it to fit your > needs. > > > > > > Tracy Spratt, > > Lariat Services, development services available > > _ > > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On > Behalf Of Tim Hoff > Sent: Wednesday, April 15, 2009 12:48 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Hook/Event when Item Renderers visible in List? > > > > > > > > > > Hi, > > There aren't any non-visible itemRenderers in a list; except for maybe > one extra at the bottom. ItemRenderers are recycled; meaning that they > are reused with just the data changing. When a list is scrolled, you > should be able to catch the data change in the set data method. > > -TH > > --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com, > "liu_bai_un" wrote: > > > > Looking for an event/hook where non-visible item renderers are made > visible. > > > > Item Renderers apparently don't respond to: > > 1. creationComplete (only works for the first group visible on list > creation) > > 2. override set data (same) > > >
[flexcoders] Hook/Event when Item Renderers visible in List?
Looking for an event/hook where non-visible item renderers are made visible. Item Renderers apparently don't respond to: 1. creationComplete (only works for the first group visible on list creation) 2. override set data (same)
[flexcoders] Re: Faster: Canvas Object move VS Graphics clear/redraw
I'm assuming the container doesn't have to redraw when the inside graphic is redrawn. Thanks a lot for the info. --- In flexcoders@yahoogroups.com, "Michael VanDaniker" <[EMAIL PROTECTED]> wrote: > > This feels like comparing apple and oranges. Can you provide a bit > more information about the complexity of your graphics calls and how > you're able to consider them as replacements to move operations? > > The little test I just ran seems to show that graphics operations are > faster than calls to move. This isn't all that surprising as > UIComponent.move has some conditionals and dispatches an event. Of > course, my test doesn't account for the actual rendering of anything > -- just the time it takes to execute the instructions to tell Flash > Player how to render. > > var d:Number = getTimer(); > var num:Number = 10; > var a:Number; > for(a = 0; a < num; a++) > { > button.move(Math.random() * 500,Math.random() * 500); > } > trace((getTimer() - d)) // Outputs ~1719 > > d = getTimer(); > for(a = 0; a < num; a++) > { > graphics.clear(); > graphics.lineStyle(1,0); > graphics.drawRect(0,0,Math.random() * 500,Math.random() * 500); > } > trace((getTimer() - d)) // Outputs ~257 >
[flexcoders] Faster: Canvas Object move VS Graphics clear/redraw
In terms of performance, is it faster to clear and redraw in vector graphics or move a Flex core component (Image/Canvas/Button)? Thanks!
[flexcoders] Video Seek - Seek times accurate to milliseconds
I'm trying to figure out how to get more accurate seek times (to milliseconds). I've been using the VideoDisplay and imported Flash's FLVPlayback component to Flex. For the reference video I'm using, I get about a 3-4 second accuracy, when the frame rate is at 30fps. >From my understanding, all video files loaded into Flex/AIR are considered progressive downloads, and therefore can only seek to keyframes*. I've been messing around with a couple ideas: - skipping to the previous keyframe, play, and pause on exact time - extending videoplayback/video class to take a "screenshot" of the frames in between - dynamically creating cuepoints for the video at 100 ms intervals It would be great if you guys comment on other suggestions or the feasiblility of the above solutions. * Just for reference, this is the javadocs for FLVPlayback.seek(): "Seeks to a given time in the file, specified in seconds, with a precision of three decimal places (milliseconds). For several reasons, the playheadTime property might not have the expected value immediately after you call one of the seek methods or set playheadTime to cause seeking. First, for a progressive download, you can seek only to a keyframe, so a seek takes you to the time of the first keyframe after the specified time. (When streaming, a seek always goes to the precise specified time even if the source FLV file doesn't have a keyframe there.) Second, seeking is asynchronous, so if you call a seek method or set the playheadTime property, playheadTime does not update immediately. To obtain the time after the seek is complete, listen for the seek event, which does not start until the playheadTime property has updated."
[flexcoders] HSlider Skinning Work-Around
My skin images are much larger than the default images so CSS embed doesn't work properly. I've successfully skinned and resized the thumb by extending SliderThumb and overloading measure, but the track is frustrating. I've tried tried overloading the Slider class and overloading the updateDisplayList, but I get a Stack Overflow error when I try to clear the display and add a Image Loader. Thanks for any insight.
[flexcoders] Flex Profiler: Charts and Graphs not equal?
I'm having some issues with an app that potentially may be hitting the memory allocation maximum. I'm trying to figure out if the issue is that I'm hitting the maximum container size, the maximum Flash Player cache, or the maximum Browser cache (Firefox is default at 50MB). Does someone have any insight regarding the frequency of these issues? Though the app's assets total to about 2-3 MB of pictures, the Flex Profiler has the peak memory at 63MB from the Memory Usage chart. What I am extremely confused about is that the (current) Memory in the Live Objects table totals to about 11,000 (I'm not sure what units (KB?)), which does not match the "Current Memory" reading on the Memory Usage chart at all. Thanks.