ActionScript 3.0 :: Memory Benchmark Test :: MovieClip Vs. Sprite Vs. Shape?

Jun 11, 2010

I performed a benchmark test memory consumption by three DisplayObjects - MovieClip, Sprite, and Shape.
 
Below are results and method used. I just wanted to create instances. Test with adding instnaces to display list showed a slight difference in terms of memory consumption.
 
Observations: Sprite uses from 16 to 22% with average 18% less memory than MoviClip.
 
Shape uses from 42 to 55% with average of 46% less memory than MovieClip.
 
Shape uses from 32 to 42% with average of 35% less memory than Sprite.

[Code]...

View 8 Replies


Similar Posts:


ActionScript 2.0 :: Wrapping Test Within A Shape?

Mar 10, 2008

I'm trying to load text within a shape on the stage. The shape is a square with the left and right sides concaved. )( ...I'm not sure how to go about this...my text is loading externally from a .txt file, making me think that this is not possible.

View 1 Replies

Flash :: Get The Top-most X And Y Value Of A Shape In A Sprite?

Jul 30, 2010

I am completely in the woods here - i have a sprite with a shape drawn in there (there are two different sprites in the example.) At any given point, I need to get the x and y value of the topmost point of the shape. The sprite does rotate so it's going to change at any point as well. I don't even know where to begin here

View 2 Replies

ActionScript 3.0 :: Draw The Shape Of A Existing Movieclip Which Is Irregular Shape?

Oct 11, 2011

need to draw the shape of a existing movieclip which is irregular shape.

View 2 Replies

ActionScript 3.0 :: Draw The Shape Of A Existing Movieclip Which Is Irregular Shape

Oct 11, 2011

need to draw the shape of a existing movieclip which is irregular shape.

View 1 Replies

ActionScript 1/2 :: Shape Colliding Another Shape, Not The Rectangleof A Movieclip?

Jul 9, 2009

Id like to know if there is a way to do a shape hitTest.Not as the normal hitTest would do, but shape colliding another shape, not the rectangleof a movieclip.It can be in a movieclip.

View 23 Replies

ActionScript 3.0 :: Adding A Shape Inside A Sprite?

Oct 23, 2009

I am trying to place a rectangle Shape inside a square Sprite, as its child. But, the child rectangle show up outside the sprite, instead.

Also, the click handler event of the sprite reports the error "The supplied DisplayObject must be a child of the caller".

Code:

package
{
import flash.display.Sprite;
import flash.display.Shape;

[Code].....

View 4 Replies

ActionScript 3.0 :: Papervision3D Lag With Map Floor And Test Sprite

Aug 10, 2009

I'm not sure if this is directly hardware related or not. I've just started playing around with papervision 3d and I threw together this map floor and test sprite to see how it would look. The problem is, whenever I have a large portion or the map in my viewport, it lags. I was just wondering if maybe:

a) My code is horrid
b) My computer is a piece
c) Papervision3D is just bad for 3D

I mean the concept is simple, there's nothing fancy going on and I'm only using planes. Maybe it's because I'm using 25x25 of them? Is there a better path to use 3D than paper3d? Anyways, here's the code.

ActionScript Code:
//import files
import org.papervision3d.scenes.*;
import org.papervision3d.cameras.*;
import org.papervision3d.objects.*;
import org.papervision3d.objects.special.*;
[Code] .....

View 2 Replies

Actionscript 3 :: Save A Shape (or Sprite) To A Folder After Creation?

May 10, 2011

I am trying to create a county map of Illinois using x,y coordinates from a shp file. I have the x,y coordinates and the county names saved in a CSV file that I have no problem reading in via ActionScript 3 (and the map looks great), but in order to save time in my future application I would like to save each county shape as a permanent shape in my application and give them labels, i.e. Sprite1 (label='Champaign').

In case this is not possible I am trying an alternate solution: I create a new sprite (var spr:Sprite = new Sprite();) for each county, draw it using spr.graphics.drawPath, and give it a name (spr.name='Champaign') and then 'push' it to a vector of sprites (var xy_sprites:Vector. = new Vector.();). This would be great, but it doesn't work when I try to loop through each sprite in the vector and add an EventListener to that Sprite to pop up the name when you MouseOver any of the counties. Is the Sprite data type not the correct way to go about this or am a missing something about Sprites?

Some of my code to draw the shapes and save in a vector:

