ActionScript 2.0 :: Play Two Songs At The Same Time If I Press The Button Twice?
Mar 5, 2002
I have it like this;
on (release) {
alexSound = new Sound(this);
alexSound.attachSound("coolsound");[code].....
But i dont want it to play two songs at the same time if i press the button twice.
View 1 Replies
Similar Posts:
Jan 29, 2011
i'm designing a website in flash8... now i have created some buttons, and i want that when i click on the button stars will fly from them and there will be a sound... i have already created the animation of the stars seperatly and it's in the library, i have also the sound file.... i just can't remember how to put everything together.... when i'll press on the button the stars will be flying from the button and the sound will play?
View 3 Replies
Jun 20, 2005
If you press a button within a certain amount of time, you are taken to lets say frame 2, if the time expires, you are taken to frame 3.I have used up all of my "i'm still a newbie at flash", so I'm just gonna tell you the truth and say that I haven't done any AS (or flash for that matter) in quite some time, so I guess I have to get busy and learning actionscript.
View 2 Replies
Aug 11, 2009
OK, say I have a button that does something, like go to the next frame, is there anyway to have it play a simple sound located in the library without looping?
View 8 Replies
Jan 23, 2012
I have a problem with two functions. This is the story: the user has to press the space button on keyboard when he sees something on screen, then the "rightClick" function is called. If he presses the button when there is something else on screen that is a wrong answer (function "wrongClick" is called). The problem is that when the user presses the space button both function run at the same time.
This is the call of the wrongtClick function on frame 5
stage.addEventListener(KeyboardEvent.KEY_DOWN, wrongPress);
This is the call of the rightClick function on frame 10
stage.addEventListener(KeyboardEvent.KEY_DOWN, rightPress);
Both function are very simple:
function rightPress(event:KeyboardEvent):void {
scorenum += 1;
trace ("Right:",scorenum);
} function wrongPress(event:KeyboardEvent):void {
wrongnum += 1;
trace ("Wrong:", wrongnum);
//and plays a sound too
}
View 3 Replies
Jan 9, 2011
I've made this game in Flash Builder 4, I thought it's all working but when I press the play button nothing is shown and it's not working at all.
package{ import flash.display.MovieClip; import flash.events.*; import flash.ui.Keyboard; public class Pong extends MovieClip { public var ai:MovieClip = new MovieClip; public var playerone:MovieClip = new MovieClip; public var [code]..................
View 6 Replies
Dec 1, 2009
I'm having the worst time figuring this out... Here is the movie I made: [URL] and I want it to stop, then when i press that circle, continue with the animation. right now i have a stop(); on frame 19 the button is named myBtn I have tried all kinds of myBtn.onRelease = Play() but when I do that, i get errors and it no longer stops...
View 7 Replies
Sep 15, 2011
how can i make MC visible for 20 seconds when a button is pressed i tryd to do this and this is what happend
when i first press the button it works perfectly but when i press the button the seccond time the MC doesnt turn visible can someon give me a sample how to do this?
View 3 Replies
Jul 11, 2011
I'm looking for some help regarding stopping sounds in Actionscript 3. Basically I'm making an interactive story game, basically a quiz game. On the main menu I have a narrator talking. What I basically want to do is have the track stop playing when you press the play button. I have the soundtrack playing already and the play button too. I just can't figure out how to get the sound to stop when I press the play button and it goes to the next scene.
[Code]...
View 2 Replies
Dec 5, 2005
i need to make a certain movie clip play when i press a button.
View 4 Replies
Feb 15, 2010
Is it possible to create a button that when you press it and hold it, it will play a sound, and when you release it then stops the sound?
View 2 Replies
Jan 10, 2010
I have followed a tutorial and made a little piece of music start when you click home. The problem is that if you go elsewhere and go back to home the music is starting again and two songs is played at the same time.
The code i've used is:
ActionScript Code:
var sndMusic = new Sound();
sndMusic.attachSound("mySound");
sndMusic.start();
View 8 Replies
Apr 21, 2005
Look at this tutorial [URL] I want the sound to start directly when you press the play button, without having to adjust the volume.
View 14 Replies
Jan 4, 2009
I am making a photo slideshow with music playing in the background. I have the first song in so it plays as soon as the slideshow starts. I want more than one song to play. I would like a new song to start as soon as the old song is complete. I tried creating another music variable underneath the first code but that didn't work. How can I add more songs so when one song ends the next one starts playing?
View 1 Replies
Jan 27, 2009
i want to make a fade volume between songs to songs...this is the function i have made... what's wrong?
Code:
fade.onEnterFrame = function() {
new_volume = 0;[code].....
View 9 Replies
Jun 18, 2009
So im using macromedia flash 8, and Im wondering how I can make a frame automatically play random songs, and have them keep repeating too.
View 4 Replies
Jul 18, 2011
I have a flash player which can play the songs stored on the Local Server, under "mp3" directory.
I would like to modify this player, so that i can play the songs stored on the remote server, through an API.
Following is the code of the player [code]...
View 4 Replies
Apr 2, 2009
I am having go with one one of the tutorials here. I am trying to use XML to loop, or play, the list of songs that I have going on. Though, I get stuck with two problems:
1) The Flash will not play the 2nd or third song of the XML file, only the first than it stops.
2) The Flash will also not play the XML file if I embed it on another folder, like for example: I want the flash to be embeded on my home page (so index.php) though I have all my files (songs.xml, the songs, home.as, flash_home.swf) on a folder named /flash/ off my root folder.
View 14 Replies
Aug 16, 2010
Im new to the AS3 game but I need some help with something. I have built a pretty good website mp3 player but it plays the songs in order. I want the the mp3 player to play a different song everytime it loads.[code]
View 2 Replies
May 31, 2011
I'm looking to create a music player where one can upload songs from any computer on the web and play them back... is this possible and if so how would I go about creating it?
View 1 Replies
Apr 13, 2011
I need to play some mp3 sounds (bird songs), depending on keyboard events.
First I create my Sound and SoundChannel
var music:Sound=new Sound();[code]......
Everything fine till there but I need later to stop the current sound, and play a new one ...I made some tries ; I am able to stop the current sound, but unable to play another one .How should I proceed ?
View 1 Replies
Jan 13, 2009
How can i make it so a when you press a button it starts a countdown but every other press dosent reset it?
View 14 Replies
Feb 1, 2008
I just got Flash CS3. I'm trying to get my main timeline to stop in the begining, on button press to play and at the end stop again. In AS2, you would just put stop(); on the first keyframe and stop(); on the last key frame and program your buttons accordingly.
The stop(); does not work!!!! It's driving me crazy. What am I missing? I've gone through the tutorials in Flash and they don't work either.Also, if you have MovieClip that contains an animation and you don't want the movie clip to be on a continuous loop how do you stop it from playing. In AS2, I would put a stop(); on the last keyframe of the movieclip's animation. This also does not work in AS3.
View 9 Replies
Nov 13, 2010
I have a sound clip that I'm loading externally into my flash file. The code I'm using looks like this and is placed in the as layer on the first frame,
var mySound:Sound = new Sound();
var myChannel:SoundChannel = new SoundChannel();
var myTransform = new SoundTransform();
var lastPosition:Number = 0;
mySound.load(new URLRequest("introaudio.mp3"));
myChannel = mySound.play();
[Code]....
View 14 Replies
Aug 29, 2011
I am trying to make an animation that will pause and start again after a certain time. The problem is I don't have any experience with Actionscript (or programming of any sort for that matter)..I found this link that appears to explain how it's done, but I can't seem to replicate it. I'm not even sure which version of Actionscript this is.. [URL]
View 5 Replies
Dec 14, 2009
How can I make it so that each number will play one example at a time?[code]...
View 0 Replies
Oct 22, 2002
I have a mc inside a frame on the main time line. a button on the main time line. i want to play the movie each time the button is clicked. another situation is i hv loaded a movie using loadMovie command. i want to play it again. currently i m using unloadMovie & loadMovie in succession. is there any other way of doing it...
View 4 Replies
Nov 25, 2010
I have a site up that is a "music" site, it is XML and flash and I would like to know if it would be possible to and how would I enable the page so that it shuffles the songs and plays a random song every time the page is loaded.URL...
View 2 Replies
Mar 12, 2009
It is action script 3. As of right now I have a button that plays a song and I have a button that stops a song. The music plays as soon as the file is open. What I am trying to do is upload 3 more songs and add a skip button that will skip to the next song.After the user clicks 4 times it goes back to the 1st songs again.I was going to avoid using a pause, a step back to previous song button and a volume slider. [code]!
View 3 Replies
May 20, 2009
How can I use two key at a time :
I wrote this code for single key ....
Code:
stage.addEventListener(KeyboardEvent.KEY_DOWN, moving);
function moving(event:KeyboardEvent):void
{
if (event.keyCode == Keyboard.RIGHT)
[Code].....
View 3 Replies