# Stop Flash Banner From Reloading Every Time



## aldernon (Nov 7, 2007)

I have a website that uses a flash banner as the main navigation menu. The rest of the site is basically html and css. When a user clicks on one of the buttons in the flash banner, it takes them to a new html page with the same layout as all the others, except with the relevant content they wish to look at.

Anyway, every time they go to a new page, the flash banner reloads and plays. this is going to get annoying. Im thinking maybe i could use frames, but am new to the flash world, so does anyone here have any great ideas for me?

Thanks for reading 

www.lantecmarine.com
(the site)


----------



## chiliwormeater45 (Jul 2, 2007)

Well the banner loads again, because the user is requesting the page again and the browser gets everything that should be in the page. If you don't want it to refresh you would have to use frames I think, which isn't that good of an idea.

Anyways, all flash banners aren't good ideas.


----------



## aldernon (Nov 7, 2007)

well that basically gives me the same idea i had, with 0 help...

any real ideas?

Thanks Guys


----------



## lumentec (Mar 23, 2008)

I'm sortof unfamiliar with flash. Can you assign javascript functions to clicks?


----------



## tomdkat (May 6, 2006)

The "real" help is to advise against using Flash for the navigation menu. 

Since that probably won't be an option for you, you might be stuck since you'll need to play the Flash movie to see the other menu options. Use of frames and iframes is becoming less popular these days.

Hmmm....

Peace...


----------



## lumentec (Mar 23, 2008)

tomdkat said:


> The "real" help is to advise against using Flash for the navigation menu.
> 
> Since that probably won't be an option for you, you might be stuck since you'll need to play the Flash movie to see the other menu options. Use of frames and iframes is becoming less popular these days.
> 
> ...


As I mentioned before... He could have the entire website display with Javascript (that is, if flash objects support javascript functions) which would not only solve the problem, it'd be much prettier and have somewhat of an appearance similar to AJAX.

Alternately, He could make the entire site flash. Some great examples are the dos equis and zima websites. Each are 100% flash. Dos equis has a flash object that's centered on the page, whereas zima's flash spans the entire width of the page. Just something to think about if he didn't want to give up his flash.


----------



## tomdkat (May 6, 2006)

Wow, that sounds even worse! I'm sure he'll figure something out eventually.

Peace...


----------



## r1ck111 (Sep 29, 2008)

I'm assuming that when the home page opens the flash menu moves about or does something? 

Why not make a seperate flash menu file to the one you have, with out all the moving going on at the start, so it's in its rested state and then embed that one in all of the pages except the home page leaving the original one the home page? Thus creating the illusion of only one menu.


----------



## lumentec (Mar 23, 2008)

r1ck111 said:


> I'm assuming that when the home page opens the flash menu moves about or does something?
> 
> Why not make a seperate flash menu file to the one you have, with out all the moving going on at the start, so it's in its rested state and then embed that one in all of the pages except the home page leaving the original one the home page? Thus creating the illusion of only one menu.


Very good idea.


----------



## r1ck111 (Sep 29, 2008)

Thank you.

Although I have just realised one flaw with this, if the user navigates back to the home page then it will play all the fancy stuff at the start again. 

If it was me I would make a either a simple php or java script function containing an "if" statement and the condition would be derived from the "HTTP_REFERER" variable. So if they had came from one of my pages it would load the 2nd menu and anything else the 1st.


----------



## aldernon (Nov 7, 2007)

do u have an example of that? sounds like something to try.

thanks so far for all the posts guys, i really appreciate it


----------



## tomdkat (May 6, 2006)

r1ck111 said:


> I'm assuming that when the home page opens the flash menu moves about or does something?
> 
> Why not make a seperate flash menu file to the one you have, with out all the moving going on at the start, so it's in its rested state and then embed that one in all of the pages except the home page leaving the original one the home page? Thus creating the illusion of only one menu.





lumentec said:


> Very good idea.


Yep, I agree. :up:

Peace...


----------



## mrinvertigo (Oct 3, 2008)

I am having the same type of problems for my Flash banner, as I don't want the animation to replay each time a user clicks a link. I was able to find a solution using Stored Objects in Flash. Which is pretty much a flash cookie. You can use it to store what frame you are on and to refresh back to the same frame so that the flash movie appears to keep playing.

I am just starting to implement this into my site so i am hesitant to put code up since I haven't tested it yet, but just google "Shared Object Flash page refresh" you will find all sorts of code examples to help you on your way.

I was going the frames route too, but because I am using a cms system my index page has to have all of the cms code there and not in a different frame file, so that wouldn't work for me. Besides, frames are bad for search engine optimization, so this should be a cleaner solution anyways.

Cheers and gl,

mrinvertigo


----------



## lumentec (Mar 23, 2008)

This would go onto every page on your site.


```
<?php
if ($_COOKIE["viewed"]==1) {
echo 'HTML to insert the flash without the loading here';
}

else {
setcookie("viewed","1",time()+3600);
echo 'HTML to insert the flash here';
}
?>
```


----------

