A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Dynamic Flash/PHP greeting card

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    2

    Dynamic Flash/PHP greeting card

    Hi everyone, I'm very new to Flash and I've been experimenting and searching for days to do something that I thought would be more common and simple.

    I want to be able to enter a url like "http://www.mysite.com/greetingcard.php?toname=John" where John can be replaced with any name I choose and be displayed in a dynamic text field in the flash movie.

    The only thing I can find on this subject is this tutorial, http://animation.about.com/od/flasha...hpecard1_6.htm ,which I cannot get to work. It appears to be for AS1 or AS2, is there an easier way to do this in AS3? From what I've read, AS3 does not support variables for dynamic text, is that true?

    I'm hoping someone can explain what this tutorial is missing before I go insane! Thanks!

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    If I understand what you mean, this tutorial will help you.

    The idea is that you grab the variable from the url. This is really easy using SWFObject and its getQueryParamValue() method.

    Then, you grab this value from the loaderInfo.parameters (example in the tutorial).
    After this, all you have to do is display its value in the text field (again, in the tutorial).

    From what I've read, AS3 does not support variables for dynamic text, is that true?
    For a long time you should have been using the text property of the TextField Class.

  3. #3
    Junior Member
    Join Date
    Feb 2010
    Posts
    2
    I got it working!! Thanks so much for pointing me to that tutorial, I think I was totally looking in the wrong direction.

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