A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Caching last frame state and audio position

  1. #1
    Junior Member
    Join Date
    Nov 2006
    Posts
    16

    Caching last frame state and audio position

    Hi gang,

    Hope you can help me on this one, because I have lost my old data!

    Back in 2007 I was using a script that allowed me to store in the browser's cache a specific frame, so that when I navigated through different static html pages, it would remember to not "load" (if you will) the first half of the movie.

    I am working on a site that has flash elements, one being an audio player, another being popup navigation.

    Does anyone have or know of a script that will allow me to do two things:
    1) remember a position page-to-page via browser caching (so the navigation won't pop up every time)
    2) allow the audio player to remember its last position and whether it was muted or not.

    Any help would be appreciated. If I knew where my backup discs were, I'd be able to solve the first question myself! (It's been 2 years since I used it, and I am currently moving)

    This is what I am using to pause/play the audio:


    Code:
    var mySound:Sound = new Sound();
    mySound.attachSound("track1");
    mySound.start();
    Code:
    on (release) {
    var soundStarted:Boolean = true;
    var lastPosition:Number = 0;
            this._alpha = 30;
            _root.mySound.stop();
            lastPosition = Math.floor(_root.mySound.position / 1000);
    Code:
    on (release) {
    var soundStarted:Boolean = true;
            this._alpha = 100;
            _root.mySound.start(lastPosition);
    Thanks for any help!

  2. #2
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    You would just need to store the data in a sharedObject. This tutorial might help you:

    http://kb.adobe.com/selfservice/view...nalId=tn_16194
    Evolve Designs Interactive Media
    the natural selection

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center