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




Calling Swfs From Server Not From Cache



OK,

I'm putting up a flash site which has one page which has to be updated weekly. (It contains the minutes for a meeting that takes place every Monday).

But what's happening is that when the viewer clicks on the button to open the external swf containing the new minutes in a mc on the main timeline, it's calling the file stored in their cache from last week rather than the updated version which I've put on the web.

I know this is to do with relative links etc but I can't get the button on the main timeline to call to the server rather than the cache.

Please help!!!!

Thanks for any tips.

Mustafalaf.



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 07-21-2005, 04:25 PM


View Complete Forum Thread with Replies

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

Cache SWFs
I have an swf that is basically a header for every page on this website. It has quite a bit of navigation to it and so it needs a preloader. However, everytime I go to another page, it reloads the movie. Is there a way to cache the swf to prevent this?

Loading From Server Instead Of Cache
ok I have this script im working for a member directory so people can edit their own car profiles instead of having me do it all the time... This is my problem...

when you log on... it will load the data to be edited.. these fields come from a text file example...

name.txt / city.txt / state.txt

now lets say it loads PA as the state... when I go and change it to CA.. and submit the change... it will actually change the state.txt to CA but when you go to view the page it will load the PA. It seems like its loading from cache the old fields.

how can I make sure the data is being loaded from the server instead of the cache?

Problem With Server Cache?
Hi,

I have a flash site, with a content manager in php wich modify the xml pages

the flash takes the information from the xml files

the problem is that when I change one xml file, the flash doesn´t refresh. I think the problem is with server cache.

any idea how can I fix it?

thanks.

Swfs In Browser's Cache
i have a question about swfs in the cache. any help would be much appreciated.

i have an html page (one.html) which has a swf embedded in it (one.swf).
this swf loads another swf (map.swf) into itself - so map.swf is now in the user's cache.
i have another html page (two.swf) which has its own swf embedded in it (two.swf) and this swf also loads map.swf into itself.
what i'm wondering is, since map.swf is now being called from a different html page and a different swf, will the browser realise that map.swf is already in the cache?

can anyone enlighten me?

Cache Issues And Swfs.
This have never happened to me before but I am now experiencing cahcing issues when I upload new swfs to my site space and go to view them. Can anyone recommend how to correct this? I have deleted my temp. internet files, history and cookies, but it didn't seem to help.

Thanks in advance!

Overriding The IE Or Proxy Server Cache
I am having a problem with laoding the new swf into teh movie. I have swf that needs to be changed quite frequently. But when I load it from the main movie the swf that laods is usually old. Noramlly due to my IE cache and sometimes due to the proxy server cache. If it was HTML page, refresh would have helped btu refresh doesnt work here. Is there any way I can make sure that the files are loaded from the main server and not from cache?

