ActionScript 3.0 :: FLVComponent Using Too Much Memory?
Oct 28, 2009
I have built an application that plays videos from the local computer.I am using the FlvPlayback Component. If I play a number of videos in a row(program has about 70), the memory usage on my computer goes to a level where my video is getting slowed down, audio becomes choppy, etc.It seems that when the new video gets loaded, the cached information from the previous video does not get cleared. Could this be and is there a way to clear this out on load of the next video?
View 1 Replies
Similar Posts:
May 27, 2009
I have several FLVs on a frame, and I want to use AS 3.0 to set the bitrate to different numbers by using actions on different frames.
The instance name of the flv is "demo", and my code currently specifies:
demo.bitrate = 0;
This does not seem to be stopping the download, which is what I am attempting to do. How do you properly script a specific bit rate?
View 3 Replies
Jun 3, 2009
I want to know if actionscript 2 can load different video and audio file types in a single flv component.I tried to load a .mov file in the swf but it's not playing. coz i read over the net that it can only play flv files?Is this possible by coding?
View 3 Replies
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
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
Aug 2, 2007
I'm making an isometric game and I need to know which takes less memory for scrolling, making everything invisible that you can't see? Like if(!this.base.hitTest(worldHitter))this._visible = false; Or would it be better to remove the movieclips unseen and then reattach them when i should see them?
View 2 Replies
Aug 24, 2010
I wrote an application in flash AS3, and when I trace from flash the total memory usage of the total application is only about 9MB, But at the same time Task Manager Shows the memory usage as 110MB. Around 100MB difference.Flash Trace Method System.totalMemory difference of the Trace from the Beginning of the application to end of the application.
View 2 Replies
Jul 30, 2009
Is anyone else seeing this? After several minutes (less than 10!) of doing nothing but editing a .as file, I see an impending crash in the form of little pink squares around the scroll bars. Most of the time, if I save right then, then exit Flash, I escape without losing any work. If I ignore the warning signs, or sometimes just by Ugly Surprise with no warning, Flash crashes. It doesn't seem like using the app as an IDE for AIR apps, especially when doing little but composing and editing source files, ought to be that taxing.
View 1 Replies
Sep 1, 2009
I am developing a complete AS3 based corporative website. Everything is nice and cool, except that seems to be impossible to release memory... I have read tons of articles referring memory management on AS3, and applied all the techniques on my code: I'm using weakly referenced listeners, removing them when I am done, setting to null all my objects when I want to release them, using the method unloadAndStop whenever I want to unload one of my external SWF files, disposing my loaded bitmaps using bitmapData.dispose()...
And no way, the memory continues increasing to infinite and beyond... One thing that calls my attention: If I minimize my browser and only on that situation, the memory goes down on my task manager to a reasonable amount.
View 8 Replies
May 4, 2010
Right now I'm using Flash CS3 and, as my animation projects get to be a few thousand frames with four or five characters each with around 15 layers or so, things start getting really slow. I'll be getting CS5 tomorrow and I'm wondering how much RAM CS5 is capable of handling. I'd really like to speed things up. Or, as a side question, are there any tricks people use to keep things running fast once the timeline gets fairly long?
View 7 Replies
Jul 26, 2010
I was playing a flash game when a friend of mine showed me some Cheat Engine trick where you can search for integers in a flash game. eg your score is 100. To find the score, you'll need to search for the value 800 in Cheat Engine—this is probably a popular trick nowadays.I've never played with Cheat Engine before, but I understand that it's a memory editor? I thought it had something to do with bits and bytes; 8 bits = 1 byte, but I'm not sure at all.why you multiply by 8?
View 1 Replies
Oct 20, 2011
I have an AS3 project and while using Mr. Doob's profiler I see that memory usage keeps rising with every second. How can I find out where the leak is coming from? I'm looking for a solution that doesn't involve Flash Builder Professional.
View 2 Replies
Sep 22, 2010
Im profiling my application looking for leaks. At a critical point, i use 90mb, but, on destroying the application, all of my references are nulled... Yet GC does not run unless i force it. When i force it, it goes back down to 30mb.So i assume GC only runs when its required? That leaves me thinking i have alot of memory to play with in general?What MB of memory usage do you aim for in your applications?
View 2 Replies
Oct 28, 2005
I've created and empty movie clip named "movieHolder" as a container to load in external swf files.
the intent is to load and unload different swf files into the "movieHolder" container with the following button code.
//---------
this.createEmptyMovieClip("movieHolder", this.getNextHighestDepth());
buttonOne_btn.onRelease = function():Void {
[Code]....
Selecting - buttonOne- loads the external "galleryOne.swf" file as expected, but when buttonTwo is selected it should unload the "galleryOne.swf" file that is currently loaded in the container and load the "galleryTwo.swf" file in its place.
when buttonTwo is selected it loads the "galleryTwo.swf" file and you see it for just a second, but the "galleryOne.swf" file returns to the display.
Does unloadMovie remove the targeted file from the flash player memory? It not, how do I dump it?
View 3 Replies
May 17, 2011
If you ignore all the extra memory overhead involved in storing variables (such as keeping track of property names etc)...How many bytes does Flash use to store a single reference to a "complex object"?And a related question (to avoid creating two threads):How many bytes does a String take up? I'm guessing one byte per character, plus an extra byte for the "end of string" character?
View 10 Replies
Dec 8, 2009
I tried a search but it keeps saying I failed the No Spam when I didnt get a question - d'oh. Ok, this has probably been covered before, but a lot of research hasn't got me far, so I thought I'd post. I have a single page html site with several links that load up a homebrewed lightbox. The inline content is written out at the bottom of the page and the divs are set to hidden.
When a link is clicked, the light box loads and the correct <div> is set to visible. The flash plays, or is interacted with but when the user has finished, they click an html Close button and the div is hidden again. Obviously the swf is still loaded and running; it could be even mid animation. The more swfs loaded, the more memory that is taken up.
My development machine can handle the 600mb + used up by have a few FF windows open and a couple of copies of the site; but I imagine it will cause problems for users. So I've been looking into externalInterface to fire a command into the swf to close itself down when the close button is clicked, but I can't seem to find anything
View 1 Replies
May 31, 2010
I'm developing a FLEX application using FLEX Builder with version 3.5 SDK. The problem that I have is that the Browser consumes more and more memory until it slows down or errors. When I run the application using the Flex Builder profiler the Memory usage never gets above 15MB. As I open and close display objects the Memory is released as expected. However, looking at Windows Task Manager the browser consumes more memory every time that I open anything and doesn't release the memory when it is closed. I have tries Google Chrome, Firefox, and IE, they all do the same.
View 1 Replies
Oct 20, 2011
I'm very new to flash,and have been digging through google and this site for information on how to piece together an AS2 shooter game.Its going well enough, but I'm having slowdown issues the longer the games runs, and I was hoping someone here could point me in the right direction.To paste an enemy movie clip on the screen, i'm using this:
Code:
var spawn =_root.attachMovie("monster1","monster1"+_root.getNextHighestDepth(),_root.getNextHighestDepth())[code]........
I need them stored in an array so that the player's shots can test weather or not they've hit any monster on the bullet's enter frame function, then call that monster's movie clip's take damage function. I'm using a for loop to do this:
Code:
for(var i in _root.player.foes){
if (this.hitTest(_root.player.foes[i])){
_root.player.foes[i].takedamage();}
}
I think the problem with the slowdown is that each time I place an enemy on the screen the array gets bigger and bigger. The slowdown only happens while the player is shooting, and I suspect the ever longer for loop with the hit testing is causing it.
I'm already removing the monster's movie clips as they get killed or exit the screen, I guess what I need is a way to reduce the size of the array at the same time, or at least tell the for loop not to do a hit test unless the monster is still alive.
View 3 Replies
Mar 27, 2008
I'll try to explain the general operation of my program, and that might shed some light on my issue. I have a menu with 50 different small postcards. When one is chosen, the program zooms it up in order to fill the screen, populates some data which is unique to each postcard, and "flips" it so you can see the writing on the back. The postcard is a movieclip which imports a front image, 3 back images, and some XML text. There are some buttons on the "back" of the postcard to choose to look at a few images and text.When you choose to close the postcard, it flies away. I use the same movieclip for all 50 postcards, and just change the images and text that I load.
Once the postcard flies away, I want to remove it from memory. It won't happen with removeChild() as that keeps it there in case I want to reference it again I guess, and I have tried setting the postcard variable name to "null" without much success.I add listeners to the buttons on the postcard when I instantiate its class, so I am not sure if I have to remove them in order to get the garbage collector to deal with it. But, I also don't know what I don't know about removing things from memory. In one section of the Flash docs (Working with display object containers) it says:
"The removeChild() and removeChildAt() methods do not delete a display object instance entirely. They simply remove it from the child list of the container. The instance can still be referenced by another variable.(Use the delete operator to completely remove an object.)"And, at another place in the docs (the script reference about removeChild()) it says:
"Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance. The parent property of the removed child is set to null , and the object is garbage collected if no other references to the child exist. The index positions of any display objects above the child in the DisplayObjectContainer are decreased by 1.
View 6 Replies
Aug 28, 2008
I also facing the same memory problem.As you said in this case it works fine. But my case i am not loading images instead i load swf file which has sound embeded to the timeline as stream.
According to this code, same memory management performs well for me also. but the sound in the unloaded swf is still audible and when i load the next swf, these all sounds mix up and i don't hear anything properly.
To avoid the sound problem i added a line SoundMixer.stopAll() to getaway the problem, but after i added this line memory management got lost and my system gets hanged.
[Code]...
View 1 Replies
Aug 29, 2008
I previously asked about some FLV files that I was loading externally, and having trouble with memory being released. Having sort of solved this, I am having the same problem with loading external resources and then getting them to be cleared out of memory when I'm done with them. I have seen kglad mention more than once that GC in flash 9.0.124.0 is broken, but where does that leave us? I have also tried my project in FP 10, and the memory still continues to go up and up. If I load an external resource - in this case I have a class that builds a VR room with papervision - and then close it, set it's instance to null, my memory never goes down.
This is a total guess, but could it have anything to do with using Tweener in my project? Is there any way that the Tweener class could be keeping some of my objects in memory and keep them from being GC'd? I am using weak references in my listeners, setting any variable I can find to null... I can get over how frustrating this is to just see memory go up and up but find no reason. The class I am using also uses a few subclasses to build itself, but I end up with one instance of my VR on the stage. If I have set that instance to a name - myVR - and then removeChild(myVR) from the stage and set the name to null - that should do it right? Boy, this is frustrating.
View 3 Replies
Sep 1, 2009
I have a swf that connects to a server through an as file, which appears to be holding some variables in memory or something so that it works fine the first time it loads, but when I load the page again, either the browser or the player is not clearing out the previous values. I don't know if there is a way to make sure that the swf when it loads makes sure not to keep the values held in the cache. It actually appears that the only way around my problem is to clear the cookies for my site and then reload.url...
View 3 Replies
Oct 11, 2009
what I have is:
- listener added with weak refference, therefore it shouldn't keep the GC away
- object set to null
- trace of the object m shows null
- debugger shows the value of m as null
But the "frame" trace still keeps on appearing, so where exactly is that object and how to check for it, how to delete it and kill it. I know that listeners keep objects in the memory, but then how to find them, and at the end of the day also used weakReference=true while assigning it, so that should take care of it. What exactly is going on here?
View 2 Replies
Nov 9, 2009
I'm using an online charting program written in flash. I have Flash 10 and IE8. Each time it draws a chart, my available physical memory decreases. On my WinXP Pro machine with an i7 processor and 4G RAM I can draw ~20 charts before available memory decreases to 1.6G and IE locks up. On my laptop with WinXP Pro, Core 2 Duo and 2G RAM with Flash 10 and IE7 I can draw about ~40 charts before available memory decreases to 160M and IE locks up. It seems that the only way to get the memory back is to close and then reopen the tab. Is this common to Flash or was this program poorly written? Would I have better luck with another browser
View 1 Replies
Feb 9, 2010
I'm having a bit of trouble in a game application I'm building,I recently added a bit of code that makes the game more visually interesting. As you move your character around screen, it creates instances of the GFX_Dot class, which is tied to a small green dot.In the class file I have a timer which decreases the alpha of the dot until it hits zero, at which point I'd like it to delete itself. Here are the functions I've got in the GFX_Dot class:
//GFX_Dot class
public function GFX_Dot() {
randomize();[code]..........
The part at the end "delete this" is meant to delete reference to "this" and allow it's memory to be re-used, however upon running the program, it's clear that they must not be deleting themselves, because after half a minute of creating a new GFX_Dot every frame at 30 fps, the game begins to get very slow. Before adding these graphical elements the game ran snappy all the time, I'm almost certain it has to do with them not being deleted properly.
View 1 Replies
Feb 10, 2010
I have a class "Ball" which display graphical circle ball in random x&y axis and Ifade out it with Event.ENTER_FRAME and specify removeEventListener if it reach alpha<=0 .Now I made multiple object from "Ball" class. Now, In my stage it works nice but when I see my Computer Memory status. my current flash.exe is increasing memory rapidly. Is how to remove my unusual object from my Memory. So that it would not get hang.
View 2 Replies
Mar 12, 2010
I have searched the Adobe documentation for some insight, but apparently I am not looking in the right place. Here is a simplified code example:
[Code]...
View 3 Replies
Jun 23, 2010
have been making a digital portfolio that I plan on putting up as a website. Once before the project has gotten very large (at the time 500megs). Now this originally large project had gotten to the point where it was telling me there wasn't enough memory. What I did to fix this was copy and paste all the frames from each scene into several new projects and then piece those new projects together to remake my complete project.
I am now doing this again but at this point piecing back the last scene of mine is taking up too much memory. I have 4 gigs of memory on a 3.06 GHz intel core 2 duo imac. first off, should this be happening? Should 4 ghz be enough? second, it appears that flash projects tend to compile a lot of baggage; is this true? Thirdly, is there any way I can fix this without buying two more 4 gig memory cards?
View 1 Replies
Mar 3, 2011
I am trying to create a relatively simple animation in Flash CS5. I've built out 40 seconds of a 3-minute cartoon and now it won't let me add so much as a keyframe without telling me to clear up some virtual memory.I'm running this on a new laptop less than a year old. Lots of hard drive space and 4 GB of RAM. No viruses or anything. Very fresh pc. Nevertheless, I adjusted the virtual memory paging size to the maximum allowed. No change - I get the same error.I've tried opening the existing file on two other computers and Flash CS5 simply crashes when I try to open it.The animation I've built has about 20 layers, each using one symbol per layer. They were created from illustrations saved as PNGs, none of them larger than 200 kb or so. I have a small mp3 audio file I am syncing it to as well. I've set the properties to 550 x 550 pixels with 30 frames per second.I have a deadline for this thing of March 25th and I've been trying to solve the problem on my own for the last two weeks.
View 1 Replies
Sep 29, 2011
I'm having a problem where I load my SWF (Advertisement) into the dom after an event happens in a flash game. After viewing the ad, the SWF is removed with JavaScript and users continues to play, this continues several times without ever reloading the page.
The problem I am running into is in IE 8 & 9 performance of the game drops and frame rate becomes choppy after several ads are shown. Each advertisment has a timer built in and my thought is that the ad is not being fully removed from memory hence causing a slowdown.
Is there a way to ensure a full removal of the ad or at least a way to detect within the ad that it is no longer on the page & kill the timer?
View 1 Replies