Need Script To Remove SWF From Cache Memory...
Hi there!
I've made an SWF-movie that screws up when refreshing the site it appears in. The first time you enter the page it's all ok, but when you refresh the page, or visit it again later in that session, it screws up completely, ignoring all of the different scripted "stop" actions. If you close the browser and open it again, the movie is allright.
I guess I need a script that removes the swf from the cache memory once it's played one time.
Can anyone please help me with this problem. It's kind'a urgent and Ireally don't know where to find this script if not here...
Thanks in advance, guys!
the problem can be seen here: www.geocities.com/runeriera/quality_frame.html
FlashKit > Flash Help > Flash MX
Posted on: 01-17-2003, 08:51 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Increasing The Cache Memory Or Buffer For A Sound?
How can I increase the cache memory (or buffer) for a flash movie so that the long streaming sounds don't need to be loaded constantly, and so they have more room to remain in the user's system memory.
Flash Loads XML Variables From Cache Memory...
Hi everyone. This is a very important issue. I have been in many many forums looking for this answer and no one fulfills my expectations. As I said on title... I have created a small application that edits my XML file in server. It really works, because I open manually my file and it's perfectly modified... however, everytime I refresh my page it loads the ancient XML variables because they come from cache...
I also could find out that this problem is mainly happening with IExplorer, not with Mozilla Firefox.... however, I need it to run on IE too... but can not find a real solution.. I have been told to add random numbers to the XMl file extenskion, and other things like that, honestly... they do not work... please... does anybody have the light on this issue ??? I will appreciate your answers...
Thanks in advance,
F8 - Load A JPG, And Save In Memory (cache Bitmap?
Greetings,
Trying to solve a bigger problem, but would appreciate some help with my first question:
Once my swf is up and running, I load in a JPG from a webserver, and place it into a movie clip like this :
ActionScript Code:
loadMovie("Image01.jpg",_root.ImageHolder);
I'm wondering, can I save this JPG in memory some how, so that later in my timeline, when I don't have the "_root.ImageHolder" present, I can just dump the JPG from memory into a new movie clip on the stage?, and then do a motion tween with it?
Is this possible with Flash 8's Bitmap features?
Thanks
Remove From Memory
Hello,
I've been trying to figure out why i cant get GC to pick up any of my items ever. I've been working on a basic script that just loads a large jpg, then removes it. It uses system.TotalMemory to display how much memory is being allocated to FP9.
I've read a few of the threads on here about getting GC to pick up items, but i seem to be missing something important.
Code:
package {
import flash.display.*;
import flash.net.*;
import flash.events.*;
import flash.geom.*;
import flash.system.*;
import flash.utils.*;
public class CatLoader extends MovieClip {
public function CatLoader() {
setInterval(mytrace, 2000);
function mytrace() {
trace("Interval System Trace " + System.totalMemory/1024);
}
myAddlisteners()
}
public function myAddlisteners() {
btn.addEventListener(MouseEvent.CLICK, addCat, false, 0, true);
}
public function addCat(event:MouseEvent):void {
var url:String = 'BigPic.jpg';
var loader:Loader = new Loader();
configureListeners(loader.contentLoaderInfo);
loader.addEventListener(MouseEvent.CLICK, clickHandler);
var request:URLRequest = new URLRequest(url);
loader.load(request);
addChild(loader);
}
private function configureListeners(dispatcher:IEventDispatcher):void {
dispatcher.addEventListener(Event.COMPLETE, completeHandler);
dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
dispatcher.addEventListener(Event.INIT, initHandler);
dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
dispatcher.addEventListener(Event.OPEN, openHandler);
dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);
dispatcher.addEventListener(Event.UNLOAD, unLoadHandler);
}
private function completeHandler(event:Event):void {
//trace("completeHandler: " + event);
}
private function httpStatusHandler(event:HTTPStatusEvent):void {
//trace("httpStatusHandler: " + event);
}
private function initHandler(event:Event):void {
//trace("initHandler: " + event);
}
private function ioErrorHandler(event:IOErrorEvent):void {
//trace("ioErrorHandler: " + event);
}
private function openHandler(event:Event):void {
//trace("openHandler: " + event);
}
private function progressHandler(event:ProgressEvent):void {
//trace("progressHandler: bytesLoaded=" + event.bytesLoaded + " bytesTotal=" + event.bytesTotal);
}
private function unLoadHandler(event:Event):void {
//trace("unLoadHandler: " + event);
}
private function clickHandler(event:MouseEvent):void {
//trace("clickHandler: " + event);
var loader:Loader = Loader(event.target);
loader.removeEventListener(MouseEvent.CLICK, clickHandler, false);
loader.unload();
removeChild(loader);
loader=null;
GC();
}
function GC() {
trace("Before GC run ", System.totalMemory/1024);
System.gc();
trace("After GC run ", System.totalMemory/1024);
}
}
}
Loading Images From Server And Keeping Them In Memory (cache) ?
Hi,
I'm not a flash developer, so forgive me if this is a dumb question.
A friend (the flash developer) is going to help me create a flash app (actionscript 2) that will load a set of (about a dozen) images from a web server. The app will then refresh the image display every 10 seconds. Some of the images will change during refresh, some will not. Each image will have its own unique filename.
The question is whether I can cache the loaded images in flash, so if after the app refreshes, if any particular image stays the same it is loaded from memory and not re-loaded from the server.
If I understand correctly, the browser handles caching of the images in this type of scenario. But I would like to have a way of caching the images on the client side even if the browser caching is off. This is to prevent client apps from downloading the same image from the server every 10 seconds during refreshes.
Any info appreciated!!
Thanks,
George
How To Refresh Or Remove From Cache A SWF
I am building a site I uploaded some things
and after I uploaded the file again with
some changes but still appears like the
older file.
Waht do I do to refresh I tried the
various ways to refresh the window
but still the older file appears.
What will you do?
"Life is dream within a dream. Allan Poe"
Remove MovieClips From Memory Help
Ok, I know how to remove a movieclip from the stage with "removeChild()" and i know how to remove elements from an array with "splice()". But is there anything else I can do to clean up unused movieclips? like use the "delete" keyword? Should I be deleting all the listeners?/is there any easy way to do that(ie. a pre-made method?).
here is a sample of what i have done to try to clean up my unused clips:
ActionScript Code:
//Removing the clip from stage
removeChild(job1Array[u].newJob);
//Removing the clip from the array
job1Array.splice(u,1);
//What else should I do here?
Thanks for the help!
Script Needed To Remove SWF From Cache...
Hi there!
I've made an SWF-movie that screws up when refreshing the site it appears in. The first time you enter the page it's all ok, but when you refresh the page, or visit it again later in that session, it screws up completely, ignoring all of the different scripted "stop" actions. If you close the browser and open it again, the movie is allright.
I guess I need a script that removes the swf from the cache memory once it's played one time.
Can anyone please help me with this problem. It's kind'a urgent and Ireally don't know where to find this script if not here...
Thanks in advance, guys!
Remove Child Vs. Removed From Memory
From what I've read I understand that if a child is removed, it is only removed from memory if all references to it are removed. I'm unclear as to what "all references removed means."
The following code work but the whole application starts to slow down after several "movie"s are generated. Can anyone explain to me how to remove something from memory using this sample code?
Thanks, Joe
ActionScript Code:
theButton.addEventListener(MouseEvent.MOUSE_DOWN, playMovie);
theButton.addEventListener(MouseEvent.MOUSE_UP, playMovie);
var movie:Movie;
function playMovie(e:MouseEvent):void {
movie = new Movie;
movie.x = stage.stageWidth/2;
movie.y = stage.stageHeight/2;
addChild(movie);
}
function removeMovie(e:MouseEvent):void {
removeChild(movie);
}
How To Make An Object Remove ITSELF From Memory?
So ive set up a custom class that extends a specific movie clip in this case an enemy. The idea is that this class is completely self contained and manages itself entirely given the proper information at creation.
Ive already managed to get it to remove itself from the stage by using a:
this.parent.removeChild(this);
Which takes it off, and when I debug at test the object is not listed in the objects list after I call this. However Im pretty sure that if I want the garbage collector to pick this sucker up I need to set the actual objects value to 'null'. Am I right on this one? Or because the object is built upon a movieclip with no outside references (self contained) does the garbage collector pick it up once its removed from the stage?
I tried to set it to null by this:
this.parent.this = null;
I figured if I could remove it from the stage that way why not haha! But It kicks up an error and starts to play lag tag with me. Any Advice?
Memory Leaks In Flash? Cus My Program Is Using Over 235,000kbs Of Memory
ANY HELP APPRECIATED as i've spent 2 days on this (started 2 days 3 hours ago)... please help me
I have only 16 images in my program, its a slideshow, all my images have a small image selection which on(rollOver) shows that image in a bigger screen, however when my program launches, I do ctrl + alt + del, and my memory usage for that swf file I made is at 235,000kb of memory, and my laptop can't handle it, (its 70mb) and the original .fla file is (70mb)
Is there anyway to fix this, I belive my scripts are leaking, I know for a fact, im not cleaning my locals... or globals...
if I declare a variable should I set it to null?
Question 1: Should I remove local variables? if so how do I do it?
Question 2: Should I remove global variables? if so how do I do it?
Question 3: Any other things I need to know?
this is my code for start up, which hides all images not in the first 4 places (which is suppost to be visible) the others are turned invisible...
Code:
_global.b = Array();
_global.end = 16;
_global.b[0] = btn_1;
_global.b[1] = btn_2;
_global.b[2] = btn_3;
_global.b[3] = btn_4;
_global.b[4] = btn_5;
_global.b[5] = btn_6;
_global.b[6] = btn_7;
_global.b[7] = btn_8;
_global.b[8] = btn_9;
_global.b[9] = btn_10;
_global.b[10] = btn_11;
_global.b[11] = btn_12;
_global.b[12] = btn_13;
_global.b[13] = btn_14;
_global.b[14] = btn_15;
_global.b[15] = btn_16;
_global.X = 40;
_global.Y = 30;
var t:Number = Array();
for (var i:Number = 0; i<4; i++)
{
t[i] = (i*100)+80;
}
for (var i:Number = 0; i<_global.end; i++)
{
var b = _global.b[i]._x;
_global.b[i]._x = (i*100)+t[0];
if (b != t[0] and b != t[1] and b != t[2] and b != t[3])
{
_global.b[i]._visible = false;
}
else
{
_global.b[i]._visible = true;
}
}
code for scrolling through my list of images (as it only shows 4 on the screen at one time)
basically, each image is 90 * 68 (width/height) the X position of the first image is 80, and it increments by 100 each time, until the 5th image, in which its 30, the start up code above, spaces them out by 100 (as I normally dont have enough room to fit 16+ images spaced out by 100) it also does other things
Basically, t gets the X position of last image... then
And basically hides and unhides images pending if they're X position is 80, 180, 280, 380...
Code:
on(release)
{
var t:Number = 0;
for (var i:Number = 0; i<_global.end; i++)
{
t = (i*100)+80;
}
for (var i:Number = 0; i<_global.end; i++)
{
if (_global.b[i]._x > 79)
{
if (_global.b[i]._x == 80)
{
_global.b[i]._visible = false;
_global.b[i]._x = t+100;
}
if (_global.b[i]._x > 579)
{
_global.b[i]._visible = false;
}
if (_global.b[i]._x == 480)
{
_global.b[i]._visible = true;
}
_global.b[i]._x -= 100;
}
}
}
The next code is for "enhancing" my images a little bit, it increases its Width & Height by 30 and 40... and decreases by that on rollOut / dragOut
(as you can dragOut and rollOut doesn't happen therefore I need it so you can't "increase" the image height & width without decreasing when your mouse moves off it)
Code:
on(rollOver)
{
gotoAndStop(2);
var b = btn_1
b._width = b._width + _global.X;
b._height = b._height + _global.Y;
b._x = b._x - X/2;
b._y = b._y - Y/2;
}
on(dragOut)
{
var b = btn_1;
b._width = b._width - _global.X;
b._height = b._height - _global.Y;
b._x = b._x + X/2;
b._y = b._y + Y/2;
}
on(rollOut)
{
var b = btn_1;
b._width = b._width - _global.X;
b._height = b._height - _global.Y;
b._x = b._x + X/2;
b._y = b._y + Y/2;
}
Thats it, they're basically 1 of each different thing I have... it basically stays the same, I have 32 images (large_1-16, and small_1-16)
They're exactly the same size, but I wasn't sure if I could use 1 image twice, for different things (they're size is 2500 * 1900 give or take a 100 or so)
JavaScript Remove. Remove Flash Applet When Done Playing?
Is there anyway to remove a section of HTML with a javascript? Ive seen ones that replace text segments, and remove certain tags like <br>. I want it to remove the flash applet once its done playing.
I know that its possible, I just need someone that knows javascript better than me. Someone please help it would be MUCH appriciated! Thanks!
Remove Movie Clip Help, Remove Child {AS2}
So, I'm new here, and do to the lack of good help on Kongregate, I have come here =D Hopefully somebody here will be able to help me
if(_root.row2.block1._x == _root.row1.block1._x)
{
_root.row2.block1.removeMovieClip();
trace("working");
}
now, the trace fires, and, if I remove ".block1" the entire movie clip is removed, but with it in there, to remove the MC from within my MC, it WONT be removed, am I doing this wrong or am I making some other error?
MX:Cache - Please Cache The Images
Hello,
I load jpegs into a MC for a photography website. The images should cache in the browser (plenty of space allocated) but they do not. The images are loaded by replacing the previous image in the MC - so if I want to view a previous image I must load it into the MC again.
However, this should not be a problem from what I understand.
I use a Mac and IE 5 - I know it works on a PC!!
Does anybody else know of any issues relating to non-caching on a Mac??
Thanks in advance for your help.
Osc
Argggg IE Why.....wtf? Cache? No-cache?
http://www.walrusdogblues.com/colouringBook/?pageId=2
first time you view it in IE it should be fine (with crayon box in top left)
after that it renders but not the crayons....
if you cleare cache it works
Ive got pragma-nocache tags....
and im appending a date to the swf url to make each request unique but its still seems to be cacheing...because if you clear cache the crayons show up fine
It works in FF, works in Opera....but the damn crayons wont show in IE unless you clear your cache each time....
please anyone know why? im going crazy
errr I guess this should be in serverside if a mod would move it
Cache Cache Why Wont You Go Away
I have a client side dynamic graph whose values will change in the graph but the actually bars do not. It seems as though the graph writes over the old one. I'm thinking the prob is with the cache but do not know what to do about fixing that.
I tried setting no cache or the timestamp to an earlier date forcing it to clear the cache in the meta tab but that didn't work. I really do not know what to do, and would appreciate any help advice work arounds. Thank you
No Cache
I have a root movie that loads several *.swf movies into it when clicked on a button in the root movie. How can I tell flash with actionscript NOT to cache some of those loaded swf movies ?
Gr33tz
x.
CACHE
Is it possible to make flash to take values from the server and not to take it from the cache when viewed in a browser?????
I am working with ASP-FLASH movie integrated project.
So when the movie is viewed in a browser, I need vales from the server everytime
The Flash is working fine in Standalone player
Cache CD
HI ALL_
I seem to have a small or large problem. I have created a large projector for a presentation. But if I try and view it on a slightly slower computer to my own it says flash player is out of memory and will then only play the movie with thousands of colours. I've got it down to about 6Mb but I still have problems. I think that the computer trying to cache the project but has problems is this possible and if so how can I make it not cache the pages.
Hope some one can help
Cheers
jody
No More SWF In Cache?....
Well i have a proble--
i have a SWF file and i dun want it to be save in the Temporary Internet Files
how can i make all my Flash files expired after they play or how can i
make them unloadable from Temporary Internet Files
Cache?
I publish my site, i check it out, and I change some things.
Publish it again, but don't see the changes!
What's wrong? is it in my cache memory? Does visitors have the same when visit my site? What can I do about it?
PHP Cache
sorry this should be here:
http://www.flashkit.com/board/showth...hreadid=388667
The .swf WON'T Cache
hi,
I've got a 750 k .swf that won't stay in the cache (when it is reloaded even in the same visit, you have to wait for it to download). It has a preloader in it's first scene. does it's re-loading have anything to do with its size? any other reasons why it won't cache?
thanks a lot.
Cache PC/MAC
i have noticed that a swf i made that loads external swf's doent seem to work the same as it does on the PC. It doesn't seem to load or stay in the memory. Are there differences in the cache?
anyone?
thanks
No Cache
Is there a way to not a swf cache on the client side?
Thanks
Shawn
No Cache
Hi, I don't want my web site to be cached because I'm updating it regularly but my visitors always enter the cached flash content. I'll be glad if you help me. Thanks.
Is This The Cache?
ok this is weird i can only assume this is the cache but i'm not sure since i'm not 100% on what exactly the cache is. anyways on my server i am using a php file instead of an html to hold my swf. the php file is really short all it does is it embeds the swf thats about it. anyways i just removed the swf from the server yet if i navigate to the url of the php script the swf still appears.furthermore when i replace the swf with one that has been altered it still shows the old swf. how do i stop this from happening (clearing the cache?)
Help With Cache
Hi all,
(bare with me...i did do a search for cache on the search)
just wonderin if u could help...
i have put a file up here: www.zerofx.net/pro
It use dynamic txt files, but whenever i try to update them, i have to delete my cookies/cache before i see the change.
I know there is some code to trick the cache by changing the variable name or whatever, but when i try and change the code for my movie, it doesn't work.
The text files are loaded dynamically into a .swf in an html page. At the moment i am using the code
Code:
loadVariablesNum("home.txt",0);
what is the exact code i need to enter, to trick the cache? cos whenever i enter code and test movie, it says: cannot detect my file with some number on the end.
Please help
No Cache
is there a way to prevent images to end up in the site visitors cache? the images have a copyright..
thanks
Cache
I have developed swf who is extracting text from one txt file. But when we change text from txt file, But its showing same because of cache.
Cache ?
While playing back swf1 on pageone.html I'd like to load in the background swf2 that will play on page2.html. What I'd like to know is what happens if swf2 is not fully cached when the viewer changes to page2? Is what has already cached just dumped or does the download continue where it left off? My situation is that I have 2 rather large swfs that will play in seperate html pages one right after another. If the viewer does not use the "skip" button on the first movie there is enough time for the second to cache. If they do skip then I need to know what happens to the movie that is downloading in the background.
thanks.
XML Cache
When calling or loading an XML file... does flash/browser treat it the same as a text file...in regards to CACHE?
just wondering if I need to add the "random" line to my XML file call.
usually for text files..I add a random NUM to the end of the url string..
can i do the same with XML as so:
code:
myXML_xml.load("products.xml?" add random(9999));
thanks
Is There A Way To Get Around Cache?
I'm going nuts here... I'm working on a flash site that I've uploaded. I'm trying to check it online and all I keep on getting is previously uploaded versions. I have tried deleting the cache in my browser but it does not work (it should)
I even downloaded the swf files to make sure I was uploading the right files... they are correct yet when I view in the browser it shows me the earlier uploaded version of the file...
Is there something I'm missing here, how does one get around this really annoying problem.
Greg.
Something Very Odd - Cache?
Hi,
I regularly get up the next day and find my project no longer works. Undefined properties all over the place. It's happened quite a few times now and I can't figure out why my .fla file compiles without problems before bedtime but complains in the morning when I get up! It's as if something is being cached that perhaps, by fluke, allows the .fla to compile. Am i looking for gremlins that aren't there or has anyone else noticed this anomaly?
Xml And The Cache
I have two different swfs that i want to communicate together. Im using xml as a bridge for them to communicate. How do I ensure that its loading a fresh xml page each time. Is there a cache buster object in flash to use?
This onclip event calls a function to load the xml.
Code:
onClipEvent (enterFrame) {
if (_root.startGame == false) {
this._parent.loadXML();
}
}
This is the function the onclip event calls. If it loads and the xml node value is a 1 the onclip events no longer calls the xml load function and the game questions are laoded.
Code:
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
function loadXML(loaded) {
Started = parseInt(xmlData.firstChild.firstChild.firstChild);
_root.fb += "xmlData = "+xmlData+newline;
_root.fb += "Started = "+Started+newline;
if (Started == 1) {
_root.fb += "In the if statement";
startGame = true;
Getquestion();
}
}
//xmlData.load("http://www.wisc-online.com/xmlgame/"+bingopicked+".xml?cacheB="+new Date().getTime());
xmlData.load("http://www.wisc-online.com/xmlgame/"+bingopicked+".xml?nocache="+new Date().getTime());
Cache FLV
My FLV files I think are being Cached on my computer, Can I stop this?
I upload a FLV to the server, play it in my player. I delete the FLV file on my server, and try to play the video and it still plays.
How can I remove it from my Cache?
Cache
My SWF file saves its self in the cache.
I have an XML file, and I update it, and the SWF file doesn't show the updates, but once the cache clears, then SWF shows the updated. How can I fix this? Is there something In AS 3? or is this something I have to do in PHP or HTML?
Swf No Cache
How can I prevent people from copying my swf file from their cache? Or - how can I define my swf file as "uncacheable"?
Not Getting Swf Cache
I have a site that uses an html page for searching through products. When you click on a product from the search results I use php to pass some variables to the swf like so
<embed src="movie.swf?variable1=data&variable2=data"
This tells the swf where to go so that it ends up on the product.
The problem is that the swf always needs to reload itself. Shouldn't this be in the cache already? Is there a way i can keep it in the cache or tell the browser to pull it from cache? It is a fairly large file so it kinda sucks that it needs to keep reloading everytime.
RAM And Cache
Hi Flash Gurus
Can I ask those who use FLASH8 PRO what they think is the optimal RAM and CACHE size with W XP?
Can I get away with 512 DDR RAM and 1Mb Cache, 1.6Gzprocessor?
( I am a little sceptical of 'offical' recommendations).
Cheers
Edited: 01/19/2007 at 05:34:33 AM by hobdenpete
No Cache
Is there a way to set a Flash file (swf) to NOT cache in the browser? When
I upload a new swf file, the browser does not reflect the changes until
after flushing the cache.
--
Brandon
CACHE
Is there a way to make web browser's clear there cache before loading a flash website,
I use fire fox and every time i look at my website that i have updated with new content, it does not display the new content, i have to physically clear the cache.
I dont know if this can be done but is there a way in action script to make the browser load up all content and not load of the person own cache. I have haerd that you can con aproxy server's to download the actual content instead of the cached files.
Is it possible and is there an easy way to do this.
Cache
Operating Environment: IIS6+ASP.Net 2.0+Flash
Framework / Procedure:
When running, Flash will run ASP.NET program. ASP.NET then extracts data from the database and generates a XML file for Flash. Flash reads the XML file and parse it into a readable format for the users.
Problem:
When Flash displays the XML content and user leaves/exits the webpage, this process creates a change in the database. Then if this Flash function is executed again, ASP.NET generates a new XML file, but Flash still displays the old XML content. We discovered that when IE's "Temorary Internet Files" setting is set to AUTO, the above problem would occure, we suspect this is related to IE cache. Is there any way to resolve this Flash cache problem?
How Can I Use Cache?
How can i load files into cache for later load in flash? I like to load them into the same mc (window).
Cache?
hey,
is there anyway to make the browser not cache the swf? i ve updated the same file on the net and i keep having to clear my cache to see the updated verison. im afraid that many users wont do this and be seeing the old version.
No Cache
Hello guys and girls,
I've tried every " no cahe " AS I can think of. Working with Flash Professional 2004 AS 2.0. Does anyone have any idea's?. I've tried some php and that don't work either. Very frustrating and as always I'm sure the problem exist between screen and chair.
Thanks,
|