Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-04-2012, 08:02 PM   PM User | #1
ettanbazil
New to the CF scene

 
Join Date: Dec 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ettanbazil is an unknown quantity at this point
Skip track problem

Hi,

I was wondering if anybody can figure this out. I'm a bit of a newbie with actionscript and i'm lost.

I have a music player on my site which i grabbed from an open source flash file. I have 3 copies of the player in 3 different scenes, each loading a separate track and i have also created previous and next buttons to go with the other buttons on the player.

The problem I have is that I want the movie to jump to the next scene when the current mp3 reaches the end. at the moment there is this code in the first frame of the movie (and in each copied scene). The only difference in the scenes is the name of the MP3 that is loaded:

<-------------------------------

fscommand("allowscale", "false");
dd = new Sound();
dd.loadSound("track53.mp3",true);
xx = bar._width;
orginal_width = bar._width;
_root.soundbtndis._visible = false;
_root.soundbtndis.disabled = true;
this.onEnterFrame = function()
{
t1 = int(dd.duration / 1000 / 60);
t1 = t1 + " : " + int((dd.duration / 1000 - (t1 * 60)));
ddf = int((dd.duration - dd.position) / 1000 / 60);
elapsed_sec = int((((dd.duration - dd.position) / 1000 / 60) - ddf) * 60);
if (elapsed_sec < 10)
{
elapsed_sec = "0" + elapsed_sec;
}
if (ddf < 10)
{
ddf = "0" + ddf;
}
if (_root.stpd)
{
elapsed = _root.t1;
}
else
{
elapsed = ddf + " : " + elapsed_sec;
}

//mo=dd.position/1000
//elapsed =
vol = dd.getVolume() + " %";
dur = dd.duration;
pos = dd.position;
per = (pos / dur) * 100;
m = (pos / dur) * 100;
bar._width = (m * xx) / 100;
drag._x = _root.bar._width + _root.bar._x;
//drag._y = 136;
if (stpd)
{
xx = 0;
}
else
{
xx = orginal_width;
}
// function keys
if (Key.isDown(67))
{
pauseit();
}
if (Key.isDown(88))
{
playit();
}
if (Key.isDown(86))
{
stopit();
}
//**************************************
};
ettanbazil is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:44 PM.


Advertisement
Log in to turn off these ads.