• Home
  • Subscribe RSS
  • Comments RSS
Blue Orange Green Pink Purple

#

NewJack Website - Flash MP3 Player with PHP/MYSQL

After having created my Flash MP3 player (link), the tracks in it could be edited by editing the XML file that is linked to in the Player's ActionScript code. I thought this was fine as it would save you from having to dive into the FLA file every time you wanted to make a change. Then I had a brain wave in terms of how I could take this one step further. I've got more and more confident with PHP and MYSQL as this project has progressed and I thought there must be a way to populate the XML file using PHP and MYSQL.

So after a few google searches I found that I could create a very simple PHP script that creates an XML file that stores the media player's track data.


I started by creating the MYSQL table that will hold the track data - this will be used by the PHP script to populate the XML file.

My next step was to create the PHP file. The script can be seen in the image below.


Firstly, the SQL query gets the data from the music table and the ORDER BY keyword ensures that the latest track entered into the database appears at the top of the list in the mp3 player.
Then using PHP I have constructed the XML document, within which I have used a while loop in order to get the track name and file path from the database and insert them into the XML file.

Finally, in the MP3 Players ActionScript, where it previously linked to the XML document I have simply changed this to link to the php file.

After completing these steps I could then create a simple HTML form and accompanying PHP script so the admin can upload a new track to the MP3 player without having to edit an XML file and upload it back to the server.


I have also added a delete track form which simply deletes the record from the database where the name = the name typed in by the admin into the form.
Read More 0 comments | Posted by Ste edit post

0 comments



Post a Comment
Newer Post Older Post Home

Ste Blog

  • About
      My name's Ste, a Multimedia student at Nottingham Trent University with a keen interest in design, mainly web and print based.

      Portfolio: www.stephengreig.co.uk
  • Followers

    Blog Archive

    • ► 2011 (18)
      • ► May (3)
      • ► April (2)
      • ► March (1)
      • ► February (8)
      • ► January (4)
    • ▼ 2010 (22)
      • ► December (2)
      • ► November (5)
      • ► October (2)
      • ► April (1)
      • ▼ March (4)
        • NewJack Website - Flash MP3 Player with PHP/MYSQL
        • NewJack Website - Edit/Delete Blog Posts
        • NewJack Website Progress - Post a Blog and Login
        • NewJack Website Progress - MySQL and PHP
      • ► February (5)
      • ► January (3)
    • ► 2009 (35)
      • ► December (3)
      • ► November (6)
      • ► October (5)
      • ► May (1)
      • ► April (4)
      • ► March (2)
      • ► February (10)
      • ► January (4)
    • ► 2008 (16)
      • ► December (3)
      • ► November (9)
      • ► October (4)

    Labels

    • 3d (1)
    • 3ds max (4)
    • actionscript (1)
    • adobe flash (4)
    • adobe photoshop (7)
    • alignment (1)
    • Artefacts (15)
    • audiovisual (2)
    • avatar (2)
    • avatars (2)
    • blog template (1)
    • box showcase (2)
    • brainstorm (1)
    • cancer research (1)
    • character design (1)
    • charity (1)
    • Client Project (4)
    • client work (1)
    • compatibility (1)
    • contrast (1)
    • CRAP design (1)
    • creative zen (1)
    • creativity (1)
    • css (8)
    • dan saffer (1)
    • databases (2)
    • design (4)
    • design snack (1)
    • development (1)
    • deviant art (1)
    • digital piracy (2)
    • esearch (1)
    • film (1)
    • football manager (1)
    • game (2)
    • graphic design (1)
    • graphic design website design portfolio (1)
    • greetings card design (1)
    • hereford united (4)
    • hosting (1)
    • ideas (1)
    • identities (17)
    • image (1)
    • interaction design (1)
    • interactive narrative (2)
    • interactive room (5)
    • interactive showcase (5)
    • ipod (1)
    • javascript (6)
    • joel schafer (1)
    • jquery (1)
    • junior bulls (1)
    • layout (1)
    • live4life (1)
    • logo (3)
    • logo design (2)
    • logo moose (1)
    • media publishing (2)
    • mind map (1)
    • modelling (1)
    • moodboard (1)
    • multimedia practitioner (1)
    • music (2)
    • mutt ink (1)
    • my identity (2)
    • mysql (4)
    • newjack (5)
    • news (5)
    • one shot film (1)
    • Online News Business Models (3)
    • personal website (4)
    • photography (1)
    • php (4)
    • pixilation (2)
    • planing (1)
    • portfolio (2)
    • portfolio and design service (1)
    • poster design (1)
    • print design (1)
    • proximity (1)
    • PRP (20)
    • questionnaire (2)
    • radfords (6)
    • repetition (1)
    • research (4)
    • rule of thirds (1)
    • second life (1)
    • shape (1)
    • Simulated client project (2)
    • spp (3)
    • testing (1)
    • the maze (5)
    • the meeting (1)
    • typography (2)
    • web design (11)
    • website design (5)
    • website project (15)
    • website review (1)
    • world cup (1)
    • xhtml (10)
  • Search






    • Home
    • Posts RSS
    • Comments RSS
    • Edit

    © Copyright The Ste Blog. All rights reserved.
    Blog Skins Designed by FTL Wordpress Themes

    Back to Top