ActionScript 3.0 :: How Much Memory Use Is Unsafe
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
Similar Posts:
Jul 3, 2010
I'm running Flash Media Developer Server (free version of Flash Media Server 3.5 for development purposes) that serves as my localhost for streaming FLV files to my SWF media player. When i try to run an HTML file with the embedded SWF file that accesses an FLV on my localhost server, i get this "Adobe FP has stopped a potentially unsafe operation" security message. I tried adding to the location trust list "localhost", "http://localhost", and even specifying the folder and file name e.g. C:Program FilesAdobeFlash Media Server 3.5applicationsvodmediamyfile.flv and http:[url].... Not even System.security. allowDomain ("*"); works which is supposed to allow all domains....
View 2 Replies
Nov 17, 2009
I have flash form that saves data to csv-file. It worked fine after allowing axtiveX.ut after updating ie to 8 and flash player to 10 (I guess it wasn't 10). The script has stopped working, and I'll get the error "flash has stopped a potentially unsafe operation...".I should probably change the player setting but I'm not sure how. Like some other method besides javascript to save data locallyI managed to get it work by doing it allover again, not sure what was the problem , might be what is suggested beneath, which is funny becouse It was working correcly before...
View 3 Replies
Jan 5, 2010
i have some code which (among else) used external interface call and navigate to url.When i publish it in flash cs3 and try to run html from local hard drive i get a warning popup telling me: flash player has stopped a potencially unsafe operation.
View 1 Replies
Oct 29, 2011
I am working on a flash website that loads live inventory data from a public csv file publish by google docs. the csv file is located at a public address on google docs server:[URL].. I am using a URLloader and URLrequest within my flash movie to grab this data and assign it to different variables.
It works great when I preview the movie in flash. However, when I go to publish the movie and preview the html file its loaded into in dreamweaver, I get a security warning from adobe flash player: Adobe Flash Player has stopped a potentially unsafe operation
I went ahead and published the html file that contains the swf file to the web, and when I go to my site, I don't even get the flash player warning; it just sits there like its trying to load the URLrequest and never completes.
I understand that flash player has a security measures that prevents flash files from accessing files outside of the server directory that the swf file is published to. I know you can create policy xml files to tell flash it's okay to load the data, but those policy files have to be located on the public server from which the data is being grabbed. But it's not like I can waltz on to google's servers a stick a policy file in there!
Is there any way to tell the flash player it's okay to load this data without getting that security error? I can't have the end user having to go into their flash settings and adding the location manually. I just need it to work without the security warning.
Is there another method of loading data from an external server without tripping up flash player security? aka, something other than URLloader and URLrequest?
[Code]...
View 25 Replies
Feb 20, 2012
how to best handle the issue of not having enough permission inside of a Google Chrome Extension. I am interacting with the YouTube API, but I am not using swfobject.js, just using am embdeeded div. I do not believe this is introducing my security issue, but perhaps it is. In development, I had to navigate to Adobe's flash player security page and designate my development folder as a 'safe' location. In deployment, I do not have the ability to do this. I do not want my users to have to click 'Allow All' on flash player security, but I do not see another way to achieve my results.Seems to be a duplicate of SWFobject in a Chrome Extension - API Unavaiable but remains unanswered.Source: https:[url].....
To run: Pull from the repo, load up Chrome, click the wrench, go to extension, check 'Developer Tools' -> Load Unpacked Extension and browse to the folder.
View 1 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
Nov 3, 2010
I have created an advent calendar for the blog of a friend, and to fetch/get/download the gifts of each day, the flash animation requests a file located at [URL].While creating the file in Flash CS4 and trying it out, I never got the error. But when I try to launch the .swf manually, I get this error: Adobe Flash Player has stopped a potentially unsafe operation. The following local application on your computer or network:
C:locationfile.swf
is trying to communicate with this Internet-enabled location:
[URL]
To let this aplication communicate with the Internet, click Settings. You must restart the application after changing your settings.Is there any way to bypass this, or any other method I can use to stop this error from showing?
View 4 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
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
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
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