A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Automatically skip intro if visited

  1. #1
    Junior Member
    Join Date
    Nov 2004
    Posts
    17

    Automatically skip intro if visited

    I have a home page with a Flash animation that has a lengthy intro that builds the page. The problem is, whenever the home button is clicked on any of the sub pages, it plays the Flash animation from the beginning, including the intro. This is very annoying.

    I want to be able to start the animation on a frame other than frame 1 if the page has been visited before. I know this will involve cookies and variables, but I'm pretty new to Flash and not very good with these things so far.

    Can anyone give me any pointers or direct me to a tutorial that might help?

    Thanks

  2. #2
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Hey,

    Well I dont know how to answer your question, but I do have a suggestion. Why not just have a simple 'skip' button on your intro so that people can just skip if they have already seen it?

  3. #3
    Junior Member
    Join Date
    Nov 2004
    Posts
    17
    Quote Originally Posted by Osteel
    Hey,

    Well I dont know how to answer your question, but I do have a suggestion. Why not just have a simple 'skip' button on your intro so that people can just skip if they have already seen it?
    That was my solution. It has a skip button now, but I was unable to convince the client that was a good enough solution. You know how it goes. Heh.

  4. #4
    FK's Official Mac Hater jasonsplace's Avatar
    Join Date
    Mar 2002
    Location
    Provo, Utah
    Posts
    2,245
    I don't know very much about Shared Objects but you can look them up in the help file. This will allow you to store a variable on the computer and then you can check if it has been set to skip the intro.
    Jason L. Wright
    I'm not that hard to imitate. Just make some random negative claim at Apple or anything else for that matter and then have nothing to back it up.

  5. #5
    Flash Gordon McUsher's Avatar
    Join Date
    Mar 2001
    Location
    Krautland
    Posts
    1,560
    try this:
    Code:
    myCookie = SharedObject.getLocal("aCookiesName");
    trace(myCookie.data.visited);
    myCookie.data.visited=true;
    the first time, you call this code, the trace will output: "undefined";
    if you test it the second time it'll trace to true.

    But some users have deactivated flash cookies
    My letters on the F1 key have faded, how are yours today?

  6. #6
    Junior Member
    Join Date
    Nov 2004
    Posts
    17
    Quote Originally Posted by McUsher
    try this:
    Code:
    myCookie = SharedObject.getLocal("aCookiesName");
    trace(myCookie.data.visited);
    myCookie.data.visited=true;
    the first time, you call this code, the trace will output: "undefined";
    if you test it the second time it'll trace to true.

    But some users have deactivated flash cookies
    Then they be SOL.

    Thanks, man!!!

  7. #7
    Junior Member
    Join Date
    May 2007
    Posts
    18
    will this work on a video swf as well? Do i put it in the fist frame? Also, do we name the "aCookiesName" anything or is it the name of the file or video?

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