ActionScript 3.0 :: MP3 Player Button - Start Over The Top

Jun 24, 2009

I've made a very basic mp3 player with simple play and stop buttons and it works just fine. However I have noticed that when you click play again while the song is playing it plays the song again from the start over the top. Same if you click it 3 times 4 etcetc. I have no idea how to disable the button while the song is playing/until the user clicks stop. This is the code I have on the play button:

on (release) {
weddingSound = new Sound(this);
weddingSound.attachSound("wedding");
weddingSound.start(0, 99);
}

This is the final part of a website I built and the owner is holding out on payment until this is done

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Video Player - How To Get Rewind Or Start Again Button

Jul 21, 2011

I am creating a video player with my own buttons, play stop are easy, but I can't for the life of me get it to rewind or start again (not loop). It may be worth noting that the flash video is store within a movie clip! The flv instance is flv_close and the movie instance is mv_close.

View 4 Replies

ActionScript 2.0 :: Start Button Needs To Start Timer And Move To Another Frame?

Apr 24, 2011

I'm trying to broaden my horizons with it and so I'm trying to do an update of a quiz program my employer has. Everything has worked well, except for the timer. The button that starts the game has two options, "study" or "exam"; if the study is selected, there is no countdown, just the score keeper. If the exam option is selected, the timer is show (counting up). But, press "Start" and while the quiz begins, the timer, in either case, does not.

I'm going to post the actionscript for the timer that was already there, as well as the start button. I'm hoping someone can explain how this timer is supposed to work and why it's not; and where the disconnect lies in pressing the start button and making it run.The timer is embedded in a movie clip, with two dynamic text boxes, that are for some have no instance name; and actionscript spread out over several frames.Frame 1:

Minutes = "00";
Seconds = "00";
Centiseconds = "00";

[code]....

View 8 Replies

ActionScript 1/2 :: Using Start Button To Start And Stop The Scene Or Movie?

Nov 19, 2011

Here is the action scrip that I created. Correct it if you can.

Process.visible = false;
Cycles.visible = false;
stop();

[Code]....

View 3 Replies

ActionScript 2.0 :: MP3 Player Auto - Start ?

Mar 2, 2011

I am using a flash mp3 player on my website and trying to code it to not autostart when loaded. Here is the code:

stop();
playlist = new XML();
playlist.ignoreWhite = true;[code]....

View 1 Replies

Can Start Player From Position 'pause'

Feb 22, 2008

- how can I start the player from the position "pause" (so without playing a song when I open the flash) (and so with the button in position "play")

- I would like to add the button "previous track".. what code I need to create into the "mp3player.as"? (I think the button is the same of next but with "negative image" and with different names..)

- for a button like "stop" what I have to do? (a button with a simple action like: stop(); or stopAllSounds(); ?) (I've tried but without success...)

View 3 Replies

As3 :: Professional - Video Player - Stream Does Not Start

Oct 20, 2010

Recently i had developed an as3 videoplayer for a section of a webpage. The player loads the links for the videos from an xml file. It had been tested locally and it works great. BUT when i uploaded the entire "site" on my web server - surprize The stream does not start. And i don't understand why. I've uploaded the exact structure ... and i also know that it reads well from the xml file, cause it loads the video thubnails and names ... just the video won't start.

View 3 Replies

ActionScript 2.0 :: Timer That Start And Stop When Player Won

Oct 26, 2004

I want to start a timer when the game begins that counts up, but doesnt actually display the time during gameplay, but stops when a player has won and the screen goes to the player wins screen. From there I want that time to display in a text variable along with all the other statistics I have generated. The timer will also need a reset function when starting up the game again.

View 2 Replies

Java :: How To Fire Intent To Start FLV Or SWF To Flash Player 10.1

Dec 21, 2010

I have a bunch of flv video files stored on a media server, and I am trying to get them to launch in the flash player. I have downloaded the flv file into temporary storage, and try passing it using an intent. This is what my code looks like (from what I have seen on the net):

try {
URL urlLink = new URL("[URL]");
// Serve the file
InputStream in = urlLink.openStream();
FileOutputStream fos = new FileOutputStream("/sdcard/tempFlash.flv");
byte[] buf = new byte[4 * 1024]; // 4K buffer
[Code] .....

View 1 Replies

ActionScript 2.0 :: MP3 Player - Start Playing Music On Click

Sep 16, 2009

I followed the tutorial about making your own mp3player but I don't want the music to start directly I want it to start after I clicked on play ...
Code:
// Setup sound object
var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);
[Code] .....

View 0 Replies

ActionScript 3.0 :: Audio Player Buffering - Stutter Start

Oct 24, 2010

I have a music player playing a live radio stream. Everytime the player loads the radio stream, it has a stutter start and then it buffers for a few seconds (how long depends on your internet connection speed) and then it continues playing. I want a buffering icon to appear during this brief buffering period. Watching the sound.position, I see that its increasing pauses at approximately the 0.4 second mark when the stream buffers.

When buffering finished it continues counting up to infinity as the stream plays. I thought maybe it would be possible to write an IF statement saying if the current sound.position is equal to what it was a second or split-second ago (i.e., it's not increasing, the stream is stopped for buffering), display the buffering icon. But I don't know how to write this IF statement.

View 5 Replies

ActionScript 3.0 :: Multiple Videos On Player - Stop One And Start Other

Dec 19, 2009

I got roped into assembling a cd of videos to send out to jazz students for my video class and I'm a bit over my head code-wise, so I'm turning to the pros. The project has about 5 different videos that are all suppose to play (locally from the disk) when the corresponding button is clicked, and they need to be scaled and positioned on the video section of the background img. I can make the buttons work, scale and position is no issue, but can't get one video to stop and the other to start.

I thought I would simply just removeChild the current video and start up the next one. When I took the project I thought it would be simple, but I had never really worked much with video so when I dug into it I found myself a bit overwhelmed. How to work with local media (I found tons of stuff on streaming it from the web) all I need is to make one video stop and another play when a button is clicked.

View 1 Replies

Media Server :: Video To Skip With FMS When Start Player After Started A Stream

Oct 11, 2010

I'm playing live stream supporting FMLE from FMS. There is no problem with playing if we are starting at first the player and then we are starting the stream with FMLE. The video skipping problem is occurs only if we are starting first the stream with FMLE and than our player.The versions: FMLE 3.0.1.5963, FMIS 4.0.0, Flash Player 10.1.53.64, and codec h.264 Is this a bug in FMS/FMLE or I'm doing something wrong?

View 3 Replies

Flex :: Movie Does Not Start In Full Screen In Flash Video Player

Oct 16, 2009

We have this legacy code of a flash video player that functions well enough but still has some loose ends I need to tighten up. It can do the basic "switch to full screen and back to normal size" stunts, however with one exception.

On the first fresh load of the app, if I switch to full screen mode first, and then click to play the movie, the player would be in full screen, yet the movie itself would remain in it's original size.

//trigger
if (stage.displayState == StageDisplayState.NORMAL) {
stage.addEventListener('fullScreen', procFullScreen);
stage.scaleMode = StageScaleMode.NO_SCALE;

[Code]....

The VideoDisplay object even returns the expected width/height, but the movie just plays in it's original size. If I switch screen sizes during movie playback, then the movie size will shrink or stretch as it should.

View 1 Replies

ActionScript 2.0 :: Start An Unrelated Program (such As Window's Media Player) From Inside Of A Flash Program?

Sep 29, 2010

Is there a way to start an unrelated program (such as Window's media player) from inside of a flash program?

View 2 Replies

ActionScript 1/2 :: Start Drag Button And Get Url?

Apr 8, 2009

I have a timeline with a movie clip with the instance 'first'. this is a series of logo with buttons that move from left to right. you can click and drag them right or left, and when you roll over them, it pauses the movie.
 
The problem is now I need to make each logo link to a url.When I add for eg:[URL]..to the button within the movie, it does not work, it doesn't open up the url? Any ideas what actionscript or changes I need to make to allow each button to link to a url??

[Code]...

View 18 Replies

Start Timeline When I Click Button?

May 13, 2009

I have used the actions panel to write a stop code on frame one of my timeline.When I test my movie it stays on the home page, which is good! I have also created an 'enter site' button on the home page. I want to click this button and have the timeline start rolling over to frame 50 (where my next label 'contents' will be). At frame 50 I want it to stop, and so on for all of my labels/pages. The action taking place on the timeline is a pan across a panoramic photograph, which will stop at different points.

View 7 Replies

Making Button To Start Animation

Nov 15, 2009

I'm very new at Flash and while Ive picked up the basics of tweening and creating animations. I'm trying to create an image of a post it note that is revelaed via a mask when a user rolls over a seperate image. I have created the animation of the mask and it revelas the note fine. My question is how do I create an invisible button and code it in action script so when I roll over image 1 my mask tween begins playing to reveal the post it.

View 2 Replies

ActionScript 3.0 :: Start A Game With A Button.

Oct 6, 2011

I already have a game. I want to start it with a start button. Just a plain button that when clicked upon, gives way to the stage.

View 5 Replies

ActionScript 1/2 :: Start A Function Without A Button?

Apr 5, 2012

I currently have an action that starts with a button click. But I want it to start on frame 1 automatically without a button. How do I need to edit my code to make this work correctly? It's a typewriter effect and I plan on exporting it out as a .MOV and importing it into Adobe Premiere. I also need to figure out how to get the background transparent if possible.[code]

View 3 Replies

Execute On Pressing The Start Button?

Mar 21, 2010

I'm making a Century club timer, it is to execute on pressing the start button, and then run until finished (our paused, but thats not implemented yet). To keep the timer accurate I had to use the Date() function.The timer() function is used to update the displayed time. I tried using a while-loop for this, but then the whole thing would just freeze. :S So instead a use a infinite timer that ends when currentTime == targetTime.

[Code]...

View 4 Replies

IDE :: Start 2 Videos When Clicking Button?

Apr 15, 2011

I would like to to have 2 vidoes next to each other on a webpage which start simultaneously so that the viewer can compare the two.

what HTML code to use in order to achieve this.

View 1 Replies

Actionscript 2.0 :: Flash MP3 Player - Previous Button And A Volume Scrolling Button?

Apr 18, 2009

I am completely new to this with flash and action script. I checked the Flash MP3 Player tutorial and I wonder how I'm doing a previous button and a volume scrolling button in action script?

View 1 Replies

Flash :: Add Button-like Behavior To A Video Player Button Component?

Feb 23, 2011

I'm trying to create a simple "universal" media player which presents the same user interface (or as similar as possible) for video and audio playback. Unfortunately, FLVPlayback seems not to be able to handle audio files as far as I can tell, so I'm using a Sound and SoundChannel.

My video playback is handled using an FLVPlayback component which is "wired" to standard controls on-the-fly when needed. What I want to do is wire them to the Sound / SoundChannel when I'm playing a sound so that the same UI widgets work in both cases. I'd like to avoid building all my components from scratch because the FLVPlayback component does a lot of nice stuff "for free" but it's starting to look tricky.

The standard PlayPauseButton is a MovieClip with two layers, one containing the Play button (and with the instance name play_mc) and the containing the Pause button (pause_mc). Inside one of these is a movie with some code like this:

stop();
this.upLinkageID = "PauseButtonNormal";
this.overLinkageID = "PauseButtonOver";
this.downLinkageID = "PauseButtonDown";

[Code]....

View 1 Replies

Flash8 :: Make A Button To Start An Animation And Only Do It Once?

Dec 17, 2009

How would i make a button to start an animation, and only do it once?(Also, make the button change when finished? like a cellar closed, then opened :/) (AS2)

View 2 Replies

ActionScript 2.0 :: Flash - Onload Start First Button?

Jan 13, 2010

Basically, I have a movie with a set of buttons which show some information when clicked or mouseover. Effectively, until i have clicked onto a button there is white space and when clicked, the information shows in this whitespace.What I would like to do is when the movie is loaded I would like to pretend the user has already clicked the first button, thus showing information and not white space. I can get the movie to do this however I cannot get this to then following the rest of the actionscript. It remains loaded.

In short what I am looking for is some sort of onLoad function to pretend the first button has been clicked and then ignore or unload the command and ONLY repeat this if the movie is loaded again (refresh etc)It is a movie clip NOT a button, sorry. So I would like to load the first movie clip (there are 15 in total) then cancel this command when the user interacts and clicks to move on.I have added this to the first moviemc.onLoad = function() {this.gotoAndStop(10);}But this just keeps repeating itself when the user clicks another mc to move to the next item. I need this to only happen once on load.

View 1 Replies

ActionScript 3.0 :: Start Button - No Prior Knowledge?

Jan 12, 2010

I need to make a point in a Flash video where the video stops and pressing a button will move to another frame.  I understand there is something called a "stop action" but not what this means.  Using other online instructions, I end up with the video not stopping and the button not doing anything. 

View 1 Replies

ActionScript 3.0 :: Play Button To Start Process

Nov 25, 2011

All I want, is to have a button (play_but) to start the process. I want to get rid of the enter frame business. I tried, but I had to click every time the button to draw the line. I just want to click the button once and have my line plotted.

var xspeed:Number = 2;
var yspeed:Number = -2;
var xpos:Number = 0;
var ypos:Number = stage.stageHeight;
graphics.lineStyle (2, 0xffffff);
[Code] .....

View 3 Replies

ActionScript 1/2 :: Button To Start And Stop Music?

Jan 26, 2012

I'm fairly new at AC2 (Yes, I need to update), and I have Flash CS3.I need to find out if I can have a button that when you click it, plays a music file, and then when you click it again, the music that was playing for that button would stop.I have a text box on top of a rectangle and I selected them both and converted them to a button symbol, named it MusicFile, double clicked on the new button, inserted a new keyframe in the timeline on "down" (where it says Up, Over, Down, Hit), and then dragged the music file from the library onto the button. It works fine, until I click the button a second time, and it just keeps playing as if I pushed play twice and two copies of the sound started playing.Is it possible to make the button play the music when it's clicked the first time, then stop the music that it was just playing the second time it was clicked?

View 1 Replies

ActionScript 3.0 :: Get Flower In .fla From Start-button To Other Buttons?

Jan 14, 2010

I got one cuestion. How do I get the flower in the .fla (below) from start-button to the other buttons? All with the script and full working.URL...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved