Is It Possible To Cache Images?
Hi everyone,
I try to create Images Gallery website with Flash, but it's slow down. I used XML to store the path of images. My site has 2 buttons( previous and next button) to navigate across images. I put an instant movie in stage and use loadMovie(url) method to load Images in it. When I navigate to previous image that I navigated before, it's always reload. I want to ask you is it possible to cache images? it can be loaded one times and reused?
Please give me some advice.
Here my code:
ActionScript Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
}
}
Thanks,
Best regards,
Ultrashock Forums > Flash > ActionScript
Posted on: 2006-03-13
View Complete Forum Thread with Replies
Sponsored Links:
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
View Replies !
View Related
Cache Images
PLEASE HELP!!!
Im using the "loader" component to load/display images on my site. The images are somewhat large at 74k-350k causing serious delays/lag when viewing. I was wondering if it were possible to preload/cache all images when the site launches so that it may run smoother. Is this possible using the loader component?
Thanks in advance for your help!
View Replies !
View Related
Don't Cache Images
I'm loading the same image into an empty movie clip over and over again. I want the image to be properly loaded each time rather than using the cached version as the image changes (it is updated by a webcam). So to do this I'm using:
ImageContainer.loadMovie("/Image.jpg?" + random(9999999));
but this doesn't seem to work as the image is exactly the same each time it loads (Flash MX04 Pro)
any ideas
thanks all
View Replies !
View Related
Don't Cache Images
I'm loading the same image into an empty movie clip over and over again. I want the image to be properly loaded each time rather than using the cached version as the image changes (it is updated by a webcam). So to do this I'm using:
ImageContainer.loadMovie("/Image.jpg?" + random(9999999));
but this doesn't seem to work as the image is exactly the same each time it loads (Flash MX04 Pro)
any ideas
thanks all
View Replies !
View Related
Loading Images In The Cache
Hi everybody,
If I have a mainmovie that loads other external movies, and while those loaded movies are shown, I have, in my main movie, an script loading jpg images, to have them in the user's computer cache, for when I want to use those images later, would the performance of the movie be affected? Would that script and the loading of the "hidden" images make slower the loaded external movie?
View Replies !
View Related
Problem With Cache And Images
hi there,
i am almost new to flash....i am one step far from publishing my first flash-simple-website but found out a little problem. that is....this site displays a slideshow as soon as it loads. jpegs are external files. sometimes i need to update the pictures because it is a photographer's website. i saw that evenif i upgrade the image files via ftp , new imagefiles that have the same name of old files are not displayed and site keeps displaying old images cached in local pc.
is there any way to avoid this?? i would like that everytime users connect to this website, any image is stored and saved locally.
thanks in advance!!
daniele
View Replies !
View Related
Loading Images In Cache
Hi,
I'm looking for a bit of help here.
I'm trying to load a set of images into cache on creation of a flex application and then calling them into different states.
I need to load 20 screenshots (as they are 150kb each) into cache and then call one image at a time into different states.
Could someone point me in the right direction?
Thanks heaps
Alex
View Replies !
View Related
Loading Images In The Cache
Hello everybody,
Is it possible to have some images loading without the user notice it (and without the movie to become slower, etc), so that the user will have those images in the cache of the computer, and when the images are necessary, they can be shown without delay?
Thanks a lot for your help
View Replies !
View Related
Getting Flash To Cache Images
Hi Everyone,
This may be a stupid question that needs to be moved to the stupid question section but here goes...
I completed the tutorial for the carousel but I noticed that the first time a visitor views the page, the images are slow to load. preloading does not seem to help. Is there any way to get flash to cache images BEFORE an MC is even loaded.
example here: http://www.WhoBallyhoo.com/index2.html
(click on performers)
thanks!
C
View Replies !
View Related
HELP Cache Problems With Images Through LoadMovie
I have a movie that attaches a movieclip through attachMovie, and inside that movieclip I call it to load an image file. My first publish, the image loads fine, I close the movie, clear my Internet explorer Cache, then I open photoshop to change the image, and save. The problem comes here. To make sure everything is cleared, I clear the Cache from IE again, then i proceed to run the movie. With the binaries in the Image changed(changing the image in photoshop), i try to load the modified image, but the modified image won't load. But now when i replace the modified image back to the original image, clear the cache, then run the movie again, it loads correctly.
There's something that's not clearing inside the computer that flash constantly keeps looking for the same information. Does anyone know how to help me on this one?
We use attachMovie to load the movieclip(MC1), we load the image inside a MC that's inside MC1, and then when MC1 finishes playing(._currentframe == ._totalframe) we do removeMovieClip.
I've tried this several times, and there are no changes. I even went on different computers and tried it, and the same problem occurs. Can someone help me?
View Replies !
View Related
I WANT Flash To Cache Dyanmic Images.
Hey guys, I've got a flash that is pulling dynamic images from a database in SQLserver2005 and I want to know if there is a way flash can cache these images. It gets the image by a link to the aps data bae like http://www.foo.com/fooAPI/GetfooImage.aspx?foo_ID=1 and if you opened this up in a browser it'd be an image.
The flash will cache images that were loaded from a directory no problems.
View Replies !
View Related
[F8] Preload Images To Browser Cache
I have what I hope is a simple question. If I use a flash movie on one page to preload external images, are said images preloaded to the browser cache, much as they would be javascript? Thus making subsequent site pages load faster? I have large background image files on two pages and am looking for a non-js preload method. CSS is alternative of course, but it causes the front page to remain in loading status longer.
Thanks!
View Replies !
View Related
[F8] Preloading Images Into Cache With Javascriptch3e
Hi,
I just would like to know if this works. I've tried it on a site, but I am not sure if it works properly.
What happens is I load a list of images into my project Via XML, however I want to load them into cache, before my flash even thinks of loading them.
Here's the JavaScript that I think loads into cache:
Code:
<script type="text/javascript">
if (document.images)
{
pic1= new Image(187,187);
pic1.src="images/DIG2_2900.jpg";
pic2= new Image(187,187);
pic2.src="images/DIG2_2750.jpg";
pic3= new Image(187,187);
pic3.src="images/DIG2_2751.jpg";
pic4= new Image(187,187);
pic4.src="images/DIG2_2765.jpg";
pic5= new Image(187,187);
pic5.src="images/DIG2_2752.jpg";
pic6= new Image(187,187);
pic6.src="images/DIG2_2899.jpg";
pic7= new Image(187,187);
pic7.src="images/DIG2_2764.jpg";
pic8= new Image(187,187);
pic8.src="images/DIG2_2763.jpg";
pic9= new Image(187,187);
pic9.src="images/DIG2_2760.jpg";
pic10= new Image(187,187);
pic10.src="images/DIG2_2753.jpg";
pic11= new Image(187,187);
pic11.src="images/DIG2_2898.jpg";
}
</script>
Can anyone give me some insight if you think this will work.
Thanks
View Replies !
View Related
Does Flash Locally Cache Images?
hi there,
Most web browsers have local caching capabilities for images and other media.
How does a standalone or browser-embedded flash player go about caching?
Is there any media caching at all?
(not a MMCentral embedded player, which has it's own caching API)
cheers
View Replies !
View Related
Preloading Images To Browser's Cache
Hi,
I'm working on a flash gallery project where images are loaded through xml file.I have some buttons in the gallery for different categories of images to be shown. Is there a way to preload images to browser's cache prior to them being called.?,I'm using AS2.
Thanks in advance...
View Replies !
View Related
Need To Force A Directory Of Images Not To Cache
I have a flash banner ad that calls the images it uses from outside of the movie. This keeps the flash file size down and allows for easy updating of the rotating images in the movie as I only need to upload the new images.
My problem is that I suspect the users browser is caching the images and unless they clear their cache the new files are not seen upon entry to the page.
How can I prevent these images (they are in their own directory) from not being cached on the users computer but are called every time they are accessed?
I understand that I can write code and script so the page will not be cached but these images are not called from the the page but rather from the flash movie. Here is the actionscript that I am using right now to load the pics with "imageholder1" as the movie clip in the frame.
loadMovie("http://www.saylorvillebaptist.com/images/banners/flash/2.jpg", "imageholder1");
Thanks for the help.
View Replies !
View Related
Cache'ing Images Loaded In A Flash Movie...
K, i'm making a website that needs to display previews of various items of clothing. Now that we've got a fair sized stock of different kinds of clothes, the flash file is gett very large. I have decided to create a movie clip that when you roll over a button, it loads an external jpg. My problem is that its not loading the right size...like, i gotta make my movie clip about 7x9 pixels to accomodate a picture 338x450 pixels...how can i make them match up? or at least be centered so i don't need a new movie clip for every pic. My problem tho, is that when you roll out, it unloads the movie...so, it would suck major bandwidth if i let people run their mouse over the pics like a hundred times. Anyone got ideas for me?
View Replies !
View Related
Making Flash Not Cache Images That Are Loaded Into It...
Hey all,
I currently have a flash file that loads external images from my webserver. The flash file is here: http://usu.csun.edu
What it does is load external images for the small buttons and the larger image. The thing is it will cache these images and when I change them they stay cached. So the flash file calls main1.jpg (a picture of a cowboy) and then I overwrite main1.jpg with a different image but also called main1.jpg (a picture of stars) it will keep loading the cached image of the cowboy.
I have put Meta tags in the actual HTML to not cache, but those images are still cached. Is there some kind of action script or something to tell my flash file not to cache those images?
Thanks for any help you can give me.
-Daniel
View Replies !
View Related
Cache Loader Images Prior To Loading?
hi,
is there a way to cache external jpg images prior to them being called with the loader component? download them in the background and not when the parent movieclip is loaded? i am trying to keep the user from having to wait either at the beginning to load the flash mc, or during it as well.
would it work if i had the parent html document preloadimages or would flash be looking somewhere else for them?
also, can i use a fade effect on externally loaded images?
thanks for any help
View Replies !
View Related
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
View Replies !
View Related
Preload Multiple Dynamic Images To Cache In Flash Mx
I have made a dynamic xml gallery in flash, and am trying to preload all the dynamic images before the movie plays, so the user only has to only wait at the beginning of the movie, and not while each individual thumbnail is clicked.
Al the moment I have
preload_mc.loadMovie("pics/br_img_01.jpg" ;
preload_mc.loadMovie("pics/br_img_02.jpg" ;
preload_mc.loadMovie("pics/br_img_03.jpg" ;
.. and so on... the images load into the mc, but when they are called when the user clicks on the thumbnail, they take time to load.
Is there any way that i can preload the images into the users cache? there will be about 30 image in total.
thanks Jane
View Replies !
View Related
Preload Multiple Dynamic Images To Cache In Flash Mx
I have made a dynamic xml gallery in flash, and am trying to preload all the dynamic images before the movie plays, so the user only has to only wait at the beginning of the movie, and not while each individual thumbnail is clicked.
Al the moment I have
preload_mc.loadMovie("pics/br_img_01.jpg" ;
preload_mc.loadMovie("pics/br_img_02.jpg" ;
preload_mc.loadMovie("pics/br_img_03.jpg" ;
.. and so on... the images load into the mc, but when they are called when the user clicks on the thumbnail, they take time to load.
Is there any way that i can preload the images into the users cache? there will be about 30 image in total.
thanks Jane
View Replies !
View Related
How To Load (and Cache) Series Of Images Detecting Last Downloaded Image
Hi Friends
Intro: I am developing a slideshow kind of project with all heavy images. If I embed it, the movie becomes deadly heavy to download n play; and when i am reading the images everytime from outside (thru LoadMovie) customer is not liking it ... so that's the background.
Work-around: I embedded 1st image and then calling other images thru LoadMovie.
Expectation: when the user is reading the very first slide, in the background Flash should automatically download the forthcoming movies and get them cached. I am able to write the code for downloading single image on the fly i.e.
code:
function createMuvi(siraj)
{
_root.fordisp.createEmptyMovieClip(siraj);
this._x = 890;
this._y = 120;
this._xscale = 10;
this._yscale = 10;
this.loadMovie("images/" + siraj + ".jpg");
}
//when calling...
createMuvi("pic6");
.........now I need to download the complete series images (pic1.jpg, pic2.jpg.... picN.jpg) based on detecting which was the last imaged downloaded. This is it I would really appreciate the helpful gesture.
Thanks,
Siraj
View Replies !
View Related
How To Load (and Cache) Series Of Images Detecting Last Downloaded Image
Hi Friends
Intro: I am developing a slideshow kind of project with all heavy images. If I embed it, the movie becomes deadly
heavy to download n play; and when i am reading the images everytime from outside (thru LoadMovie) customer is not liking it
... so that's the background.
Work-around: I embedded 1st image and then calling other images thru LoadMovie.
Expectation: when the user is reading the very first slide, in the background Flash should automatically download the
forthcoming movies and get them cached. I am able to write the code for downloading single image on the fly i.e.
ActionScript Code:
function createMuvi(siraj)
{
_root.fordisp.createEmptyMovieClip(siraj);
this._x = 890;
this._y = 120;
this._xscale = 10;
this._yscale = 10;
this.loadMovie("images/" + siraj + ".jpg");
}
//when calling...
createMuvi("pic6");
.........now I need to download the complete series images (pic1.jpg, pic2.jpg.... picN.jpg) based on detecting which was the
last imaged downloaded. This is it I would really appreciate the helpful gesture.
Thanks,
Siraj
View Replies !
View Related
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
View Replies !
View Related
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
View Replies !
View Related
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.
View Replies !
View Related
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
View Replies !
View Related
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
View Replies !
View Related
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
View Replies !
View Related
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?
View Replies !
View Related
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.
View Replies !
View Related
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
View Replies !
View Related
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.
View Replies !
View Related
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?)
View Replies !
View Related
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
View Replies !
View Related
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.
View Replies !
View Related
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.
View Replies !
View Related
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
View Replies !
View Related
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.
View Replies !
View Related
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?
View Replies !
View Related
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());
View Replies !
View Related
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?
View Replies !
View Related
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?
View Replies !
View Related
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.
View Replies !
View Related
|