;

PDA

Click to See Complete Forum and Search --> : can URL be loading in background while movie plays?


glenda
01-04-2001, 03:37 PM
Help, please. New to Flash...

I have a Flash intro movie that has 3 scenes: preloader, main, and finale. At the end of the finale, I use "getURL" and it goes to a URL (a framed ASP page) that takes a long time to load in.

Can the ASP page be loading silently in the background while the movie is playing so it can immediately pop up at the end of the finale?

Or, at the very least, can the movie hold on the last frame of the finale scene until the URL loads?

Right now, the movie ends, the screen goes white while it waits for the URL to load.

Thanks for any insight....

mbritton
01-05-2001, 01:21 PM
Absolutely -- but you have to use frames. I would make the page a frameset with your movie frame (either column or row) 100% width or height. In a hidden frame, load in a blank page. From the Flash movie, insert a keyframe and use get URL to load the ASP page into the blank frame. Because the blank frame isn't visible, this operation will be invisible. Then, when you want to switch to the ASP page, use get URL again and target to your main frame. Because it's already loaded, the ASP page should load immediately.

If it's images you're worried about, a simple javascript that preloads images could do the trick. Put the script between the header of your document, and use the onLoad event handler to initiate it.

Let me know if you need the script...

glenda
01-05-2001, 01:47 PM
Wow. I was hoping there would be a simple action script command to do it! That's a lot to think about...

OK, tell me if I'm thinking correctly:

To put the movie in a frameset, I just edit the HTML page that Flash publishes?

I've never made a "hidden" frame, is it just making it 0% width/height?

Will loading the ASP page in the background of the movie cause the movie to slow down or get "jerky"?

Thanks, Mike, for your help!

Glenda

robw
01-05-2001, 02:37 PM
This works perfect for me
put this code into the body of your page it doesn't matter where.

<IFRAME NAME="preloader" WIDTH=1 HEIGHT=1 SRC="#" BORDER="0"></IFRAME>

Then when you want the page to load just call from flash

yourfile.asp target=preloader

Problem sorted

glenda
01-05-2001, 02:55 PM
Rob,

I've got the IFRAME tag in my movie's HTML file. Should src="#" be my ASP page name, or actually the # sign?

Now, how do I call the ASP page from Flash? I'm using "getURL" in the last frame of my Finale scene, but it doesn't have a parameter for target.

Thanks for responding to my distress call!

Glenda

blewis
01-05-2001, 03:07 PM
the getURL command does have a parameter for location.

in my example the iframe is named preloader
<IFRAME NAME="preloader" WIDTH=1 HEIGHT=1 SRC="#" BORDER="0"></IFRAME>

at some point in your movie insert this in your actionScript::
getURL ("myasp.asp", "preloader");

that will load your asp into the I frame and have it prelaoding. Then at the finale of your movie you will have another actionScript like this
getURL ("myasp.asp", "_self", "(optional variable posting method)");
hope that works out for you

robw
01-05-2001, 03:09 PM
thanks blewis saved me from writing it do you know how to get rid of the border on an iframe

blewis
01-05-2001, 03:16 PM
sorry haven't worked much with iframes. its something I plan on experimenting with this weekend though. I'll come back to this post and email you if I figure it out. If you come across an answer I would be interested in knowing how to do it as well.
Traey.
blewis86@hotmail.com

robw
01-05-2001, 03:22 PM
sure

glenda
01-05-2001, 03:30 PM
I can see where it's preloading my URL during the movie... but when it gets to the finale (and the second getURL command) it seems to forget it's already preloaded.

I have the IFrame code in the HTML file.
The getURL that preloads it is in the first frame of my Main scene.
The getURL that is supposed to display the page is in the last frame of my Finale scene.

Thank you!

mbritton
01-05-2001, 04:07 PM
IFrame only works in Microsoft Internet Explorer 4+. It's a good idea, but targeting the ASP to a named frame that has a width and / or height value of 0 from the getURL in a Flash movie is the only cross-browser method of loading an entire page into cache. Preloading images is another solution, but to have an almost instantaneous appearance of the ASP post getURL, you need to target it to a frame.

What are the cache settings on your browser? Which browser are you running?
[Edited by mbritton on 01-05-2001 at 06:25 PM]

blewis
01-05-2001, 04:24 PM
what you are forgeting is that the images and code should already be cached on your machine by that point. so when your movie calls the page it is in memory

glenda
01-05-2001, 06:40 PM
Originally posted by blewis
what you are forgeting is that the images and code should already be cached on your machine by that point. so when your movie calls the page it is in memory

I have a Flash file with the preloading modifications and one without. It's taking the same amount of time for my ASP page to display after the movie whether I preload it or not. (Cleared cache in browser and used stop watch to make sure I was starting fresh and accurate.)

Is there something different I should be doing with the second getURL that is supposed to display the page stored in "preloader"? Like I said before, it seems to ignore the first getURL and starts over.

I'm soooo close! Can't stop now!

Thanks for your help...