Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Unloading A SWF From Cache



is it possible to unload a swf from the cache memory?

I am loading an external swf into my main movie, I press unloadmovie when I don't need it, but obviously it stays in the cache and creates conflicts with my XML's that are being loading into the cache. So i thought that I should find a way to get rid of that external swf from the cache



FlashKit > Flash Help > Flash ActionScript
Posted on: 10-03-2005, 01:09 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

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,

Cache Lag?
What I have is a series of PDF files that are being viewed as a slide show. You click on a button it takes you to the next file, you click another button you can print or you can click a button and go back to the previous file. Simple design.

Now all the frames are loaded. If one of the files are too big, it doesn't read the actionscipt in the frame for some reason. It just continues to play to the next frame? I've used the same exact file and swapped out all the larger sized PDF files with smaller ones and everything works perfectly.

Is there some sort of access/lag problem? Is there some sort of code I can put into the frame to not make this problem happen.

Say you're at frame 75 and you click the button to take you to the previous picture. The coding on the button is:


ActionScript Code:
on (release) {
    gotoAndPlay(64);
}


When it's clicked, instead of going to frame 64, it's going to the next frame (in this case 76). Like I said, I only have this problem if the file is too large in file size. So it's not a _root, _parent problem.

Any tricks to help me?

Cache
I am having trouble with caching, I am using asp to send and recevive data into my flash file, but my data keeps cashing and not updating.

I ve tried using the code below to trick the browser into thinking it's a new variable each time but it doesn't seem to be worikng!

loadVariables("rants.asp?"+Math.random(), "", "GET");

Anyone got any ideas??

Any help would be grand!

Cheers

Jemes

Cache In Swf ?
maybe someone knows if I'm lost here...

in frame 1 I have #include "actions.as" .
in actions.as I load jpgs with loadMovie. Now, here's the thing, with php I'm writing on top of the actions.as file and replacing the names of the jpgs with the new jpgs I want to be loaded... But it seems like the actions get cache-ed (or something). Cus the actions get written right, but the swf movie is not loading the New Jpgs that actions.as is telling it to.

Please if anyone knows what's going on lemme know.

Don't Cache Mp3, How?
I know it's possible with the flash comm server, but it doesn't seem to be an option for me. I also know it must be possible some other way because http://www.wimpyplayer.com has an option for people not to be able to cache mp3's and doesn't use a flashcomm server. Does anyone have any idea how I can stream mp3's through flash and not have them be available in a users cache? I would just download the wimpy player but it simply doesn't have some other functions I need, plus, I would really like to know how this is done

Unloading MCs
I can't figure out how to get the unload to work. The script is below for my button 'Info'. It loads the movie, but will not unload the one that is on the stage. These are MCs within MCs within MCs. There are piecs and placements within each MC, so as far as I can tell, they are all necessary.
The scripting below that (the setProperty() ) is what actually works (and I have obviously tried it without the setProp). So I can load the MC, and set the visibility to 0 when I want another MC on the stage, but cannot actually unload it. Am I doing something wrong? Or is this the only way to do it?

You can see this on my homepage: http://www.emotion7.com
Try clicking the 'Info' button, letting it load, then the
'Services' button to see what I mean.
Thanks.


on (release) {
loadMovie ("Information.swf", "_root.Text.TextInfo");
unloadMovie ("_root.Text.TextServices.Services.swf");
}
on (release) {
setProperty ("_root.Text.TextServices", _visible, FALSE);
setProperty ("_root.Abstract.Abstractcopy", _visible, FALSE);
}

Unloading Various
I've got about 11 different movies that are all loaded into different "emptyMovies" with variable names of container1, container2, container3, etc...

Is there a way that I can unload all these at the same time using the UnloadMovie action?

Thanks
ghjr

