loading sound php/MySQL 2004-02-23 - By Richard Carr
Back Using php/MySQL , FlashMX
I'm able to load text and images, but can't get a sound to load/play.
code- myData.load("soundTest.php") //getURL("soundTest.php", "_new")OPENS php in new page as a test, works stopAllSounds(); mysound = new Sound(); myData.ref = this
myData.onLoad = function(succes){ if(succes){ for(var i=0; i<this.cant; i++){ this.ref["Title_txt"+i].htmlText = "<b>"+this["Title"+i]+"</b>" this.ref["Comments_txt"+i].text = this["Comments"+i]
this.ref["holder_mc"+i].loadSound(this["Image"+i], true)// this line works when table contains an image file, but not //when it cotains an mp3 file
} } else trace("Error loading data" ) };
****and SQL
CREATE TABLE titles6( ID int(11) NOT NULL auto_increment, Title varchar(255) NOT NULL default '', Comments mediumtext NOT NULL, Image varchar(255) NOT NULL default '', PRIMARY KEY (ID) ) TYPE=MyISAM;
INSERT INTO titles6 VALUES (1, 'Artist 1', 'test 1', 'an1.mp3'); INSERT INTO titles6 VALUES (2, 'Artist 2', 'Here\'s Tester\'s Image', 'test2.jpg'); INSERT INTO titles6 VALUES (3, 'Artist 3', 'test3', 'Test3.jpg'); INSERT INTO titles6 VALUES (4, 'Artist 4', 'test4', 'test.mp3');
Thanks!
Richard
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected) For additional commands, e-mail: flashnewbie-help@(protected)
|
|