I have spent the last four hours trying to work this out, using a number of different tutorials and always running into roadblocks in one form or another.
I'm using Flash CS3 with Action Script 2.0 enabled.
Essentially, I want to be able to make individual buttons to play in one frame on the main timeline that turn on and off simple loops that I've made.
I have a video of a man dancing, and I want to give the user the ability to press nine buttons and activate each loop to play over the video.
- I need each loop to be able to layer - so, each button controls only it's own loop - giving the user the ability to compose the music that the dancer is moving to.
The way I though I would do this would be to make a single button for each loop, that when clicked played the loop, and then when clicked again muted that single loop, and then when clicked, played it again and so forth.
- I have the nine loops cut up and in the library, but I don't know how to program this.
Additionally, I would really prefer the loops to not be playing, and for the user to have the chance to build the piece of music around the dancer.
I've been trying to make a sound-loop player for quite some time now (i'm new to as3).i've made six letters converted them into buttons and i want them to play a different wav sound loop each one whenever i click on them and to stop the sound when i click again.This works fine for the first button but not for the rest of them because i dont know where to insert the similar code for the rest of the buttons.
Here's the code that works perfect for the first button:
import flash.media.Sound; var sound:Sound = new The_Rloop5(); var soundControl: SoundChannel = new SoundChannel();
[code].....
Now the only thing that i managed to do is to play the same sound on both of the two buttons.
So I got a loop that I'm loading into Flash with the Sound object. The sound loads good and it starts playing but when it loops back to the beginning there's some silence and then it loops again. The sound loops fine in a sound editing program, the only problem is that Flash leaves a gap when its going to start again. Anyone has come up with a solution to make a sound loop seamlessly?
I just want sound to loop infinately. What do I have to type in the "loops" box to make it do this?OR do I have to use script, for example, an "until False" script loop.
I need to create a sound select board. There are 6 buttons; 5 which contain music, and one which will silence the music. Each time you push each button, the previous music will stop. The first button's music will start automatically.
I am trying to create a turn base board game. It has four player and out the the four players one is human and the rest are cpu's. The players are number 1,2..4. In the beginning of the game it ask's the user to which player will be the human player. A random number generator function picks a random number between 1-4 and that number player will go first.
There is a while loop that controls the game play something like: var isNotEndofGame:Boolean = true; var human:Number; //the user inputs this number. var aPlayer:Number = getRandomNumber(1,4); //players: 1, 2, 3, 4 while(isNotEndofGame) { if(aPlayer==human) doHumanMove(); else doCpuMove();
This reset's the player so they can keep on playing until game ends. if(aPlayer==4) aPlayer = 1; } inside function doCpuMove() and doHumanMove() isNotEndofGame will become false when the game objective is met.
The problem I am having is when its the human players turn I want the loop to pause or wait so that the human player can do some interaction such as click a button or drag a movieClip. I tried adding adding mouseclick event listeners and timer neither worked.
I'm trying to make a notice board online with flash cs4 and actionscript 3 but I can't find any tutorial or anything really. Is there a way to make a notice board for the web, preferably writing and reading off text files. But if this is impossible, can someone send me a link to a tutorial or somehow help me on how to create a noticeboard on the web with flash?
I am creating a board game and I am using Object Oriented Programming with AS3. I created a movie clip with a circle that moves across the game board. There are 18 squares and 18 frames. I have a button that gives you a value with a dice with the random number function:
public function rollDie():void {_dieValue = Math.ceil(Math.random()*6) this.gotoAndStop(_dieValue);}
I have a class for the dice button, die, gameboard, and the main board. I am trying to make the circle move across the board(or go to the frame in the mc) depending on what the value I get with the dice. Here is my code so far:
[Code]....
The mc instance for the gameboard is gameBoard. Also, if anyone knows how to trigger a labeled frame depending on which square the circle lands on that would be a plus.
i am trying to make a drawing board(like colouring book) where when i click and MOVE THE MOUSE it colours the object(more like a brush and not as a paint bucket)i would like to know how to colour objects individually(without coloring background) and the most IMPORTANT is there any way to detect what percentage of object had been colored(like if 100% of object coloured something happens!)
where to get classes to putting together a board game, free of course.I do not want to use them actually but get the idea of how mine would incorporate into the classes.I have a board game where I want each square on the board to know if it is occupied or not, to change its color, and to keep track of what is actually happening with it.
I have several buttons in a movie and I want to be able to rollover an individual button and play the sound for that button and when I rolloff I want the sound for that button to stop.
1) I have a button and when I put cursor over it, it must start looping a sound. When I drag away, the sound must stop. I would be even cooler if it was possible to make the sound fade away when the mouse is rolled away. I have no problem creating another sound file that fades my current sound away.
2) I have a button which represents a knife, that should stab something (a panel) once pressed. So fist the knife must be clean. but after one or more presses, the blood should remain as a movie clip (as I want to animate the dripping blood)
3) once rolled over a button, the sound must start looping (as I wrote in 1.) AND the knife should slowly go backwards (MC). BUT when I roll mouse away, the sound fades away (as in 1. again) PLUS the knife should slowly move back to its place in stead of just jump from one place to another.
I have CS4 but saving doc as CS3 so I hope I am in the right forum. I added a behavior as sound streaming mp3. I want to loop it.. Here is the action code that was generated. How would I change it to looping. I changed the true to false at the end of the code but that didn't work. here it is:
I have managed to get my sound playing from the library but would like to know what the simplest way to loop the sound in as3 would be, (using the smallest amount of code as possible preferably!)
I added a behavior as sound streaming mp3. I want to loop it.. Here is the action code that was generated. How would I change it to looping. I changed the true to false at the end of the code but that didn't work.here it is:
how to continuously loop a sound, but all I have seen is aSound.play(0,1000);Not really a continueous loop. I was looking at watching for one of the COMPLETE dispatches (from the Sound object, or from the SoundChannel object), then start the sound again. The only thing is would this not start another channel?
How do I get this sound to loop? "sonido1" - my mp3 Code: stop(); import com.greensock.TweenMax; import com.greensock.easing.* function love() { TweenMax.to(sonido1, 1, {volume:1, delay:0.5}); [Code] .....
So, I downloaded a simple sound loop from Flash Kit.
I am building a Flash webiste and want the sound to loop once the movie loads. I have added a stop and play button to the movie in case the viewer doesn't want the sound on. I understand sound can be annoying.
I add the following code to the FRAME 1 of the movie. Everything works fine but when the loop finishes, it just stops. How do I get it to continue looping? Also, as I navigate to other sections of the movie.. I want it to continue playing and not restart when I go back to say "Home". Home starts at frame 1 as well.[code]...
ok so im having an issue with Flash CS5.I have a sound looping, and my animation is only 13 frames long, while the song is like a minute long, so each time the animation loops threw the default "Loop Playback" a new sound audio is played which os overlapping the previous over and over causing a massive echo effect.Whats the best way to loop both of them insync, or atleast copy and paste the animations frames and make it the length of the song?
I have created a button which plays an external MP3 file, but the first problem is it only plays once. What script do i have to add so the sound continually loops. Secondly, I have created a button which stops music, but I can't figure out the code which stops the MP3 file playing. I've tried backMusic.close();, but an error message is displayed as the sound is already loaded up.
Is there some secret to attaching sound via a loop? I have had to hard code this and write it out 26 times.
Here's what I want:
ActionScript Code: for(k=1;k<=26;k++) {
[Code]....
I've tried it with _root, without, using a variable such as moji = eval("moji"+k) then moji.onPress, but nothing works. It just won't play the sound unless it's hard coded.
I don't know why, but my sound dosn't loop, even though I set it to loop, here is the complete code: This is on my 1st frame: [AS] bg_music = new Sound(_root); bg_music.loadSound("music.mp3", true); bg_music.stop(); [/AS]
This is on my sound controller clip, shows the progress of the music playing and stuff: [AS] onClipEvent (enterFrame) { var musicloaded = _root.bg_music.getBytesLoaded(); var musictotal = _root.bg_music.getBytesTotal(); var lprogress = Math.round((musicloaded / musictotal) * 100); var musicttime = _root.bg_music.duration; [Code] ..... I tried with "loop" too, but the sound just plays once.
can anyone tell me how to loop 5 different sounds, drums, bass, sax etc. When i use :
[Code]...
and play them all, it's ok, looping fine, but what i want to do is to have 5 buttons that control those 5 sounds. turning of and on some of them... i tried with "secondSound.setVolume(0)" to turn off 2nd sound, but that kill them all... CAN i SOMEHOW set volume down just for one sound? OR if thats not possible, i need bass or sax sound to start again, when button is clicked, in the same position where drums sound is... but when loop start again to start also from "0" i've also tried reading firstsound position:
I am trying to add a sound loop to my site and I have managed to get the sound to play and I can make two buttons start and stop. But how can I make 1 button that both starts and stops the sound?
Here What I have got.
Code: var snd:Sound = new Sound(new URLRequest("dub.mp3")); var channel:SoundChannel = snd.play(); var pausePosition:int = channel.position;