[][][][][][ <-- Unloading
is there any way of telling to unload whatever external swf is loaded into lets say, level 1?

Thanks in advance

Unloading Mc's
ok so I have got my images loaded up dynamically on my site, but they overlap each other. They are all being loaded into a container, but how do I tell them to replace one another, rather than layer?

http://www.markertphoto.com/flash.htm

Help Unloading A Swf Please
Hello everyone, im having problems closing/unloading a swf file loaded into an empty movie clip.
This script sets up the main movie components;
stop();
_root.createEmptyMovieClip("empty_scroll_mc", 10);
_root.empty_mc._x = 0;
_root.empty_mc._y = 0;
_root.empty_scroll_mc.loadMovie("scrolling_menu.sw f");
_root.createEmptyMovieClip("empty_mc", 1);
_root.empty_mc._x = 0;
_root.empty_mc._y = 0;
_root.empty_mc.loadMovie("pool_page.swf");
_root.createEmptyMovieClip("empty_popup_mc", 9);
_root.empty_popup_mc._x = 25;
_root.empty_popup_mc._y = 0;

The empty mc in question is the third one, empty_popup_mc.

The above script sets up the navigation and the stage.
'empty_mc' is the empty movie clip into which my main content pages (different swf's) are loaded into, depending on which button is clicked on the scrolling_menu.swf

ie; this is attatched to a button on the scrolling_menu.swf:
on (release) {
_root.empty_mc.loadMovie("gym_page.swf");
}

This loads the gym_page.swf, into the empty_mc i then have a button on the gym_page which loads the brochure_request.swf in the emty_popup_mc

on (release) {
_root.empty_popup_mc.loadMovie("brochure_request.s wf");
}

We now get to my main question, the button to unload the brochure_request.swf from the empty_popup_mc is on the brochure_request.swf

Hope that makes sense to you! I thought i had sussed paths but i im stumped on this one.
Can anyone help me write the script for the button that will unload the brochure_request.swf from the empty_popup_mc.

the site is here
The brochure request page can be found by clicking on the gym page, then the button on the right that says 'more details'
Thank you so much, this is the first time i have tried to unload something !

Unloading .flv
I have a main .swf file that loads another .swf file which contains a .flv video using the Media Playback component. Works great. Only problem is that, when I close the loaded .swf file containing the .flv, the audio still plays.... The entire screen goe's away, but the audio still remains. I've tried many differenct solutions on unloading certain things to no avail. any ideas? is there an unload .flv command? or maybe some kind of buffering issue? Thanks for any tips.

MX 2004 Pro.

Help With Unloading....
hey

i have a button in main.swf which loads a swf called 'morpher' into a target mc called 'morphLoad'. the code used is:


loadMovie("videos/morpher.swf", "morphLoad");


the movie plays fine but what i want it to do when it is over is to unload and then target a frame within main swf called 'goagain'

im guessin the code would go in the last frame of the loaded 'morpher' swf?

any help on how to achieve this would be very appreciated.

thanks alot,
james

SWF Unloading
Hi guys
i got a problem unloading a .swf, i have a long timeline with all the pages in it,at a certain frame i have loaded, a form.swf with loadmovienum and it works, but my prob is when i then go to other pages on the same time line the swf is still there in background i have tried unloadmovienum at the end of the page frame but then the movie does not load. i have no hair left please help,ooop 1 hair left sorry.

Unloading
Hi there

I was wondering if somebody would help me.I am trying to create a porfolio of my work to apply to uni.They need to see developmental work so i have created the "develpmental work" button as a movie clip.Once clicked on it will play and the rough sketches will be shown.I'm not to sure what the script woud be to unload the main timeline piece so that only the sketch is shown.

I will attach the file.It only works for the six piece along.
Thank you so much
Nadine

I don't know why it is not letting me upload the file

[F8] Help With Unloading
Ok I'll try and keep this simple I have a movieclip which randomly duplicates itself somewhere on the x value between 1 and 396, above the stage it then decends downwards using a separate movieclip that I have set up which runs though a series of frames moving the moviclip down 2px every frame, When it reaches the bottom of the screen I have a hit area covering the bottom of the stage, when it hits this I would like it to unload.

Plz Help.

[F8] Nut Unloading
Let me start by saying thank you in advance.

I have my main time line and on it I have an MC with an instance name of "skip_intro".

Inside that MC I have a button with the following AS:
on (release) {
_root.gotoAndStop("end");
_root.o_text.gotoAndStop("end");
_root.skip_intro.unloadMovie();
}

The problem is my "unloadMovie" isn't working.

Basically I want it so that when you click on the "button (MC "skip_intro"), it disappears off the stage. Why is my AS not working? I also tried:
this.unloadMovie();

Interestingly enough when you click it a second time it disappears... but I need it to work on the first click.

What am I doing wrong?

Again,

Thanks

Unloading
Basically I followed along with a tutorial about how to create a memory game in flash. The only issue I have is that I want to be able to unload the game once the user progresses past that part of my flash. I have tried fooling around with a couple unload functions and clear functions but I don't think I'm recognizing which variable/movie I need to have unloaded for the cards to actually go away!

A simple forceclear function to remove all actionscrpit would be very handy!

here's the code that is loaded into the frame...


Code:

Code:
// Gamefield settings

// EDIT HERE
card_w = 70;
card_h = 90;
card_wdistance = 17;
card_hdistance = 15;

// STOP EDIT
card_dw = card_w + card_wdistance;
card_dh = card_h + card_hdistance;
row_card = Math.floor((Stage.width - card_wdistance) / card_dw);
col_card = Math.floor((Stage.height - card_hdistance) / card_dh);
n_card = col_card * row_card % 2 == 0 ? col_card * row_card : (col_card - 1) * row_card;
imgs_n = n_card / 2;

// CENTER THE IMAGE IN THE CARD
centerImage = function(target){
target.front._visible = false
target.front.container._x -= target.front.container._width / 2
target.front.container._y -= target.front.container._height / 2
}
// ---------------------------------------------

empty = new Array();
function createCard(n, w, h) {
empty.push(n);
this.createEmptyMovieClip('card' + n, n);
with (this['card' + n]) {
lineStyle(0, 0x000000, 100);
beginFill(0x000099, 60);
moveTo(w / 2, 0);
lineTo(w / 2, h / 2);
lineTo(-w / 2, h / 2);
lineTo(-w / 2, -h / 2);
lineTo(w / 2, -h / 2);
lineTo(w / 2, 0);
endFill();
createEmptyMovieClip('front', 1);
front.createEmptyMovieClip('container', 2);
front.createEmptyMovieClip('backgr', 1);
with (front.backgr) {
moveTo(-w / 2, -h / 2);
lineStyle(0, 0x000000, 0);
beginFill(0x333333, 100);
lineTo(w / 2, -h / 2);
lineTo(w / 2, h / 2);
lineTo(-w / 2, h / 2);
lineTo(-w / 2, -h / 2);
endFill();
}
front.onEnterFrame = function() {
tot = this.container.getBytesTotal();
car = this.container.getBytesLoaded();
if (tot == car && tot > 200) {
this._parent._parent.centerImage(this._parent);
delete this.onEnterFrame;
}
};
}
}
selcards = [];
function placeImages() {
act_img = 0;
for (img = 0; img < imgs_n; img++) {
for (k = 0; k < 2; k++) {
act = Math.round(Math.random() * (empty.length - 1));
this['card' + empty[act]].img_id = act_img;
this['card' + empty[act]].front.container.loadMovie("imgs/img" + act_img + ".jpg");
this['card' + empty[act]].onRelease = function() {
this.rotateCard(0, 0);
this.enabled = false;
MovieClip.prototype.enabled = false;
};
empty.splice(act, 1);
}
act_img++;
}
}
MovieClip.prototype.rotateCard = function(v, i) {
this.operazione = v == 0 ? +0.1 : -0.1;
this.incremento = i == 0 ? 100 : 10;
selcards.push(this._name);
this.onEnterFrame = function() {
this.incremento += this.operazione;
this._xscale = (100 * Math.sin(this.incremento));
if (this._xscale > 0) {
this.front._visible = v == 1 ? false : true;
}
if (this._xscale >= 99) {
delete this.onEnterFrame;
selcards.length < 2 ? MovieClip.prototype.enabled = true : null;
v == 0 && selcards.length > 1 ? checkCards() : null;
}
};
};
function generateGameField(cards, distance, hdistance) {
Ypos = card_h / 2 + hdistance;
Xpos = card_w / 2 + distance;
for (c = 0; c < cards; c++) {
createCard(c, card_w, card_h);
if (c % row_card == 0 && c > 0) {
Ypos += this['card' + c]._height + hdistance;
Xpos = card_w / 2 + distance;
}
this['card' + c]._x = Xpos;
this['card' + c]._y = Ypos;
Xpos += this['card' + c]._width + distance;
}
placeImages();
}
generateGameField(n_card, card_wdistance, card_hdistance);

score = 0;
this.createTextField('punti', -1, 500, 380, 0, 0);
punti.autoSize = true;
punti.text = 0;
function checkCards() {
if (this[selcards[0]].img_id == this[selcards[1]].img_id) {
score++;
punti.text = score;
eval(selcards[0])._visible = eval(selcards[1])._visible = false;
} else {
eval(selcards[0]).rotateCard(1, 1);
eval(selcards[1]).rotateCard(1, 1);
eval(selcards[0]).enabled = eval(selcards[1]).enabled = true;
}
selcards = [];
MovieClip.prototype.enabled = true;
}

stop();
I don't really care how, but I need to find out any way to completely unload this game.... I'm pulling my hair out over this because it's probably so simple.

Maybe encapsulating all the code into an object and unloading the object? I don't understand much actionscript but I am an experienced coder..

Copyright © 2005-08 www.BigResource.com, All rights reserved