How To Loadmovie Straight From Server And Not From Cache ?
I have a whole site in flash. using `loadmovie` to load layer over layer.
Only the first page, the index is , ofcourse in HTML. all the rest is SWF.
Listen to my problem:
Whenever I make the slightest change to the site`s files on my server it will take
up to a day or two before my surfers, in my country, will see the update(even though they cleared their cache)
Sometimes the site would get stuck alltogether for a day or two as a result of an update.
Suspecting it was a cache problem I called my ISP who explained to me that broadband ISP`s have routers that have internal caches and that`s the problem !
My ISP promised me to take my site out of their router cache and they did just that and ever since neither do I nor anyone surfing through this ISP has any problem viewing immediately any changes made on my server to my site.
But I can`t ask each ISP in my country to that for me…
Does anyone know of an actionScript code that I can just put in my SWFs to make sure that each time I `loadmovie` it loads straight from the server and not from any sort of cach ?
Please assist, Its a site for abandoned dogs and cats aid shelter , so you`ll be doing a good deed , twice, by helping !
Thanks In advance.
http://www.parvatonim.org.il

How Can I Prevent SWFs Loading From Cache...
Hi All !!!!

Im really in deep sh1te here

Ive past my deadline on a site, and i hit a HUGE prob

U see, my site has 2 sections, private, plus public, same filenames in each, plus, it gets updated 3x a week, BUT

Heres the bugger-up... The browser laods the files from cache, so like u cant see updates and priv + pub mixed, etc, im sure u get my point...

Im sure alot of u ppl out there must have experienced the same prob, Is it possible for me to fix this ??? Or tell player/browser to skip or pass or delete cache or something ???

Im real desperate here, if anyone can help me in anyway, it would be GREATLY appreciated !!!

Many Millions of Thanks,

The Loomster

Cheers All !!!!

Checking Cache For Existing .swfs?
Hi,

I am perplexed as to how to check the user's cache for the existence of an already loaded .swf. I am hoping to check if a certain .swf already exists so that I can tell it not to display again. This would be helpful, say if the user didn't want to see the opening .swf every time they went to another page (or reloaded the same) which contained the .swf sequence.

I thought that setting a cookie on their system might work, but then again some people turn cookies off.

Any ideas?

Preload Swfs In Browser's Cache
hello all.
the way i've been building sites is as follows: i have a main.swf into which i load additional swf for each button.
i was hoping somebody could tell me if (and how) there's a way to preload those swf's into the user's cache so that when these swfs are called , they load immediately.
thanx for you expertise and help

you can see examples here : spiracell
sunrise

Loading Multiple Swfs To Cache
I have the following code below:


Code:
myMovies = new Array("car_sales.swf", "community.swf", "food.swf");
var x = 0;

// Create a MovieClipLoader object instance and a standard listener
var mcl:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();

// STEP 2: Spell out what you want to happen with given MovieClipLoader events,
// and assign that to the Listener object.
myListener.onLoadStart = function(container_mc:MovieClip) { // This will trace out when the MC starts to load
trace("------------ START -------------");
trace("Your load has begun on movie clip = "+container_mc);
};
myListener.onLoadComplete = function(target_mc) { // This will trace out when the MC is done loading
trace("------------ COMPLETE -------------");
container_mc.setMask(mask_mc);

target_mc.onEnterFrame = function(){
//trace('checking this frame');
if(this.isStopped == 1){
trace('clip is done');
mcl.unloadClip(container_mc);
x++;
if (x == myMovies.length )
{
x = 0;
}
mcl.loadClip(myMovies[x], container_mc);
}

}
};

// STEP 3: Register "myListener" with the MovieClipLoader object
mcl.addListener(myListener);

// load clip into container
mcl.loadClip(myMovies[x],container_mc);

It will automatically play all the swfs in a constant loop.. what i want to do is make sure they don;t have to load them up each time..

so one way i thought of doign it was loading the next clip while the current one is playing but not having it start playing until the current one is done..

anyone be able to point me in the right dirrection?

Can i load a swf with out playing it.. like nextclip.stop() or something?

Preloading External Swfs Into Cache
Hi, I'm creating a flash based cd-rom where the main flash file houses the navigation and sound controls. The navigation buttons when clicked load in external swf into a movie clip on the main movie.

When running the cd all works fine but I wondered if there was a way to prevent the pause whilst the cd loads the called movie clip.

Can I run some sort of preloader at the beginning to load all the external swfs in (without playing) into the users cache.

If so will this prevent a slight pause? Or are there any other methods?

Many thanks

Ryan

Javascript To Force A Server Cache To Clear
I have a series of flash games that communicate with a database. Every time there is communication between the 2, the protocol carries a version number for the software, in case a new version is now being used, and the software should be reloaded.

Does anyone know of a javascript function that I can place in the HTML code of my Engine's HTML file that can force the server cache to clear?

Cache... Check For Newer Documents On Server.
OK... this is probably pretty lame but whatever... :wink:

So heres the thing... as I'm updating .swf files and stuff, and uploading them to the server... most people aren't going to see the new .swf until their browser deletes their cache. I have my browser automatically check for newer documents on the server but I need some kind of script or something to do that when they load the .html file.
I don't want to disable caching... just check for newer documents on the server.
Thanks

Checking For Updated SWFs (cache Problem)
http://www.mannymedia.com

I have a cache issue here at work... when I update my site I dont get to see it until 1-2 days after its up...

I'll update news.swf, but see the older version of news.swf...

Is there any code that will look for updated .swf files and push them, if not keep the same .swf.

I DONT DONT DONT want to make it where my site doesnt cache. My portfolio pieces will stay the same, so I dont want to have viewer to have to download the same .swf over and over...

THANKS!

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

Blank Screen Flash When Using Loadmovie With Swfs In Cache
Hi all
I'm an avid lurker, but this is my Very First Post!

I'm loading external swfs into a mc using loadMovie and if the user reloads one of the swfs I get a flash of a blank screen before the movie loads.(since the file is cached)

I am using a preloader and I've put in a test for if fully loaded, then dont display the preloader, but I still get a momentary white flash.

I vaguely remember reading something about using loadMovieNum and loading into a level then duplicating a mc in another level underneath then using the duplicated level underneath to show through instead of the blankscreen - Anyone tried this or something else?

Thanks in advance

Loading External JPEGs/SWFs; Cache Problem?
Hi,

I last posted to this board about a week ago concerning what I thought was a cache issue with loading external .swfs and .jpgs.
I think now that it might be a bandwidth issue, or something relating to attempting to download multiple files into the same location.

The link below is a work-in-progress portfolio site that loads different .jpgs and .swfs into the same holder MC. I'm not unloading or removing these files, so I thought that once uploaded, these files would swap back and forth instantly.

On a high speed connection, everything works fine. In IE 5.0 on a dial-up Mac, they seem to be loading repeatedly as if they were never cached. Occaisionally, I have given the command to load one file, then requested a second one, only to have the first file come up. If anybody has any ideas about what I'm doing wrong, please let me know.

LINK:
http://www.randymillerdesign.com/collection/indexL.html

FLA:
http://www.randymillerdesign.com/co...imageTabs7l.fla

.as file (would need to be in same directory as .fla when published):
http://www.randymillerdesign.com/collection/nav1.as

Couple of things:
-The file extensions of the JPEGs have been switched to ".jjj", to account for the AOL bug of converting ".jpg" to ".art"

- The "WEB" section of the .fla is not completed, so the nav may give you weird results for that section.

Thanks to anyone who has any ideas about what could be causing this.

Randy

Force Cache, Prevent Same Swfs From Being Loaded On Each Page
Hello,
I have the same two .swf files that appear on just about every page of my site. Yet, each time I click on a new page, I see the .swfs load (white empty space for a few seconds, then the swf appears).

how can I force cache these files, so they appear automatically, no white areas, no loads?

I figured the browser would cache it automatically. maybe this is the case, but why do I get the empty white areas with delay?

http://www.thefillmore.com/directions2.shtml

thanks so much!
A

Preloading Multiple SWFs Into Cache And Playing Them Sequentially
Hello

I've seen a lot of posts on this subject, and I promise I've tried endlessly to make sense of the solutions that other people have posted. But I cannot seem to get any code to work my my purposes, so I decided to post my own thread.

I have a main parent Flash movie that I need to load 7 exteral SWFs into. Each of the SWFs is like its own scene in a longer movie. The final parent movie should play each external SWF movie sequentially so that it appears as one combined movie. I want to use a preloader for the first couple of loaded SWFs (maybe the first 2-3) so that the parent movie does not start playing until those movies are fully loaded. Then I want to continue to preload the rest of the external SWF files into the cache so that they are fully loaded by the time the parent movie gets to playing them. Does this explanation make sense?

Basically, I have a long Flash animation that I decided to split up into several individual movies. I've using the parent movie to seamlessly string together my individual movies to give the appearance of cohesion. I know how to use the LoadMovie function to load the SWFs into empty movie clips. That's no problem. However, I'm having difficulty with the prelaoder aspect. I am optimizing the parent SWF for the web, and it's important that the video plays seamlessly, so I cannot put individual preloaders onto each external SWF. They have to preload at the beginning so that when each individual SWF is called, it's already loaded and no preloader is required.

Can anyone please help me with this?? I'm working under kind of a tight deadline, and I tried to the best of my ability to solve the problem using comments from previous posts, but I have been unsuccessful. Thanks again for anyone's help.

Preloading Multiple SWFs Into Cache And Playing Them Sequentially
Hello

I've seen a lot of posts on this subject, and I promise I've tried endlessly to make sense of the solutions that other people have posted. But I cannot seem to get any code to work my my purposes, so I decided to post my own thread.

I have a main parent Flash movie that I need to load 7 exteral SWFs into. Each of the SWFs is like its own scene in a longer movie. The external files are called:

mc1.swf
mc2.swf
mc3.swf
mc4.swf
mc5.swf
mc6.swf
mc7.swf

The final parent movie should play each external SWF movie sequentially so that it appears as one combined movie (so none of the loaded SWFs are actually playing at the same time - they should only play one at a time, one after another). I want to preload mc1.swf, mc2.swf and mc3.swf into the cache before the parent movie starts playing (and I would like to include a progress bar to indicate loading status). Once those SWFs are preloaded, I would like them to start playing sequentially while the rest of the SWFs load in the background. Does this explanation make sense?

Basically, I have a long Flash animation that I decided to split up into several individual movies. I've using the parent movie to seamlessly string together my individual movies to give the appearance of cohesion. I have determined that I should use the MovieClipLoader Class and loadClip() to accomplish what I am trying to do. However, I have a very limited knowledge of actionscripting, so this has been a major challenge for me.

I am optimizing the parent SWF for the web, and it's important that the video plays seamlessly, so I cannot put individual preloaders onto each external SWF. They have to preload at the beginning so that when each individual SWF is called, it's already loaded and no preloader is required.

Is there any way someone could write out some sample code for me please? Any help would be GREATLY appreciated because I am working under a bit of a tight deadline.

Thanks in advance.

Calling 2 Swfs
Im trying to call 2 swfs but only one will appear. I guess you cant put one on top of the other one. I have one swf that runs both. So i have the backgrd as one swf, then caling some clouds and some script text in another. I call one of the swfs on one layer and put the other one on a layer above it but only one will play. Any ideas. I can give the fla if necessary. Thanks

Calling A Php File On A Different Server....
I am trying to get a call to a PHP file that is place on a different server.... but I am running into the sandbox security issue. I have tried to deprecate my flash code to Flash 6 thinking the security would be lower.... but I just cant figure it out.

How do I call a PHP file on a different server and not getting security raped?

Calling Through Swfs And Levels
This is the low down.
• I have a main movie(mainPage) with nothing realy in it
• The navigation(mainMenu.swf) loads into mainPage at level 50
• One of the main navigation buttons loads a sub-menu of buttons(subMenu2.swf) into a movie clip(instance name = empty) in mainMenu on level 50.

The problem is I cant figure out how to call out a button(btn1Sub2) from the first frame of my main movie(mainPage).

How do i specify the swf's in dot syntex?

_root."mainMenu.swf"."subMenu2.swf".btn1Sub2 ?
_root.level 50.empty.btn1Sub2 ?

I have no idea, I've tried a bunch of crap.
Anyone have any idea about this?

If you need more information on the structure just ask
This is killing me! it should be so simple.

Calling Swfs From Sub Directory
I have a main swf loading in a swf from a sub folder on the server. The swf being loaded uses a relative link to load in an external text file (variables) located on its level. The obvious problem is that once the swf located in the parent directory consumes the swf from the sub directory, the relative path to the text file is no longer valid. I've tried to diagram the directory structure below for clairity. Is there any way to get the relative path to work without changing the directory/file structure?

Parent Directory
---->main.swf
---->Sub Directory
-------->child.swf
-------->text_vars.txt





























Edited: 07/11/2008 at 11:11:19 AM by FearAndLoathing

Trouble Calling On TXT Files From The Server...
Hello expert!

I have a simple web site uploaded to Netfirms and I am using txt files from Notepad in a seperate folder. I have buttons that call on these files and I have followed the proper procedure....at least I think I have. Anyway, the text files come up with no problem when I am working at my computer, but once the site is uploaded, the buttons no longer bring the text into the field. I am sure that the folder has been uploaded and all the right files are in place....what could the problem be??

-Thanks much!!

Oceans777

Calling Images From Server Dynamically
I assume this is easier than I am making it.

I have developed a site for a photographer. Currently, the site calls about 40 "swf" files to display images with some fancy flash stuff, including a preloader and some fade-in effects.

What I want to do is have the photographer control the images by replacing (overwriting) them on the server.

So how exactly is the best way to do that?

Am am new to this.

The actual site is HERE

Calling Swfs From Another Host Location
I would like to call an swf into my movie/s from another host, eg: "www.domainame.com/code.swf" (like loadMovie) Is this possible?

I am making a site, and wish to keep my custom actions to myself by keeping them on my server, and putting the main interface swfs on their site. Can this be done?

It would also be good as I can use the same actions for every site/movie I make, and update all the sites at once...

Thanks,

munkmotion
http://www.munkmotion.com

Prob W/ Macs Calling Swfs
I've built a piece in MX to be played locally off of a CD. It uses load movie actions on buttons to call various swfs to play (all at level 0--so they just replace what is on screen when the button is clicked).

I've published it as a projector file for both Mac and PC, and it plays fine off of the two PCs that I've tested it on. However, on the iBook with 9.0 that I tested it on, it plays the intro piece in the projector file just fine, but when I click on any of the buttons, it won't call the swfs to play. Nothing happens, I just get an empty stage. I made sure that the swfs are all in the same directory (desktop) as the projector file that calls them, so I don't know why it's not working.

Any help would be greatly appreciated. Thanks.

Client Calling Web Service Through Media Server
Can anyone provide a good example of a client getting data from a database through a remote media server call. The server in turn will need to make a web service call.

Calling Methods On Multiple Clients From The Server
Anyone please give me an advice on this: from the server, i want to call a function on all connected clients. i have two ways to do this..either i use sharedObject.call or i loop through all the clients and use client.call ... Im more comfortable with using the second technique...but im wondring if there a difference in terms of performance if i use the second one over the first, or the other way around..Please give me your advince on this.. thank you so much

Flash Calling Server Side Script Only Once
Hi all,

I am making a movie in which flash will call a ASP.NET page, which in turn gives a random ID, which is assigned as a file name to the user recorded streams. The Page will be called upon pressing Record button.

When I compile the flash movie, pressing Record button gives me a new ID every time the page called. Every thing is fine.

But the problem is, when I embed the SWF in a browser, or let say, when tested in localhost, the flash makes a call to the .NET page for the first time, but not later, and the ID being the same as first, the recorded streams are over writing. I want it to be unique every time user records a stream.

What may be the problem, when embedded in browser, flash calling the .NET page only once and not later.

Could some body please help me here...

Thnx
pandu

Hello , I Need Urgent Help In Calling External Protected SWFs
Hello every one.

I need the following help:

Legend : p1 , p2 and p3 are protected swf files in which i cannot enter gotoframe AS commands. Please read the situation below.

1) Main.swf calls p1.swf at frame 1
2) Plays p1.swf till p1.swf is done playing comlpetely
3) Closes p1.swf
4) calls p2.swf at frame 2
5) Plays p2.swf till p2.swf is done playing completely

and so on with p3.swf and p4.swf and more such files.

Actually I have got a sequence of protected swfs which need to be played in sequence. the original FLA files are lost.

Please guide as to how the above can be achieved. Also please mention if there are internal AS commands in such protected movies , can they be overridden ?

if I loadmovie at frame 1 and call p1 and at frame 2 call p2 and at frame3 call p3, all p1 , p2, and p3 at diferent layers , The movie slider just skips all the initial swfs and play the last one.

This is really sickening. In director we used to use lingo to get if the last frame hs reached playing of any specific movie and then tell it to kump it to another frame thus easilt achieving what is required.

how to do the same in FLASH or if any other alternative.

I will be really thankful if some one could chat to me in Yahoo Messenger as this is a bit urgent. My yahoo ID is : acpadhi I promise I will post the solution from that person here.


Regards,

Anand

Flash On Cd, Calling External Swfs, Preloading?
hi, i've created a project that i'm putting on cd-rom. this project calls some externals swf files. everything was working lovely until i tried it from the cd. all the called swf files are running way slow and it's just a mess.

so i'm trying to figure out preloading to see if that will help. i used some script i found in a thread by Scotty, and looks like the external swfs preloaded okay. and i put a stop() on the first frame of each of the external swfs so they will not play immediately. but now i'm trying to call the swfs when i need them by using a gotoAndPlay(frame) and don't know what i'm doing wrong. i need to have these swfs not play on preload but when i call them, either by EnterFrame or onPress.


ActionScript Code:
stop();movieArray = new Array("clientsatprinciple.swf", "ccmvie.swf");var j = 0;var loadTot = 0;function preload() {var mvieH = this.createEmptyMovieClip("container"+j, 999+j);mvieH.loadMovie(movieArray[j]);var temp = this.createEmptyMovieClip("tmp"+j, j);temp.onEnterFrame = function() {var t = mvieH.getBytesTotal();var l = mvieH.getBytesLoaded();var loaded = Math.round((l/t)*100)/movieArray.length;bar._xscale = loadTot+loaded;info.text = "loading movie...";//or//info.text = loadTot+loaded+" percent loaded"if (t == l && t>1) {//mvieH._visible=0;loadTot += loaded;j++;nextMovie();delete this.onEnterFrame;}};}function nextMovie() {j<movieArray.length ? preload() : (info.text="", bar._visible=0);}preload();


and then on a later frame i currently have:

ActionScript Code:
onEnterFrame = function() {_root.container1.gotoAndPlay(3);}


... tried _root, and without and "this" and.... what am i doing wrong?

as an aside to this, some of the forums i've been reading say it's just bad to try doing all this with flash on a cd, that i should try rolling it into director. yowza, haven't touched director in a few years... any thoughts on that??

any help/pointers much appreciated, as i'm frustrated to tears at this point....

Flash On Cd, Calling External Swfs, Preloading?
hi, i've created a project that i'm putting on cd-rom. this project calls some externals swf files. everything was working lovely until i tried it from the cd. all the called swf files are running way slow and it's just a mess.

so i'm trying to figure out preloading to see if that will help. i used some script i found in a thread by Scotty, and looks like the external swfs preloaded okay. and i put a stop() on the first frame of each of the external swfs so they will not play immediately. but now i'm trying to call the swfs when i need them by using a gotoAndPlay(frame) and don't know what i'm doing wrong. i need to have these swfs not play on preload but when i call them, either by EnterFrame or onPress.


ActionScript Code:
stop();movieArray = new Array("clientsatprinciple.swf", "ccmvie.swf");var j = 0;var loadTot = 0;function preload() {var mvieH = this.createEmptyMovieClip("container"+j, 999+j);mvieH.loadMovie(movieArray[j]);var temp = this.createEmptyMovieClip("tmp"+j, j);temp.onEnterFrame = function() {var t = mvieH.getBytesTotal();var l = mvieH.getBytesLoaded();var loaded = Math.round((l/t)*100)/movieArray.length;bar._xscale = loadTot+loaded;info.text = "loading movie...";//or//info.text = loadTot+loaded+" percent loaded"if (t == l && t>1) {//mvieH._visible=0;loadTot += loaded;j++;nextMovie();delete this.onEnterFrame;}};}function nextMovie() {j<movieArray.length ? preload() : (info.text="", bar._visible=0);}preload();


and then on a later frame i currently have:

ActionScript Code:
onEnterFrame = function() {_root.container1.gotoAndPlay(3);}


... tried _root, and without and "this" and.... what am i doing wrong?

as an aside to this, some of the forums i've been reading say it's just bad to try doing all this with flash on a cd, that i should try rolling it into director. yowza, haven't touched director in a few years... any thoughts on that??

any help/pointers much appreciated, as i'm frustrated to tears at this point....

Preloading Other SWFs On A Web Server?...
I was wondering if there was a way to preload other SWFs on a web server before they load onto a page?...

For example, let's say I have six web pages that contain six different SWFs. When the first web page comes up and the first SWF is displayed, can I somehow "cache" the other five SWFs that are on the server and will eventually be seen on the other five web pages into the user's browser or something? That way, when they DO eventually reach these other five pages, they will appear right away because the SWFs have been pre-loading in the background as they were viewing the first SWF on the first page...

I hope this made sense. If you're wondering why I don't just have ONE webpage and load ALL the SWFs into that one page, I have already thought of that, but (due to the nature of my project) it's not going to be an option. Thanks!...

--Hoffman

P.S. - I am using Flash 8 Professional

Loading Swfs From Another Server Using XML
get ready for your brain to hurt, mine does...
so I have a slideshow that is dynamically loading in sfws from another server via xml. they need to fade in and out at the same time.
now my problem is that If I use any other type of image or am loading from the same server it works, however if I use a sfw it just loops through the first 2 swfs back and forth instead of going through the array.

the location of the xml is
http://www.thespaceproject.com/dealer/images.xml

and the actionscript code is

Code:
////////////////////// local testing only
this.dataFile = "images.xml"
///////////////////// local testing only

images_xml = new XML();
images_xml.ignoreWhite=true;
images_xml.onLoad = parse;
images_xml.load(dataFile);
Stage.scaleMode = "noSacale";

//create the containers
var container_mc = this.createEmptyMovieClip("container",0);
// movie clip containers
container_mc.createEmptyMovieClip("loader1_mc",2);
container_mc.createEmptyMovieClip("loader2_mc",1);
// preload watcher
this.createEmptyMovieClip("watcher_mc",3);

//XML variables
function parse(success) {
if (success) {
imageArray = new Array();
var root = this.firstChild;
_global.rotate = Number(this.firstChild.attributes.rotate);
_global.numPause = Number(3500);
_global.order = ("sequential");
_global.looping = ("yes");
_global.fadetime = Number(2);
trace(root);
var imageNode = root.firstChild;
var s=0;
while (imageNode.nodeName != null) {
imageData = new Object;
imageData.path = imageNode.attributes.path;
imageArray[s]=imageData;
imageNode = imageNode.nextSibling;
s++;
}





// parse array
imageArray();
imageGen(imageArray);
} else {
trace('problem');
}trace(imageArray);
}
//////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////


function createLoader(i,data,num) {
thisLoader=eval("container_mc.loader"+i+"_mc");
thisLoader._alpha=0;
trace(createLoader);
thisLoader.loadMovie(data[num].path);
watcher_mc.onEnterFrame= function () {
var padding = 10;
var picLoaded = thisLoader.getBytesLoaded();
var picBytes = thisLoader.getBytesTotal();
var padding:Number = 5;
var maxHeight = Stage.height-padding;
var maxWidth = Stage.width-padding;
if (isNaN(picBytes) || picBytes < 1) {
return;
}trace(data[num].path);
if (picLoaded / picBytes >= 1) {
swapPlace("container_mc.loader1_mc",0);
//add rotation, if _global is not defined it will be 0
container_mc.loader1_mc._rotation = rotate;
container_mc.loader2_mc._rotation = rotate;

//resize the child movie clips(loader1 and loader2)
if (container_mc.loader1_mc._width>=maxWidth) {
container_mc.loader1_mc._width = maxWidth;
container_mc.loader1_mc._yscale = container_mc.loader1_mc._xscale;
}
else if(container_mc.loader1_mc._height>=maxHeight) {
container_mc.loader1_mc._height = maxHeight;
container_mc.loader1_mc._xscale = container_mc.loader1_mc._yscale;
}
trace(picLoaded);
if (container_mc.loader2_mc._width>=maxWidth) {
container_mc.loader2_mc._width = maxWidth;
container_mc.loader2_mc._yscale = container_mc.loader2_mc._xscale;
}
else if (container_mc.loader2_mc._height>=maxHeight) {
container_mc.loader2_mc._height = maxHeight;
container_mc.loader2_mc._xscale = container_mc.loader2_mc._yscale;
}
trace(thisLoader);
//center the new image containers
container_mc.loader1_mc._x = (Stage.width-container_mc.loader1_mc._width)/2;
container_mc.loader1_mc._y = (Stage.height-container_mc.loader1_mc._height)/2;
container_mc.loader2_mc._x = (Stage.width-container_mc.loader2_mc._width)/2;
container_mc.loader2_mc._y = (Stage.height-container_mc.loader2_mc._height)/2;

//alphatween in the new image
alphaTween = new mx.transitions.Tween(thisLoader, "_alpha", mx.transitions.easing.Regular.easeIn,0,100,_global.fadetime,true);
timerInterval = setInterval(imageGen,_global.numPause,data);
delete this.onEnterFrame;
//fade out the image after it has completed it's load
updateAfterEvent = function (watcher_mc) {

if (this._alpha>=100) {
container_mc.loader1_mc._alpha -= 2;
}

if (this._alpha>=100) {
container_mc.loader2_mc._alpha -= 2;
}

}

};


}
}

function imageGen(data) {
// random, or sequential?

if (_global.order=="sequential") {
// start at 0, increment to total number of images, then drop back to zero when done
if (p==undefined || p==data.length && _global.looping=="yes") { p=0; } else { break; }
loadImages(data,p);
p++;
} else {
trace ("order attribute in xml isn't correct - must specify either 'random' or 'sequential'");
}
clearInterval(timerInterval);
}

function loadImages(data,num) {
if (i==undefined || i == 2) {
i=2;
create loader(i,data,num);
i=1;
} else if (i==1) {
createLoader(i,data,num);
i=2;
}
}
stop();

Thanks in advance!

Can I Load Swfs From Outside Www On A Server?
I thought it might be helpful to place a bunch of my components and library swf files in a less public area of my website, but am thoroughly confused about how to get them to load. It seems like I should use the crossdomain.xml but it isn't able to handle a relative path, perhaps? Or is it that the folder isn't really a domain so crossdomain.xml is useless here?

If my index swf is a preloader at http://localhost/ and I try to load a main swf file referenced as "../library/main.swf" nothing I try is working. I just get "unable to locate url" if I try to go outside the www folder. The file loads fine if it is in the same folder or in any level of subfolders- but if the relative path leaves the www domain, I get nothing.

The folder structure would be something like:
C:www
C:library

Has anyone set something like this up successfully and could help me out a little? Can we place swf and other resources off the public path on a server and have them load into a movie at runtime?

Prob With Macs Calling Swfs Using Load Movie
I've built a piece in MX to be played locally off of a CD. It uses load movie actions on buttons to call various swfs to play (all at level 0--so they just replace what is on screen when the button is clicked).

I've published it as a projector file for both Mac and PC, and it plays fine off of the two PCs that I've tested it on. However, on the iBook with 9.0 that I tested it on, it plays the intro piece in the projector file just fine, but when I click on any of the buttons, it won't call the swfs to play. Nothing happens, I just get an empty stage. I made sure that the swfs are all in the same directory (desktop) as the projector file that calls them, so I don't know why it's not working.

Any help would be greatly appreciated. Thanks.

External Swfs Not Loading On Server
hi,

i have my external swfs loading in the main swf on my local hard drive sweet, but once uploaded to the server and viewed online they don't show up?,i have all my flash files in a folder within dreamweaver on the server, why are they not showing up?

cheers r2 for your help previously.

FMS And AS3/Flex: Calling A Client-side Method From A Server Script
In the following an example (in AS2) in which a server script (.asc) can invoke a method defined on the client side (client connected to FMS):

client-side in AS2:

Code:
nc = new NetConnection();
nc.connect(...)
...

nc.myMethod = function(arg) {
...
return ris;
}
server-side:

Code:
application.onConnect = function(client) {
...

resObj = new Object();
resObj.onResult = function(ris) {
...
}

client.call("myMethod", resObj, arg);

}
My question is: in which manner with Flex and AS3 can I define a client-side method visible to FMS?
Thanks

Beaver

FMS And AS3/Flex: Calling A Client-side Method From A Server Script
In the following an example (in AS2) in which a server script (.asc) can invoke a method defined on the client side (client connected to FMS):

client-side in AS2:

Code:
nc = new NetConnection();
nc.connect(...)
...

nc.myMethod = function(arg) {
...
return ris;
}
server-side:

Code:
application.onConnect = function(client) {
...

resObj = new Object();
resObj.onResult = function(ris) {
...
}

client.call("myMethod", resObj, arg);

}
My question is: in which manner with Flex and AS3 can I define a client-side method visible to FMS?
Thanks

Beaver

Help External Swfs Load Locally But Not On Server
i have a swf embedded in an html file. in the swf, another swf loads dynamically into a container movie clip, then there are buttons that when clicked tell it to unload that movie and load another movie dynamically. these swfs that are being loaded are on the server. when i test the whole thing locally, it works fine. when i upload it to the server, it will load the first swf but then the buttons don't work. it won't unload and load a new movie....any clue why? i am guessing it could be a security setting of some sort?

Calling A Function In Main Class From A Loaded Swfs Document Class
Hi
I have a main.swf that loads page.swf. They each have a document class called "Main" and "Page".

How can I call a function in Main from Page?

In AS2 this would be somthing like _parent.myFunction();


Cheers

Stream Works From Local Desktop To Server But Not Server To Server
I have flash media server running on linux. If I launch a test application from my desktop that points to the flash media server (rmtp://myserver.com/live) it works beautifully. However, If I launch an application from my server(http://myserver.com/myapp) and have it point to my flash media server (rmtp://myserver.com/live) i get a rejected from server error. Does anyone know why this would behave like that and how it might be fixed? Thank you.

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

Server Support The Application But Outside Of Server Does Not To Com Server ?
hi ,

does any body guide me in problem? I have upload my application having video conferencing. It works on the server where i uploaded , but it does't work outside the side(only swf could not connect to com server). Is there any solution ?


Regards
Abdul Ghafoor

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