-
Problem With Understanding Player Script
How Would I write This script to only play the mp3 when the play button is pushed instead of when the page loads?
my_sound = new Sound(this);
my_sound.loadSound("http://www.townesquaremall.150m.com/music/FleetwoodMac/rumors/Fleetwood Mac - Go Your Own Way (3).mp3", true);
-
Official FK nice guy and MOD
You can place it directly on a button:
[actionscript]
on(press)
{
my_sound = new Sound(this);
my_sound.loadSound("http://www.townesquaremall.150m.com/music/FleetwoodMac/rumors/Fleetwood Mac - Go Your Own Way (3).mp3", true);
}
[/actionscript]
Take a look here:
http://www.kirupa.com/developer/actionscript/sound.htm
3P
-
Thanks It Works Like A charm.
-
O.K. When adding this player to my site when the song is finnished I have to refresh the page in order to play another song is there a way to fix this? What am I doing wrong?
The web site is at http://www.theofficialgamezone.com/music/index.html
Just click on any album cover to check it out.
-
Official FK nice guy and MOD
Hi maxisky, I could go into a long drawn out explanation but this topic has been covered so much on flashkit that it would be faster and easier to search the forums for your answer.
It all comes down to the sound object.
If you create a sound object outside the button, you can load sounds into that obect whenever you want. As it is you are trying to duplicate the object.
3P
-
OK I Rewrote the program and it seems to be working the way I want it thanks for your help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|