NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > Webmaster Tutorials
Reload this Page Flash Cookies

Webmaster Tutorials Instructional webmaster-related how-to's and tutorials.

Advanced Search
0 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 03-04-2006, 01:32 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
asgsoft's Avatar
Join Date: Sep 2005
Location: At Home
Posts: 881
asgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of light
 



Flash Cookies


OK here is how to create a cookie in Flash backened with PHP.

Firstly we start with the Flash file.
  1. Create a flash button. To do so draw a rectangle, right click on it and select make symbol. select button then press ok.
  2. In the action panel of the button add the following:
    Code:
    on (release) {
        cookie = "flashsite";
        getURL("input.php", "", "POST");
    }
  3. On the action for the frame add the following:
    Code:
    cookie = "value";
  4. Now you have set a variable as soon as the SWF loads called cookie, when you press the button it changes to flashsite. the seconline takes you to input.php where it sees the variable and acts upon it.
  5. My input.php looks like this:
    PHP Code:
    <?php
    ????: NamePros.com http://www.namepros.com/webmaster-tutorials/173488-flash-cookies.html
        
    $cookie 
    $HTTP_POST_VARS['cookie'];
        
    if(
    $cookie == 'flashsite'
    ????: NamePros.com http://www.namepros.com/showthread.php?t=173488

    setcookie("asgsoft_redirect"$cookietime()+31536000);
    header("Location: index.php"); 

    if(
    $cookie == 'nonflash'

    setcookie("asgsoft_redirect"$cookietime()+31536000);
    header("Location: nonflash"); 

        
    if(
    $cookie == 'skipintro'

    setcookie("asgsoft_redirect"$cookietime()+31536000);
    header("Location: index.php?scene2"); 

        
    ?>
  6. This is part of mu upcomming site where it allows the user to select wheather to see flash/nonflash site. if they select flash then whether to see the into or not.
I hope this has been helpful to somebody.
asgsoft is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mr.Spot Freelance flash designer(Cool Flash Site) spot For Sale / Advertising Board 0 09-27-2005 09:24 PM
Protect your flash files from hotlinking - specially for arcade sites! Jim_Westergren CODE 15 08-29-2005 01:42 PM
REQUEST - Flash intro, banners and other future projects gRF For Sale / Advertising Board 0 07-29-2005 12:49 AM
Flash Deadly Sins (that can kill your web business) abacomedia Graphic Design / Flash 2 06-26-2004 09:32 PM
Using Music on your Site - WAV, MP3, MIDI, Flash? abacomedia Web Design Discussion 1 05-20-2004 01:04 PM

 
All times are GMT -7. The time now is 12:57 AM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger