FORUMS: list search recent posts

Stop Autoplay Flash MP3 Player

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ed Marks
Stop Autoplay Flash MP3 Player
on Jan 16, 2012 at 6:27:42 am

Hello,
I found and old post from 09 here that was close but not close enough.
I am very new to interactive flash with actionscript and basically copied the code from a tutorial so I could
create an interactive MP3 player for a site.

Works Great!

However, it autoplays. Does anyone know how I could make this stop?

If this makes a difference, there is only one keyframe.

Should there be two?

One with an option to start?


Return to posts index

demetri tashie
Re: Stop Autoplay Flash MP3 Player
on Jan 18, 2012 at 12:49:43 am

it is hard to give any specifics without seeing any code, or knowing which tutorial you are working from.

the short answer is yes - it surely should be able to make it not autoplay, and it would not mean using a second frame - it should ideally all be on the same frame


Return to posts index

Ed Marks
Re: Stop Autoplay Flash MP3 Player
on Jan 19, 2012 at 9:09:26 am

Hey thanks for the response!

Here is the Link if you get a chance
TURN DOWN YOUR SPEAKERS
sorry there is 2 autoplays going on. I plan on having none.

http://pyrite.me/Elaine.Root/Home.html

Put the code in content on home page put css kinda screwed it up so I put a link that
is the form your used to

its in the scripts tap at the top below the flash banner


Return to posts index


demetri tashie
Re: Stop Autoplay Flash MP3 Player
on Jan 19, 2012 at 2:45:52 pm

that is a very unfriendly way to send code for people to look at. next time, format it with <pre> tags so it can be read like code, and not just as one long run on piece of html text.

as such, i didn't wade through all that code, but i would suspect your trouble lies in this function which initiates once the XML is loaded:
function onceLoaded(e:Event):void {
trackXML=new XML(e.target.data);
trackList=trackXML.track;
urlRequest=new URLRequest(trackList[index].path);
track.addEventListener(Event.COMPLETE, trackCompleteHandler);
track.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
track.load(urlRequest, context);
<b><i>chan=track.play(trackPos);</i></b>
chan.addEventListener(Event.SOUND_COMPLETE, playNext);
}

try either removing the highlighted line which tells the SoundChannel to play a Sound, or else change it to or add this line after it:
<b>chan=track.stop()</b>
and see if that helps


Return to posts index

Ed Marks
Re: Stop Autoplay Flash MP3 Player
on Jan 19, 2012 at 4:51:14 pm

Again, thanks for the response Demetri,
I am very new to this. I will look up pre tags to see what they do. I will try the code you gave me.
Lol, I thought I was making them look good by putting the "scripts" link in the same general format as I saw in flash.
Looks like I was wrong.
People like you in the Web Design community are amazing. You are all very patient.


Return to posts index

demetri tashie
Re: Stop Autoplay Flash MP3 Player
on Jan 19, 2012 at 5:05:27 pm

hey - this is how we all learn!

pre tags are for html, and let the text look exactly as written like on a text editor - with line breaks, white spaces, tabs, etc. they are not used all that much ( since among other reasons, screen readers have difficutly with them ) but for a quick show of code, or poems, or anything else that needs to be read with formatting in place, it works.

i looked at your html source. so if you put all that code exactly as it is, but inside pre tags, it would show up just fine. try it out and see!( that jsut proves that html will ignore white spaces, tabs, line breaks etc)


try the code suggestions for the MP3 player, and let us know how it turns out.


Return to posts index


Ed Marks
Re: Stop Autoplay Flash MP3 Player
on Jan 23, 2012 at 2:56:34 pm

Hi Demetri,
I tried what you suggested.
Removing
chan = track.play();
adding a stop behind it
replacing it with stop
No luck.
Each time it doesn't autoplay but wont play when clicked on play.
If you wouldn't mind I reuploaded the script and used
 tags this time.
I see what you mean about the formatting.
The tags made a big difference.
Here's the link.
Once again, can't say it enough.
Thanks for the help.

http://pyrite.me/Elaine.Root/HTML/script.html

and if you want to see the autoplay in action

http://pyrite.me/Elaine.Root/Home.html

Just remember TURN OFF YOUR SPEAKERS.


Return to posts index

jamesp david
Re: Stop Autoplay Flash MP3 Player
on Feb 3, 2012 at 7:16:39 am

i am facing also the same problem. how to get rid of this issue


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]