Link to home
Start Free TrialLog in
Avatar of werez
werez

asked on

How to prevent restarting a flash animation after page reload.

Hi,

I've made a flash animation for one website.

http://www.thebrandscape.com/

It's a big black banner under menu. It contains 8 historical quotes and 8 modern ones.

I have difficulties in finding out a way how to make this flash banner continue playing
on other sub-pages without reloading and starting playing from the beginning.
The banner appears on every sub-page.

Have anyone had same problem?

Any help would be appreciated.
Avatar of Aneesh Chopra
Aneesh Chopra
Flag of India image

if page is refreshing then flash will definitely reload and replay from start..

workaround is use frames..
keep Flash banner in a frame and rest of the part as seperate page in seperate frame..
now on menu click load the content frame only,
this way Flash will remain intact and keep playing continously..

-------------------
Aneesh Chopra
-------------------
Another alternative would be to store a frame/section value in a Flash shared object and check for that when the movie starts.  Keeps you away from having to use frames.
Avatar of werez
werez

ASKER

Unfortunately it's already too late for reconstructing page structure to add frames for flash parts.
That would be the easiest...

I will rather look for more informations about storing flash frame value in flash shared objects.
Does anyone know any good website with more details?
ASKER CERTIFIED SOLUTION
Avatar of Aneesh Chopra
Aneesh Chopra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That article aneeschopra linked covers it pretty well.  You'll just need to store the current location of the movie regularly, then check to see if it's been stored when the movie is loaded again and jump to that point.
Avatar of werez

ASKER

Thanks guys for showing me possible solution.
It's not a problem if flash will be reloaded on each subpage. Starting from last displayed frame or quote
is quite enough for the flash banner.
It should be easy to solve my problem with informations from kirupa.com website.
Thanks a lot!

Avatar of werez

ASKER

OK. I've learned how to save and read values from Flash Shared Object
but I have one more problem. Last one I guess.

My flash banner contains 16 quotes and it uses time-line.
After each quote value is being changed to different one.
I've checked it and it works well.

But how make a starting script which reads Flash Shared Object
and than if value is something it does certain action.
Do I need 16 IF???
here come the experience in play... and how individual programming think to handle such situation..

First of all, I will store all 16 items in a array..

and start showing the quotes and keep storing the array index number only into FSO..
so on flash start I will check the FSO for last array index number and just add 1 into that number and display that item at that index on array..
this way, no if else will be required..
Avatar of werez

ASKER

Thanks for all help.
test