Flex :: "Interesting" Flash Behavior Increasing Time To Draw 10,000 Triangles?

Nov 2, 2009

This is a test program to measure the time it takes Flash to draw a triangle 10,000 times.

The app (code below) calls runTimeTest() every N seconds which draws the triangle 10,000 times.

Now for the "interesting" part: each call takes increasingly more processor until after about the 6th or 7th call it goes to "infinity" (see screen shot of TaskManager)

[Code]...

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Increasing Time To Draw 10,000 Triangles

Nov 2, 2009

This is a test program to measure the time it takes Flash to draw a triangle 10,000 times. The app (code below) calls runTimeTest() every N seconds which draws the triangle 10,000 times. Now for the "interesting" part: each call takes increasingly more processor until after about the 6th or 7th call it goes to "infinity" (see screen shot of TaskManager) Weird bug or explainable??

[Code]..

View 6 Replies

ActionScript 3.0 :: Draw Simple Triangles In Existing Script?

Jun 10, 2009

I'm not that familiar with AS3 but I got a script from someone where some objects are drawn.I want to add several triangles so that each triangle can be dragged on the stage.

Code:
package app.simpleShapes {
import flash.events.TUIO;// allows to connect to touchlib/tbeta

[code]......

View 6 Replies

ActionScript 3.0 :: BitmapData Draw() Method - Draw The Bitmap On The Stage At Design Time?

Mar 18, 2009

I am using the draw() method of the BitmapData to encode a jpeg of part of the image. Now this should be easy enough given the object I want to draw to the bitmap is on the stage at design time so I know its location and dimetions exactly! Heres the code I have in place.

Code:
var myBitmapSource:BitmapData = new BitmapData ( street.width, street.height, false, 0x333333);
myBitmapSource.draw(street, null, null, null, new Rectangle( 96, 5, 571, 450 ), true );

I know for a FACT that no part of the street clip I am drawing out is in negative space, and it's registration is (0,0). However, it cuts off A lot of the top of my image. y=5 in the above rectangle is where I need the top to be, but it cuts the top off of the image... even if I change it to 0, it has no effect.

View 2 Replies

ActionScript 3.0 :: Mouseovers + One-time-only Behavior WITHOUT Mouse Action?

Nov 25, 2009

My file has four hexagons that normally get bigger or smaller in response to MOUSE_OVER and MOUSE_OUT behavior. Trouble is, when the file opens, I need one of them to expand independent of any user interaction, just the once, and reduce size whenever anything _else_ is moused over, just the once. Then the whole thing can go back to normal.

I'm trying to look through code examples, but I'm getting lost in people talking about packages and custom events and so forth that I don't understand (remember: designer here!). Can someone at least help me break down the concept?

This is what I have, which probably isn't the most succinct thing on earth but works for the mouseovers and for stacking the items properly, since they overlap a bit (the playHexIn and Outs just go to tweens iin the timelines of each hexagon, making them bigger or smaller):

Code:
var maxIndex:Number = this.numChildren - 1;
hex1.addEventListener(MouseEvent.MOUSE_OVER,sendToTop);
hex2.addEventListener(MouseEvent.MOUSE_OVER,sendToTop);[code]....

View 6 Replies

Flash :: Flex 4.6 Increasing Socket Receive Buffer Size?

Apr 5, 2012

I am having an issue with sockets where the data I'm sending is getting truncated on the client side (Flash/Flex). The data that is sent by my server is full and in tact, but flash does not wait the appropriate amount of time before firing an event saying to read the data. This results in the data not getting fully read and (as such) I can't parse the object out of it after that. We are exploring the possibility of stripping the object into smaller chunks, but the idea is for it to be as lightweight as possible so we would much rather get it to work the way it's supposed to than patch in a temporary solution.I'm not entirely sure if referring to it as the receive 'buffer' is correct, as some computers are able to receive all of the data and others are having it truncated (which means the buffer is adequate but flash isn't waiting the appropriate amount of time to dispatch the event for whatever the reason).

View 1 Replies

ActionScript 3.0 :: Flex / Flash Runtime Disparity In Interactive Behavior?

Mar 4, 2010

I have this function that fires upon clicks in a particular area of a component I've created:

PHP Code:

private function dispatchDragEvent(e:MouseEvent):void
{
switch (_targetType)

[code]....

For some reason when I test this in Flash it works fine, all traces come through. But in Flex, SDK3.5, when I run debug if _targetType is "assign" everything is fine, but if it is "correlate" that branch of the code fails at the hitTest conditionals. It will trace "should execute one of these", but then nothing else happens. So it's like for some reason Flash is OK with the conditional code, but Flex is not cool with it, and doesn't report anything as to why...

View 1 Replies

Actionscript 3 :: Making Interesting Flash Based Game?

Mar 25, 2011

how to make a interesting flash based game?

View 1 Replies

Real Time - Draw Candle Graph Using Open Flash Chart?

Nov 24, 2010

I want to draw stock price in real time as a candle graph. I get open flash chart from someone and it looks good at drawing. I don't know how to update the candle graph in real time (using Ajax?), and is it a good way? I use Python a lot. But I cannot find tools as easily to use as OFC.

View 3 Replies

ActionScript 2.0 :: 3D With Flash - Make Rotating Squares Or Triangles?

Jan 25, 2002

what's the main idea behind 3D in Flash. I mean, I've seen a lot of scripts to make rotating squares or triangles or whatever, but never managed to understand how they were made.

View 14 Replies

Flex :: Increasing The Width Of DropdownList?

Apr 15, 2011

I want to adjust the width of DropDownList control in flex 4. I could do it by editing the skinclass and setting the PopupAnchor's Property "popUpWidthMatchesAnchorWidth" to false, but in my application I have to do it using actionscript.

View 3 Replies

Flex :: Override The Behavior Of The Tab-key Event?

Jan 25, 2010

I have two datagrids and I want to override the behavior of the tab-key event, so that it goes to the next datagrid, when the cursor reaches the end of the first datagrid columns.

View 2 Replies

Flex :: AdvancedDataGrid ListItems Different Behavior?

Feb 20, 2012

I have the following XML, that is the dataprovider (as a Hierarchicaldata) of an Advanced DataGrid:

public var reqData:XML = <root>
<Requirement ID="REQ-GEN-0.1" title="exigence gen 1" description="blabla 01" testable="true"/>
<RequirementSet ID="GUI REQ">

[code]....

View 1 Replies

Flex - OS Like Behavior When Edditing A Tree Item?

Jan 20, 2010

I have a Tree Control inside my Flex Application which I want to edit on a doubleclick on a tree item. I found the properties doubleClickEnabled="true", doubleClick="startEditMode()", and editable="true". With these functions I can detect a double click and I can change the editable property to true based on a double click. The problem is that after I double clicked on a Item i have to click once more to really enter the edit mode. That doesn't seem to be intuitive at all

[Code]...

View 1 Replies

Flex :: Strange CallLater X Position Behavior?

Feb 25, 2010

I'm not sure exactly where this is happening, but what I'm trying to do is make a scrolling ticker using flex, and it works fine when there is one of them on the screen, but when there are two, strange things happen.The way I have designed this for live updating, when the child of my hbox goes off the screen, I remove it and add another child to the end of it.This happens to reset the X position of the hbox, which isn't too bad, but it also resets the X position of any other hbox I have on the screen.Here is code that demonstrates what I'm seeing:

To use this, run the flex program, then click in the first hbox to set its x position to your mouseX. When the x position of the second hbox (hbox3) is reset, so will the first hbox's (hbox2) X position.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application creationComplete="addToBoxes()" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" >
<mx:Script>[code]..............

How can I prevent this from happening, or what is a better way to make an updating ticker like I am trying to do?

View 1 Replies

Flex :: Avoid The Behavior Of Set HtmlText In RichTextEditor?

Feb 21, 2011

I'm having this problem of adding an image to the textArea in RichTextEditor (RTE) on the fly and this image seems to "reset" the html properties of the textArea.
Better explained:

The user starts writing something in the TextArea (with Verdana in size:12 font settings). When he adds an image to the text area, the cursor right after the image gets very small and the font settings are reset to HUM777B in size:2.

How could I avoid this behavior?

It seems Flex adds additional HTML code before the image tag. If there was any way to avoid this I would be able to add my own settings to the tags.

View 1 Replies

Ios :: Way To Get Swf Behavior On IPad Via Adobe Flex IOS Packager

Dec 9, 2011

I build Flex applications. One of them shows slides.They're swf's loaded dynamically from a remote server at run-time.My slides are both re-sizable by the end user and animated.This is easy on the PC with all the Flash support.For the iPad I use the Adobe Flex IOS packager.Gets me just about everything I need - except swf's dynamically loaded at run-time.Apple's terms of service do not support it.So I'm relegated to flattening slides into static images which don't scale well when users re-size them and obviously don't show animations.

If I built a native IOS app with XCode I could probably achieve this with KeyNote or something alike.Don't have the time or resources.Has anyone knowledge of a sneaky way to achieve this aesthetic via the Flex IOS packager? Is there some inventive way to sneak swf's in or use another image format like animated gif's or something else I'm not thinking of that might scale well?

View 1 Replies

ActionScript 3.0 :: Interesting - Looking For Answers?

Sep 21, 2009

I've created an entire website from one .swf. No dynamic loading of other .swfs, or external content etc. Simply a few different buttons that navigate to different frame-labeled areas of the .swf via gotoAndPlay, etc. There are 8 different "areas" of the timeline to go to, each with it's own set of movie clips for that area.

As far as I know, the website works great on all computers and browsers with current Flash players. But I got a call from one of the owners of the business I created the site for and he's having an interesting problem: The preloader completes and takes him to the first area. He can see areas 1-4 just perfect. But when he click to go to area 5, less than half of the movie clips load in what seems to be a random order and then the rest of the .swf (beyond that point in the timeline) can't be accessed at all.

This could be common, but as far as I know, I've never heard of it. He's had someone at his site who is apparently "fluent in computer" look over his internet settings and cannot find any issues.

Anyone ever heard of this or know what I should suggest he try besides updating his browser and Flash Player?.

View 3 Replies

Actionscript 3 :: How Much Time Until Next Frame / Screen Draw

Feb 13, 2012

I have a generative art app, and I'd like it to draw as many cycles as possible each frame without reducing the framerate. Is there a way to tell how much time is left until the screen updates/refreshes?I figure if I can approximate how many milliseconds each cycle takes, then I can run cycles until the amount of time left is less than the average or the peak cycle time, then let the screen refresh, then run another set of cycles.

View 2 Replies

ActionScript 3.0 :: Progressively Draw Shape Over Time?

Oct 1, 2009

how to draw the attached shape progressively over time?

View 9 Replies

Actionscript 3 :: Flex Mobile: Strange Behavior In IconItemRenderer List?

Feb 29, 2012

I'm desperately trying to fix a strange behavior in my custom iconitemrenderer list: When I change the view to the view with the list inside and start scrolling, the list gets white for the fraction of a second (apperently completely redrawn), but only once when scrolling the first time after the view change.

[Code]...

I think the problem is in the myList.dataProvider.itemUpdated(oldItem), apperently the renderer thinks it has to redraw everthing, but I have no idea why.. and why only after the view is shown again.if it's a bug or something? how can I get rid of this bahavior or how can I debug this this properly?

View 1 Replies

ActionScript 3.0 :: Interesting Way Of Defining DrawRect

Sep 10, 2009

I'm currently working my way through Joey Lott and Danny Patterson's Actionscript 3 with Design Patterns book and ran into this code:[code]

View 3 Replies

Flex :: Turn Off Globally All Objects Drop Shadows And Special Fx's And Increasing Performance?

Jun 8, 2011

Is there any way to turn off all special FX's and especially dropShadow's on all objects inside the application ?

View 2 Replies

Flex :: BitmapData Draw - Set Where To Draw?

Dec 16, 2010

i have a class thats create a class with bitmapData that merge 2 IBitmapDrawable. one of them is 24*20 while the other is 16*16.i want to draw the smaller first in a bitmapData object which its width and height are 24*20 but i want to draw it in the center of the big bounds.

[Code]...

View 2 Replies

Flex :: TitleWindowSkin, TitleWindowCloseButtonSkin, Colorization: Duplicate This Behavior In A Custom Component?

Jun 16, 2011

I am trying to use the spark.skins.spark.TitleWindowCloseButtonSkin in a custom component and make it look thematically similar to how it looks in TitleWindow. Just specifying it as the skin class for a Button works no problem. I also have a .css style applied to all my TitleWindow classes that affects the close buttons in a TitleWindow. If I set the chrome color of the TitleWindow in .css then the close button skin also gets colorized to match this color. My custom component is also using the same style reference as my TitleWindows. But the Button instance inside of my custom component does not get colorized. So while I have blue TitleWindows with blue-colorized closed buttons, I have a blue custom component with a default gray background closed button (on button-press, the gray background appears).

There must be something going on with TitleWindowSkin and TitleWindowCloseButtonSkin via the colorization mechanic but I don't understand what it is. How should I solve this problem? I need to make the close button style in my custom component match that of the close button in my TitleWindows.

Here is a picture of the problem:The TitleWindow is on the left in both pictures. The custom component is on the right.In the left frame, you see the TitleWindow close button in the down position, note that its down state is colorized to match the theme of the TitleWindowSkin. On the right you see the down state of the custom component's close button. I do not know how to colorize the default gray to match the blue theme applied to the custom component.

PS My custom component extends from spark.components.Group. I should also mention that normal Button instances that use the default spark ButtonSkin do seem to get styled properly in the custom component (part of the reason this problem is so frustrating).

View 4 Replies

Draw A Continuous Curved Line From 3 Given Points At A Time?

May 10, 2011

I am trying to draw a continuous curved line in flash. There are many methods but none of the ones I have found so far quite fit my requirements. First of all, I want to use the flash graphic api's curveTo() method. I DO NOT want to simulate a curve with hundreds of calls to lineTo() per curved line segment. It is my experience and understanding that line segments are processor heavy. Flash's quadratic bezier curve should take less CPU power. [code]...

View 3 Replies

ActionScript 2.0 :: Draw A Square/circle/anything One Pixel At A Time?

Jul 27, 2005

how to draw a square/circle/anything one pixel at a time, using Actionscript instead of tweens?

View 1 Replies

ActionScript 3.0 :: Interesting Gleam Motion Effect

Feb 1, 2012

I was at a website (link from my son's baseball group: Coach Wooden and saw an effect that I couldn't figure out how they did it. It's the "gleam" on the text that runs about every 5 or so seconds.You'll have to enter the site to see it.Just right off hand, it looks like the text is a mask, and it has a tween or .x motion applied.

View 2 Replies

ActionScript 2.0 :: Interesting Image Load In Effects?

Apr 25, 2005

Well I'm creating a small image gallery of thumbnails and am looking for interesting effects when the big pic loads. I'm sick of just fading in images with the alpha setting and need some inspiration. I've done a google search but it revealed nothing of any use.

Do you know of any tutorials for this or fla downloads?

View 4 Replies

Flex :: Strange Copy/paste Behavior In Custom ItemEditor Component Used In A Datagrid?

Feb 10, 2011

I'm turning to you folks for answers because this really blows my mind... Let me explain:I'm using a slightly modified spark NumericStepper as an item editor in a datagrid. I had to modify the original because for some reason it's values only went up to 10.So i extended NumericStepper like so:

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

[code].....

View 1 Replies







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