Actionscript :: Flex Forcing Smaller Redraw Regions

Jul 13, 2010

I've got a small action-script chart, that's meant to be live updating, and also be able to support more than 10000 points of data. The way it's currently set up it doesn't need to redraw the whole chart if the new line we wish to add doesn't extend that chart's boundaries. Yet it does, the redraw regions show the whole chart as being redrawn as opposed to the single line i need to add. When the chart gets a new piece of data from the javascript it does the following.(some stuff has been stripped for clarity.[code] Is there any better way to do that, that won't redraw the whole screen? Is my coding pattern wrong for this type of update?

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Flex Forcing App Children To Redraw On Resize?

May 19, 2010

Is there a simple way to force all the child components of a Flex app to redraw when that app is resized?

For instance, I have a HDividedBox with percentHeight and percentWidth set to 100. On the left hand side of the divided box is a data grid and on the right side is a number of text inputs. The divided box is not added to the view stack until after the user logs on.

If I resize the app before the HDividedBox is added then the box takes up the full size of the app, whatever that may be. However if i resize the app after the box appears then the box retains the same dimensions it does when it was first added.

I would have expected that on the resize of the app then all the children would redraw (the application component itself appears to).

View 1 Replies

ActionScript 2.0 :: Reducing Redraw Regions In Snow Effect?

Jan 18, 2011

I've been making a flash animation for a client - the dimensions of the stage are 2,000px wide, 800px tall. They want a graphic in the background and a snow effect in the foreground.

The code I have written uses TweenMax to move a snowflake that has been dynamically loaded from the library on to the stage using attachMovie. When the clip leaves the stage, it is deleted and a new clip is created at the top of the stage.

I expect flash to redraw the background that the flakes pass over, but flash seems to also be redrawing space between the flakes - as if they were one movieclip - even though they are separate instances.

View 7 Replies

Javascript :: Forcing Redraw Of Flash Content In IE 7?

Dec 19, 2011

I have an flash swf on a page loaded with object/embed tags.

<object width="565" height="300" >
<param name="movie" value="/swf/Sample-Elf.swf">
<param name="wmode" value="transparent">
<embed src="/swf/Sample-Elf.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" width="565" height="300"></embed>
</object>

I need to be able to start/stop or reload this swf with purely javascript as I don't have access to the source swf file to add any actionscript.I figured the easiest way to pull this off is by removing the element and replacing it forcing a redraw with would hince reload the swf movie. Though ie seams to cache the flash element and pretty much look over any updates I make to the embed/object tags and keeps right on going.So how do I force IE to redraw/update a flash element on a page?

View 1 Replies

ActionScript 3.0 :: Viewing The Same Html File In Mozilla, "Show Redraw Regions"?

Jan 4, 2010

I am working in Flash cs3. I am having problems with mozilla related to contextMenu.
 
Using contextMenu, i removed all BuiltInItems. Its working fine in IE.
 
when i am viewing the same html file in mozilla, "Show Redraw Regions" option is still visible when i am right clicking on browser. In IE, its fine.
 
How to remove this option in Mozilla.

View 3 Replies

Flex :: Diffrent Values Of Alpha For Different Regions Of A Sprite?

Feb 18, 2010

I have a Sprite covering the entire screen.Other than a certain rectangle of this sprite.I want the rest of the sprite to have alpha = 0.5. And for that particular rectangle, I want alpha = 0.

View 2 Replies

ActionScript 2.0 :: Photo Gallery - Make The Image Window Smaller And The Overall Movie Smaller?

Jun 25, 2004

I found this really neat photo gallery on flashkit but there is no support or readme included. how to size this thing.. the AS code does have comments but I am not a coder.I'd like to make the image window smaller and the overall movie smaller. 325x325 or so

View 10 Replies

Flex :: Flex Forcing Resizing When The Image Source Update Is Completed?

May 31, 2009

I have what seems a straighfoward situation: I update the source property of an image, when the image is loaded i want to redraw the border skin to fit the new size of the image.

newImgEdit.addEventListener(Event.COMPLETE, loadImgComplete);
newImgEdit.source = myurl_ressource;
private function loadImgComplete(evt:Event):void {

[Code]...

View 2 Replies

Flex :: Force Redraw On Component?

Jan 10, 2011

I have an app w/ a login screen. When the user hits "enter", the state changes to "login" & a child component is triggered to load (though the child stays invisible at the moment). The child contains many functions that the user needs upon logging in (ie their screenname & settings are retrieved from a database). The following is included in 'Parent':

<local:comp id="localComp" includeIn="login" includeInLayout="false" visible="false"/>
<mx:Button label="login" click="currentState='login'"/>
<mx:Button label="logout" click="currentState='Default'"/>

My problem is when a user logs out (state changes to 'Default') & then logs back in (state changes back to 'login') the child doesn't get "triggered" again & the functions w/in the child don't reload. Is there a way to force my child to refresh?

Note: While it would be easier to just move the child's functions to the parent it is complex...I moved these functions to the child to make it easier to follow

UPDATE: I even tried adding an "exitState" to my state:

<s:State name="login" exitState="removeElement(localComp)" />

This doesn't work either, as I get an error: "RangeError: Index 0 is out of range."

UPDATE: Even though you are allowed to call a child's function from a parent, my problem is that the child needs to be "created" in order to not show errors. It makes no sense to me why the flex team would make something like removing & adding children so complicated.

View 3 Replies

Flex :: Adobe - Redraw When Manually Scrolling?

May 11, 2010

I have two columns: the left one is a Canvas containing an mx:Tree and the right one is a Canvas containing a Canvas (to allow for scrolling) of some custom Sprites that go along with the tree nodes on the left. I made the right Canvas scrollable (horizontal and vertical) and I want the vertical scroll to also scroll the left Canvas so that the tree nodes line up with their representations on the right. The scrolling portion works fine and when I embed with wmode="window" there are no problems. Unfortunately, the customer requires dynamic HTML to overlap the Flash at times and when using wmode="opaque" or "transparent", there are issues. The scrolling still works, per se, but Flash does not seem to redraw either Canvas appropriately. The Canvases become out of sync and artifacts often remain on the right side.I catch a scroll event on the right column and update the scroll position on the left column like so:

public function onTimelineScroll(scrollEvent:ScrollEvent):void {
leftColumn.verticalScrollPosition = rightColumn.verticalScrollPosition;
}

[code].....

View 1 Replies

Flex :: Spark TitleWindow Bad Redraw On Dragging?

May 11, 2010

I have a problem with redrawing in flex 4. I have a spark titleWindow, and if i drag it faster, it looks like it's mask is one frame late after the component. it's easily visible with 1pixel thin border, because it becomes invisible even with slower movement.

You can try it here (what is not my page, but it's easier to show you here than uploading example):[URL]..

If you move in direction up, you see disappearing top border. in another directions it's not that sensitive as it has wide shadow, and it's not very visible on shadow. On my computer i see it on every spark TitleWindow i have found on google, although it's much less visible with less contrast skins, without borders or with shadows.

View 2 Replies

Flex :: Force Component To Redraw It's Focus?

Mar 23, 2011

Suppose I have a component and want to change it's focus color at runtime. Here's an example for you (I've excluded any buttons and such to prevent component from losing it's focus, cause in that case it changes it's color perfectly):

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="init()">
<mx:Script><![CDATA[
private function init():void {

[Code].....

What do I want: How to make this focus to be redrawn without magic (I've tried all the methods, starting with "validate", I've tried calling updateDisplayList() on entire application, I've tried to call styleChanged .

View 1 Replies

Flex :: Correctly Redraw UIComponent By ValidateNow()

Apr 20, 2011

I'm removing an UIComponent but parts of it last being visible. It redraws only when I move mouse around or something. I tried to do validateNow() on its parent, tried to do setTimeout(validateNow, 100) but it doesn't help. When I call it by setTimeout it seems these artifacts shown more rarely but it doesn't solve a problem in all cases. Please guide me someone to read about validateNow(), how it works and how to make these things correctly.

The code is below:

protected var bubble: SpeechBubble;
// creation
bubble = new SpeechBubble();

[Code]....

View 3 Replies

Flex :: Adobe Flex Layout Redraw

Aug 4, 2010

My flex application gets some parameters from URL when the application opens for the first time(ex: layout=<1,2,3,4> ). Based on layout(1,2,3,4) value I have to change the layout. However the problem is the application is already drawn(Layout is initialized) by the time the control reaches the point where it reads the values from the URL. I was wondering how can I redraw once I read the values from URL. Some thing like refresh.

View 1 Replies

Flex :: Forcing Extension On A File Name?

Jul 28, 2009

In flex when I allow user to download a file using :

dwFile = new FileReference();
dwFile.download(downloadURL, dwFileName);

Is there a way to ensure that the downloaded file always ends up with the extension .tar or any other extension for that matter? By default I give it a name like xyz.tar, but as of now the user can tamper with filename, including its extension. Can I prevent him from doing so?

View 1 Replies

Flex :: Capture Flash / Redraw DisplayObject Event?

Dec 20, 2010

I'm trying to capture the redraw event for some MovieClip / Sprite objects that are in a Scroll area.Ideally, should be able to capture the event when Flash Player itself redraws the objects as can be seen with "Show Redraw Regions" in FP Debug.I've tried to use the Event.RENDER to capture this, but it even fires when the object is not visible / redrawn.

View 1 Replies

Flex :: Forcing An Array To Contain Only A Specific Class?

Jan 16, 2010

I'm trying to create a class that contains an array. However i want to require that the items in the array are themselves of a specific class. Im told there is some sort of tag you can add to do this, but for the life of me i cannot find what it is.What i hope for is something like:

public class myClass{
public var foo:String;
[ArrayType(class="BarClass")]

[code]........

View 1 Replies

Flex :: Forcing Custom Item Renders To Refresh?

Jul 4, 2010

I have an AdvancedDataGrid. One of the columns in the grid displayed with help of custom render. During the application run, I set another custom render to the same column.When I scroll data in the grid (change values for the custom renders) they display new view correctly.I want that they dispaly new view automatically (when I set them): so I think I have to call them and tell tham to refresh rgeir views.

View 1 Replies

Flex :: Force A Tree Itemrenderer To Redraw During A Drag And Drop Operation?

Jun 11, 2010

I have a tree control with a custom item renderer. The item renderer has different states that should be set while an item is being dragged over the item renderer. I understand from reading this post [URL] that the 'right way' to do this is to override the 'getCurrentState' method and append some text. I do that.

Now in my tree control I handle the drag over event and get a reference to the itemrenderer that is being dragged over and I set the boolean 'dragOver' property to true. Now I just need to force my itemRenderer to redraw. I can't figure that out. A workaround, is to just set the currentState of the itemRenderer.

how can I force my itemRenderer to refresh? (and I've tried calling validateNow, invalideDisplayList/Properties/Size, to no avail)

<?xml version="1.0" encoding="utf-8"?>
<s:MXTreeItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[Code]....

View 1 Replies

Flex :: Forcing A Child Component To Resize Itself Larger Than Its Container?

Mar 29, 2010

I am creating a component that displays a variable amount of "gauges" (square tiles of content if you will), that is laid out like so:

<HDividedBox id="container">
<VBox id="myComponent">
<HBox id="header">

[code]...

View 1 Replies

Flex :: Forcing Screen Updates For A ProgressBar Attached To An URLLoader Or Slowing It Down

Oct 11, 2010

I have a ProgressBar in MANUAL mode responding an URLLoader's progress events that seems to get drawn far less frequently than I would like. If I debug the app, I can see many events firing from the URLLoader yet it seems that the ProgressBar is being re-drawn at some random and slow rate.

Now if this was my own code (URLLoader is a black box), I would pause once in a while to let the UI update, say via loop with a timer. I presume that the URLLoader itself is blocking the main thread from processing drawing code. Adding validateNow() and invalidateDisplayList() does not seem to help much.

private function onLoadProgress(resource: TResource, evt: ProgressEvent): void
{
_progressDialog.prbCurrentItem.setProgress(evt.bytesLoaded, evt.bytesTotal);
_progressDialog.prbCurrentItem.validateNow();
_progressDialog.prbCurrentItem.invalidateDisplayList();
}

Now there are many TResources (just a class that can manage its data) being loaded in sequence, but the URLLoader is so greedy that it does not let the UI get updated more than a few times when loading & processing (parsing into XML objects) 50 or so 10KB files. So just counting which files loaded visually does not work either; I'm lucky to get 2-3 screen updates the entire time.

Loading a 700MB file looks much better, but again the progress bar updates are random and slow.

Additionally, I'd like to know if there is any way to influence or even control the rate at which ProgressEvents are fired by the URLLoader class. I have not been able to find at what rate it normally dispatches progress events either; is it at a fixed percentage per file or every x frames or milliseconds?

As these are local files, would I be better off not using the URLLoader class and instead switching to FileStream?

View 1 Replies

Flex :: Catch Keyboard Events Without Forcing Users To Click On The Stage?

Nov 8, 2010

handling global keyboard events in Flex, is to attach a listener in the application complete event of a Flex application. However, no matter what I try, I have not been able to catch events without clicking on a point on the page, which is hosting my Flex application.
Moreoever, if I use a Flex component in a web application, where there is also html and Javascript, I'd still like to be able to grap global keyboard events, even if the embedded flex component (in flash player) does not have focus. So is there a reliable method for connecting flex applications and components (when they're embedded in a web page) to keyboard events?

View 1 Replies

Actionscript 3 :: Flex - Forcing JAWS To Read FLEX Content "on-demand"

Oct 20, 2010

I'm trying to make an existing FLEX application section-508-compliant, by getting it to work smoothly with the JAWS screen reader. It kinda sorta works, but one immediate problem is that when you first go to the login screen, your cursor ends up in the userid field, but JAWS doesn't read anything useful (like the label of the field you're in!) until you hit TAB or something. Is there a way to force it to speak immediately on application startup, without making the user tab/backtab just to hear where they are?

For that matter, as cool as it is that it reads interactive controls as the user tabs around, sometimes you just need to make JAWS say something at a particular point in the logic, which might or might not be associated with a conrol... as if you could write AS code like "jaws.speak('');".

View 1 Replies

Flex :: Why Is The Size Of Swf File Smaller Than The Sum Of It's Swc's

Jun 24, 2009

I compile my Flex application with several swc's (libraries) and it creates a swf file. The sum of the swc's is roughly 4 MB yet the actual swf generated is only 1.6 MB. How is this possible?

View 3 Replies

Flex :: Forcing Vertical Scrollbar Re-calcuation In A Hierarchical Tree Class Derived From Mx.controls?

Jun 28, 2011

I'm working (for my sins) on a Flex 3.3 project, which unfortunately cannot be upgraded to a newer SDK version at this stage, and have hit an issue with the custom hierarchical tree class (subclassing mx.controls.Tree) we're using. Excuse the spelling; the previous developer had a fear of dictionaries...

public class HierachyTree extends Tree
public function HierachyTree()
{[code].....

I'm using a solution somewhere between these two methods (basically, implementing ITreeDataDescriptor) in order to add live text filtering to the component, and it's working so far:

public class HierachyTreeFilteredDataDescriptor implements ITreeDataDescriptor
{
private var filter:Function[code]..........

The issue is that (with tree:HierachyTree) neither tree.maxVerticalScrollPosition nor the protected property tree.verticalScrollBar .maxScrollPosition updates when the search string is changed.I've tried calling invalidateList() and invalidateDisplayList() on tree — and calling invalidateDisplayList() and invalidateSize() on tree.verticalScrollBar — to no avail.

View 1 Replies

Actionscript 3 :: Flex Is Smaller Varialble Name Is Faster Then Longer Names?

May 21, 2010

We are in process of optimization of Flex AS3 Application.

One of my team member suggested us to make varible name length smaller to optimize the application performence.

i.e.var IsRegionSelected:Boolean = false; //Slower
var IsRS:Boolean = false; //faster

View 5 Replies

Flex - Function To Redraw Bitmap On Sprite Without Passing In Said Bitmap?

Feb 22, 2011

If I have a BitmapData that's already been drawn onto a Sprite. Is there a way to redraw the BitmapData onto a Sprites Graphics object without having to invoke beginBitmapFill and passing in the same BitmapData?

View 1 Replies

Flash :: Selecting Regions Of Image?

Jun 10, 2010

I am trying to write a flash app that will allow a user to select various regions of an image, similar to that of the selection tool in photoshop where a square region can be stretched and selected.
 
Would anyone have any ideas or tips for me that could get me going in the right direction? I have been researching for tools to help me write this but haven't been able to find anything useful..

View 5 Replies

ActionScript 3.0 :: Overlapping DrawRect() Regions 'exclude'?

May 7, 2009

Using Flash CS3 If I draw two overlapping rectangles with two different fill colors, I get the expected results.If I draw two overlapping rectangles with the same fill color, the overlapping region appears white, almost as if there were an exclusion blend applied. 

View 9 Replies

Professional :: White Regions When Running Movieclips

Feb 25, 2010

when we are running movieclips in flash for a few minutes, white regions or white artefacts will start to appear on the screen, and it will slowly grow in size.we have cleared the objects from memory, but these white regions are still coming.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved