How do you embed cookie into Flash?

Discussion in 'Graphics & Multimedia' started by Voasi, Jan 29, 2008.

  1. #1
    I recently had a header created for my website. I don't want the header to play on every page when visitors navigate through pages. Do you know a way to embed a cookie into the flash header so that when a visitors navigates to another page, it only shows final flash header, which is semi-static?
     
    Voasi, Jan 29, 2008 IP
  2. Mirage

    Mirage Active Member

    Messages:
    204
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Hmmm....I am not 100% sure I understand what you are asking...but...let me offer this...

    There is a thing known as "flashvars" that allow you to inject parameters into your flash swf file from the html that is calling the flash player. I *think* this is what you want. Flash itself (at least version MX 2004 Pro which I have) I do not recall as having the ability to set/consume cookies directly. However, you can manipulate cookies with javascript in your html and then generate the html code with flashvar parameters to control the specifics of your swf file and how it plays.

    Hope this is of some help to you.
     
    Mirage, Jan 29, 2008 IP
  3. Voasi

    Voasi Active Member

    Messages:
    1,054
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    88
    #3
    Thanks for the tips. Anyone else have a solution? Is this the only way?
     
    Voasi, Feb 6, 2008 IP
  4. Mirage

    Mirage Active Member

    Messages:
    204
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    58
    #4
    It just occured to me that there may be a solution with cookies that exists in the latest verison of Flash (I am one version behind at least).

    Also, if you do not get an answer here, try over at the developer forums for Flash at www.adobe.com

    Good Luck
     
    Mirage, Feb 6, 2008 IP
  5. wassim

    wassim Well-Known Member

    Messages:
    322
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    110
    #5
    Hi,

    There is a solution, flash files can save and retrieve cookies of their own, also known as sharedObjects, it's a feature that flash player offers as of flash 6 (MX).
     
    wassim, Feb 6, 2008 IP
  6. Mirage

    Mirage Active Member

    Messages:
    204
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    58
    #6
    Yes...those work very well and are pretty much like cookies. However I thought shared objects only had meaning to flash content. I thought he might be wanting to do stuff with the "cookie" outside of the flash content.

    But if not...I agree that sharedObjects would be correct. I had totally forgotten about those...
     
    Mirage, Feb 6, 2008 IP