A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: updateable dynamic text in flash (see example)

Hybrid View

  1. #1
    Junior Member
    Join Date
    Dec 2005
    Posts
    9

    updateable dynamic text in flash (see example)

    Anyone guess how they created the updateable text in flash here ?

    www.onlineintercourse.com (not a porn site!)

    and how to create an archive of navigatable posts like they have?

  2. #2
    Member
    Join Date
    Aug 2003
    Location
    Asia
    Posts
    74
    Hai, I'll try to explain the best I could. But I will only explain the Logic, not the code (sorry).
    For this explanation, I assumed you or someone else also want to update the news sometimes....

    From my opinion, you can do that with:
    A. Database server such as mySQL (harder but cool) with help of PHP.
    B. XML (easier and also cool) with help of PHP.

    But from what I saw, that web might use mySQL or another database server.


    mySQL and PHP
    If you haven't familiar with mySQL, then you could learn some SQL tutorial somewhere. But I will point the direction for you to learn. Oh, and If you use SQL, you must use a server side scripting like PHP.

    in SQL, create Database and Table (of course). Then fill in the table all those news data (content, who posted it and date).

    Then you create PHP script to transfer the data in SQL in Flash. One thing to remember, the output from PHP which will be transferred to Flash can be:

    1. some variables usually in the form of unformatted text like:
    &news0=blah blah&user0=chris&date0=20 jan 2006.......
    you need Array in Flash to hold the data. BUT, with this way, you will have hard time in organize the array.

    2. some variables in the form of XML data. In Flash You will need XML Object to hold the transferred data from PHP.


    XML and PHP
    This one uses external file, XML, to hold the data. and for transferring data and writing you will use PHP. You don't need database server.


    After you decide what type of data, in Flash, you will create a Movie Object which consist of a Dynamic Textfield and make sure the Movieclip is Export for Actionscript.

    Last
    After all is done, create a script that control the Arrow Key status. If Right is pressed, UnLoad current Attached Clips then Attach new Clip which will hold previous data which is in the Array OR XML.
    same goes with Left Key....

    Well, that's all. I hope that helps.

  3. #3
    Junior Member
    Join Date
    Dec 2005
    Posts
    9
    blimey, sounds pretty complicated. PHP option sounds easier.
    thanks for the help though. Would you have to write the PHP scripts yourself?

    maybe using Sifr with a standard CMS script might be another option for me.

  4. #4
    Member
    Join Date
    Aug 2003
    Location
    Asia
    Posts
    74
    Hmm, you don't need that.
    The PHP script will be so easy to understand. Exspecially if you use external file (not database).

    in PHP you just need t learn how to write the XML file and read it.
    Just that. I guess it will takes less than 25 lines of codes in PHP. and I belive you could learn that less than 30 minutes.

    Well, perhaps when my computer is fixed, i'll try to give an examples.

  5. #5
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Hi,

    Maybe this will help..........

    http://ntdesigns.net/tutorial/NewsManager.html

  6. #6
    Junior Member
    Join Date
    Dec 2005
    Posts
    9
    How about the ability to view previous entries? would that not need to be written to a database? Or would you use a create movieclip script?

  7. #7
    Member
    Join Date
    Aug 2003
    Location
    Asia
    Posts
    74
    It's a common thing to use Actionscript to access database such as previous entries because all data from XML or SQL should have been loaded into flash.

    Here's the keyword (you can find lots of tutorial on these):
    - in Flash you should use LoadVars Object.
    - in PHP you can create 2 Functions: readData dan writeData. so when the Flash Movie begin to play, on Frame 1 you can make a LoadVars script accessing the readData function from PHP.

  8. #8
    Member
    Join Date
    Aug 2003
    Location
    Asia
    Posts
    74
    Hi again.
    I made this just now.
    And I hope it will help. or at list give an idea.
    I didn't add a write function, so PHP is not needed...
    You can add news by modifying the XML file though....
    Attached Files Attached Files

  9. #9
    Junior Member
    Join Date
    Dec 2005
    Posts
    9
    cheers, I'll take a look.

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