A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Display PHP vars in Flash ( Advanced ? )

  1. #1

    Display PHP vars in Flash ( Advanced ? )

    Hi guys
    I was requested to do this:

    Send customers a personalized e-mail for next christmas. They would click a button in that email, and the link should forward them to their personalized greeting card, but:

    The email button link should be some code like
    http://www.site.com/gcard.php?code=abfg36321234d32421hd (MD5 code)

    Then the flash file should decode that string, and know that the owner of greeting card is Jenny McCarthy ( I was requested to show in flash movie: name, surname, e-mail and other data, so flash should get data from mySQLdb... possible ? )

    Can any1 point me to an "easy" solution, url, or give me an idea about this ?

    Thanks a lot in advance.
    Henry
    San Juan - Argentina
    ICQ: 18048153
    MSN: qbecerra @ hotmail.com

  2. #2
    Senior Member
    Join Date
    Oct 2003
    Posts
    1,354
    You can use the code you provided to open a PHP page. The PHP script can be used to decode your string on the server side. Then have the PHP page parse out an HTML page that contains the the basic swf file. You can pass variables to the basic flash file in much the same fashion, only it would have to be in the embeded param tag.

    Something like this: (may need to double check the syntax)

    <Param name="FlashVars" Value= "name=Jenny&surname=McCarthy&email=some@place.com" >!
    It's been a long time since I played with passing variables to flash from the HTML page, so I'm really rusty, but thats one basic idea of how to do it.

    You could also send the variables to your movie in a browser as so..

    mainmovie.swf?name=Jenny&surname=McCarthy&email=so me@place.com
    but you won't have the any abilty to do any HTML formating.
    Last edited by DallasNYC; 11-20-2005 at 11:25 PM.

  3. #3
    Senior Member
    Join Date
    Oct 2003
    Posts
    1,354
    I have to follow up on this. Just to note, that I don't think you can really decode a MD5. But you can use the code to compare to the same code in your names database on the server.

  4. #4
    Yes, you're right
    Well, I should do something in Flash just to know that the code received exists in db...

    It is not necessary to use MD5, but well, that was only to give an idea lol
    Henry
    San Juan - Argentina
    ICQ: 18048153
    MSN: qbecerra @ hotmail.com

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