function drawXYMap(str:String):Vector.<Sprite> {
var arr:Array = str.split("
");
var xy_Sprites:Vector.<Sprite> = new Vector.<Sprite>();

[Code].....

View 1 Replies

Actionscript 3 :: Possible Ways To Draw Sprite Or Shape In Flash?

Jan 11, 2012

I usually created a movieclip in flash and assign it to actionscript class(using export for actionscript method in its property panel) that exteds movieclip.but sometimes movieclip is just too heavy for that,is there any possible way to draw a sprite directly in flash(not by code),and control it in actionscript-3

View 4 Replies

Actionscript 3 :: How To Reduce Memory Usages While Loading Sprite Sequences Of Images

Jun 7, 2011

I've made a *.swf file of the sprite sequences of 1000 images with (780 x 480) size. After that I embed this with another one class to show but every time it crushes during run time because of insufficient memory (assume that I have 2GB memory space). Which is the best way to implement such big sprite sequences in AS3 by avoiding the memory problem?

View 3 Replies

Actionscript 3 :: How Does Graphics Class Work Without Needing To Extend Sprite / Shape

Nov 21, 2010

So I'm playing with a project where I want my class to be able to use the functionality of the Graphics class without needing to extend Sprite/Shape. My goal aside, I guess I'm confused as to how it works at all? It's methods don't seem to return anything, and since it's added as a child property of the Sprite/Shape classes , I can't seem to figure out what it's actually doing? It's also one of those classes that can't be instantiated.

At this point, I'm just plain curious. EDIT: I should provide more clear distinction of what I'm looking for as answer. I have read the documentation, but the documentation doesn't account for what AS3 is actually doing. I'm looking for educated guesses about the programatic relationship between Graphics and the the classes that use it.

View 1 Replies

Flex :: How To Benchmark A Website

Oct 14, 2009

How can i benchmark a website ? i want to define how many user can i handle simultaneously. I don't think that matters but the site is a Flex application that consumes some services provided by tomcat's servlet

View 2 Replies

ActionScript 3.0 :: Microsecond Resolution For Benchmark?

Sep 4, 2009

Is there a way to find how long a function takes to execute beyond 1ms resolution:
 
time1 = getTimer();
//Do something
time2 = getTimer();
totalTime = time2 - time1;

View 1 Replies

Actionscript 3 :: Change The Color Of One Shape By Clicking On Clicking Another Object Of Sprite?

Aug 30, 2011

I have drawn intersecting lines. The user can click on a region inside the angle formed by the two lines.When the user clicks inside the area, the small region formed by the arc between the two lines showing the angle should change. How can I do that.the region between the intersecting lines is sprite object to dispatch event listener, but the arc is shape object.

View 1 Replies

ActionScript 2.0 :: HitTest And Positioning - Create An Invisible Movieclip That Has The Exact Size And Shape Of The Animated Movieclip

Aug 23, 2005

This is the third thread I've written for my current project (1st was answered perfectly, 2nd failed [but I still figured it out anyways]) but I'm not sure if there is a solution to this problem. I can't really explain my problem, so once again I've included a helpful animation to show you what I mean. Bear in mind that the pale-blue box represents the movie clip's borders, and those borders are usually changed to include the animation (instead of the borders moving with the animation, the borders get bigger).

For the animation problem, I've already got a solution: create an invisible movie clip that has the exact size and shape of the animated movie clip and make it follow the movie clip as it animates, and make the hitTest check the invisible movie clip instead of the animated one. As for the rotation problem, well, I don't know how to fix it. Is there a way to change that?

View 1 Replies

ActionScript 3.0 :: Hit Test Point NOT Detecting A Bottom Movieclip If The Mouse Is Over The Top Movieclip?

Oct 2, 2009

i have 2 intersecting movieclips.

is there a way to hit test point NOT detecting a bottom movieclip if the mouse is over the top movieclip?

View 3 Replies

ActionScript 3.0 :: Removing A MovieClip From Memory

Jan 11, 2011

I have a function called changeMovie which is supposed to load a new movie/swf into a already established container.I can get the new movie to load (all these movies have sound embedded in them) but I can not figure out how to get the old movieclip out of memory.I can foresee an instance of memory overload in my application down the line.I am using Flash CS3 with AS3.[code]As it stands now, I can get the new movie to play and be shown but the old movie clip still continues to play "in the background - along with its sound".

View 9 Replies

Media Server :: FMES4 Benchmark / RTMFP Fallback To Other Server Instance?

Sep 15, 2010

We're on the way to buy a 1 CPU license for FMES4  and I'm looking if anyone can provide real world benchmarks. We will use a Intel X5680 CPU with dual Port 10Ge NIC and we're wondering how much concurrent p2p RTMFP Session the server will be able to handle.
 
If a p2p RTMFP Session can not be created we want fallback to another server instance with the cheaper FMIS4 on it, is this the right way to handle this?

View 2 Replies

Professional :: Way To Totally Remove A Movieclip From Memory?

Mar 23, 2010

I have a .fla that contains five movieclips, and have a couple of questions regarding removing movieclips and swf size.If all the movieclips are displayed, my resulting swf is about 50k.If, in frame 1, I code conditionals that decide which of the movieclips will be displayed, will the resulting swf size become smaller if some of the clips aren't displayed?If so, what is the correct way to totally remove a movieclip from memory? Say I have a main movieclip that contains 5 other mcs, and the as code is within the main movieclip.If not, is there a way to make the swf size smaller if less than all clips are displayed (using conditionals).

View 10 Replies

ActionScript 3.0 :: Memory Leak With Large Movieclip?

May 26, 2011

I'm having what strikes me as a stupid problem, but I can't figure it out myself... it could be a subtle nuance of Flash or just some knowledge I don't have, anyway... I'm making a Flash game with a main menu and multiple levels. We didn't organize our project right (just self-taught college students doing it in our free time) so we made a level before the main menu. I ended up putting the entire level, code and all, into a MovieClip. It creates an instance of that MC when you start a level (I'm sure this was a terrible idea).
 
But it leaks when I delete the MovieClip and create a new one (i.e. quit the level to the main menu and then start it again). It originally leaked ~6MB each time you quit and started it again, but I've tightened it up to ~1MB, but I'd still like to fix that.
 
I know to Garbage Collect something you have to remove references, so I've
Blanked all arraysNulled all referencesRemove all MCs dynamically added to the stage and any associated eventsRemoved every single MovieClip from the entire stage, including ones that weren't added dynamicallyNulled practically every object and variable I've only used weak-referenced events, and I've removed all of them anyway, but it's still leaking. There's way too much code for me to post all of it, so I guess I'm just wondering if anyone has any general ideas I haven't thought of.

View 2 Replies

ActionScript 3.0 :: Remove A Linked Movieclip From Memory?

Jan 11, 2011

I've seen people explain how to remove a script created movieclip or shape from memory but what about when you link to a movieclip in the library?

Do you remove that from memory in the same way?

For example would the code below remove this clip from memory?

Code:
// I want this out of memory when the button is pushed.
var my_clip:my_clip_link = new my_clip_link();
addChild(my_clip);

[Code].....

When I test it, it does not show it out of memory on my computer but I read that the GC cleans up when it wants to, so I put in System.gc() to force GC, but I don't see any memory change in the debugger.

Also if I put a stream sound in the timeline of my linked movieclip it keeps playing the sound. If it's not in memory anymore how is it playing the sound? Did I open a portal to another dimension?

View 2 Replies

ActionScript 3.0 :: Proper Delete MovieClip From Memory?

May 26, 2011

There is a main movie with button "b1" .Loading external movie in it we have movieclip "b2". Now I add two the SAME listeners on "b1" and "b2" with function deleting from memory.But works only from b1.

my code-"refile.net/f/?amK"

View 0 Replies

Draw A Shape Inside A Movieclip?

Sep 18, 2010

I have a class; "Game".I have a bitmap in the library; "Grass"I want to be able to run a function from the main timeline that uses the bitmap inside of a movieClip.My current attempt is as follows; I make an instance of "Game" and have an .as file for Game that has:PHP Code:

package {
import flash.display.MovieClip;
import flash.display.Shape;

[code].....

View 1 Replies

Professional :: Shape Tween To MovieClip Again

Nov 7, 2009

Hi;I have a shape tween between 5 different drawings that I want to convert to a mc. How do I do this?

View 3 Replies

Flash :: Transform Movieclip Shape?

May 3, 2011

I was wondering if there any way to change movieclip shape, when it on stage by as2.

View 1 Replies

Actionscript 3 :: Greensock LoaderMax Memory - Clean The Memory Which Been Occupied By The Previous Queue

Jan 31, 2012

I have a bit trouble with LoaderMax memory occupy, i have a queue, and i am keep loading images depend on user's action. if they click load more and it keep load, but i would like to clean the memory which been occupied by the previous queue (i have remove all the children been added by the loading previously). is there a way i can do it? the behavior like this.

[Code]...

View 1 Replies

Actionscript 3 - Flash Movieclip With Sub-animations Eating The Memory?

Nov 22, 2011

I have been working on a flash game where I add sub-animations to a movieclip by attaching child movieclips. This creates a hierarchy of movie clips with different animations, but the result of that was that the parent movieclip ended up growing indefinitely and eating lots of memory. Is there a way I can optimize such animation? If bitmap caching works, would I be able to cache all the children which were added before runtime (e.g children movieclips which were added during design and before publishing the SWF).

View 2 Replies

ActionScript 3.0 :: Memory Monitor That Allows To See The Memory Leaked And Find Its Location?

Sep 26, 2010

I have an FPS monitor running and notice that I am getting choppiness here and there, bringing my game from 40 to 27 fps and back and forth at certain stages. I have an idea of where it is happening, but do not know for sure. I looked up quite a few memory monitors but haven't found anything decent yet. Is there a memory monitor that allows you to see the memory leaked and find its location? If not, how about just he memory leaked?

View 4 Replies

Professional :: Reshape The First Shape Of MovieClip Through A Tween?

Apr 21, 2010

I create a shape with Pen Tool and convert it to MovieClip.now i want to reshape the first shape through a tween.I can't use Subselection tool.

View 3 Replies







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