A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 24

Thread: Play Intro for 1st time users only

  1. #1
    Junior Member
    Join Date
    Jun 2001
    Posts
    28

    Play Intro for 1st time users only

    Does anybody know of a way or technique in FLASH MX to Play Flash intro only for first time users?

    In other words i have someone who wants to play the animation 1 time for the first time user for that day.

    I've tried to set cookies but the problem with that is when you hit the back button it plays again anyway.

    any tips would be greatly appreciated.

    Thanks
    RegGFX
    RegGFX

  2. #2
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789

    Re: Play Intro for 1st time users only

    Play once:
    Code:
    _root.stop();
    _so = SharedObject.getLocal("introCheck");
    if (_so.data.playedIntro) {
    	//skip intro
    } else {
    	//play intro
    	_so.data.playedIntro = true;
    	_so.flush();
    }
    Originally posted by RegGFX
    1 time for the first time user for that day.
    Play Once per day:
    Code:
    _root.stop();
    _so = SharedObject.getLocal("introCheck");
    today = new Date().getDate();
    if (_so.data.playedToday == today) {
    	//skip intro
    } else {
    	//play intro
    	_so.data.playedToday = today;
    	_so.flush();
    }

  3. #3
    Junior Member
    Join Date
    Jun 2001
    Posts
    28
    WOW THATS FANTASTIC!!!!....THANKS A MILLION FOR THE INSIDE TIP
    I've attatched a zip file for you to see if its done right.

    However i have one more question....and forgive me if it sounds stupid.

    For testing purposes where do i go to delete or RESET the Shared Object so that i don't have to change the
    _so = SharedObject.getLocal("introCheck"); variable everytime i do a test?
    You know, kind of like when you clear your browser cache or delete your cookies to re-run the file when you make a change.

    Please RSVP ---- I REALLY APPRECIATE THIS.
    Thanks
    RegGFX
    http://www.extremefx.net
    Attached Files Attached Files
    RegGFX

  4. #4
    Junior Member
    Join Date
    Jun 2001
    Posts
    28
    This Shared Object approach is REALLY Great....however does anyone know how too, For testing purposes HOW you can delete or RESET the Shared Object value of introCheck so that i don't have to change the
    _so = SharedObject.getLocal("introCheck"); variable everytime i do a test?
    You know, kind of like when you clear your browser cache or delete your cookies in your browser to re-run the file when you make a change?

    Here is a better example: Lets say i made a change and wanted to see the intro again....i would have to change "intoCheck" to a new value of "introCheck01"
    So again Does anyone know how too or have a suggestion on how to clear the shared object value for Testing Purposes?

    Suggestions or Work-arounds appreciated.

    Thanks
    RegGFX
    http://www.extremefx.net
    RegGFX

  5. #5
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    put _so.data.playedToday = null; somewhere...

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You can search your system for "*.sol", and simply delete the relevant one.

  7. #7
    Junior Member
    Join Date
    Jun 2001
    Posts
    28
    WOW! I THINK I'VE DONE IT!
    I've created a Flash MX movie that will actually emulate a cookie!
    No Java Script or VB script needed to load into flash.
    And best of all NO KNOWN BROWSER BACK BUTTON REDIRECT ISSUES!!!
    YIPPEEEEE!!!

    AND I’ve put a hidden button on the stage so that if you are still in the development stage you can clear the flash cookie without searching for the "*.sol" file.

    This works great if you are showing to a client online and they don't know how to search their computer for the *.sol file to delete and see the into again.

    As of now the FLASH MX Shared Object Cookie only lasts for 1 day.
    I would like to invite anyone on how i could update the action script to make the Shared Object Cookie last a week?

    ANYWAY this will work for now....I INVITE EVERYONE TO TRY IT OUT and add your suggestions or comments before i make it available in the FLASH KIT download section.

    OH!....AND A VERY SPECIAL THANKS TO flash kit screen name "gSOLO_01"
    for tips in SHARED OBJECTS usage in creating this SHARED OBJECT COOKIE for FLASH MX. THANKS "gSOLO_01" AGAIN FOR YOUR INPUT
    RegGFX
    http://www.extremefx.net
    Attached Files Attached Files
    RegGFX

  8. #8
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    So where's the hidden button? I want to pretend I'm the client!

  9. #9
    Junior Member
    Join Date
    Jun 2001
    Posts
    28
    Here is a CLUE $$
    Try HOVERING your mouse over the large BLUE dotted circle line in the lower right hand corner until you get the traditional MOUSE Finger
    then click
    This will reset the flash cookie

    Best Regards,
    RegGFX

    RegGFX

  10. #10
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Talking about your own site? Or your zip? Can't find it on your site?

  11. #11
    Lord of the Singhs
    Join Date
    Mar 2002
    Location
    India
    Posts
    342
    and g_SOLO_01 shows us once again tht i have miles to go b4 i sleep!!
    CooL "N" CalM

    my body is sore
    my eyes are red
    i still itch for more
    before i hit the bed

  12. #12
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    And what if I disable shared objects writing on my system?

  13. #13
    Lord of the Singhs
    Join Date
    Mar 2002
    Location
    India
    Posts
    342
    then i'll have even more miles to go b4 i sleep!!!
    CooL "N" CalM

    my body is sore
    my eyes are red
    i still itch for more
    before i hit the bed

  14. #14
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    To delete a shared object cookie, look in Windows/Application Data/ Macromedia/Flash Player. If it's from your online site, it'll be in a folder named after the site. If it's from testing, then it's in a subfolder of Flashplayer/Local Host/Mx/Test/ or, Flashplayer/Local Host/Mx/Windows/Temp, if you tested it from a download like I just did.

  15. #15
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Much easier, as I posted earlier... To just search your system for "*.sol", and simply delete the relevant one. Or for that matter, ALL of them! And set your player settings to not allow anymore of them.

  16. #16
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    I have 2 hard drives and 7 drive letters, not including A/ and the 2 CD burners. Searching the whole systems takes a minute or more. I know where they are and it's faster to just go there and get them with the vacuum cleaner. But how do you set the player not to allow them?

  17. #17
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Limit your search on c:, they won't be written anywhere else!
    If that fails, get a faster machine!

    On any site, your's for example, right-click and hit Settings. Hit the Folder icon, and check the Never box!

  18. #18
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Ha! You just inadvertently found the way to delete them.

    Set it to never and OK, then close. No more shared object. Set it to Allow and give it some space and it's back.

    Great for testing, I don't have to comment them out anymore.

    Added: And I mean they are deleted. Refresh the view in explorer, and the whole folder is gone. I like that.
    Last edited by iaskwhy; 03-12-2003 at 03:09 AM.

  19. #19
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Inadvertently? Nah!

    Problem is that you have do it site by site. Have yet to find the way to disabled them all together!

    Maybe something here:

    http://www.macromedia.com/support/fl...e_storage.html

  20. #20
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    >>Have yet to find the way to disabled them all together!

    Naw, that's it, I just deleted all my folders from flash sites I visited before. On that page you linked to, there is another link to set the global settings on your player so you never get one again.

    http://www.macromedia.com/support/fl...l_storage.html

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