Groups | Blog | Home
all groups > coldfusion flash integration > april 2007 >

coldfusion flash integration : Playing MP3s



acilia
4/18/2007 12:00:00 AM
I am trying to play an MP3 file from coldfusion. The code im using is the
following:

<cfsavecontent variable="ButtonClick">

var my_sound:Sound = new Sound();
sound.loadSound("murhallini.mp3", true);

</cfsavecontent>

This is invoked by the onclick method of a button on the flash form:

<cfinput type="button" name="Play" size="10" value="Play" tooltip="Click to
Play" enabled = "true" onClick="#ButtonClick#"/>

When I click this button i get an error saying that I cannot use 'NEW'.

Anyone has an idea how i can play and MP3 which the user selects from a grid?
That is, I have to pass the mp3 file name to the playing function.
Mark Forsberg
4/18/2007 1:54:29 PM
acilia,

New is one of several reserved words that can't be used in Actionscript
when in Flash Forms. I can't remember the exact syntax but there is a
work-around. Go to www.asfusion.com. I think that's where I saw it.

HTH

Mark
AddThis Social Bookmark Button