ActionScript 2.0 :: RPG Battle Music Loop?
Mar 28, 2009
well i was wonder how this could be done in flash or if its even possible with sound from the library..have the intro part of the song play first then loop the actual music for the duration of the scene.
View 2 Replies
Similar Posts:
Apr 5, 2005
I have 'Sound On' and 'Sound Off' buttons on mutiple scenes and I am playing the music loop in my flash movie by loading an external swf. When I move to the next scene the sound reloads which I do not want. How do I use an if-statement that checks whether or not the music.swf, that needs to be loaded is found and when it is found, go to a frame?
View 1 Replies
Mar 9, 2012
what would be the best way of creating rounds for a battle system? Say like with each attack a round goes by. rounds are not calculated at randomor player 1 hits player two = 1 round gone, now it's round two and so on until the player(s) hit points are all gone I'm using while loops for the record
View 3 Replies
Sep 6, 2009
Basically I am making a Turn Based battle system. Each Frame is an attack. So for the enemy I did this:
(in scene Frame) attack = Math.round (Math.random ()*2)+0;
so it would randomly attack
then I also put in this in an object INSIDE my enemy clip
onClipEvent(enterFrame){
onClipEvent(enterFrame){
if (_root.attack == 1 || _root.attack == 2){
[Code].....
you see what ive tried to do here havent you?
why isnt it working? it plays, the random value thing works(used dynamic text box to check this) so what am i missing? (using AS2)
View 17 Replies
May 25, 2009
when I create a new Tween/Graphic symbol it turns into an old tween I already used (Ex: Two tweens, when trying to use the second one it reverts back to the first one). Both of them are on the same layer called "Text", also it seems to be fixed when I put the second tween on a new layer. But if I do this I will have at least a good 50 layers of text :S.
Second problem is I want my background music to loop throughout the whole video, my project has multiple scenes and I am baffled as to how to make the music play throughout.
EDIT: my project has to be 45 seconds and the music loop I'm using is about 17 seconds.
View 2 Replies
Apr 29, 2009
i just want to have my music looping forever regardless of the timeline stopping and starting. is this possible?
View 1 Replies
Jul 4, 2011
I have a infinite music loop and I am trying to have btn_start trigger a fade out on the music along with its original gotoAndPlay.I have two scenes, "opening" and "animation". btn_start and the following code are in the "opening" scene.the fade out will play along with the first couple seconds of "animation" since the gotoAndPlay connects to frame 1 of "animation"Can this be done? lights of how to proceed this.
stop();import flash.net.URLRequest;import flash.media.Sound;var url:URLRequest = new URLRequest("subtle.mp3");var snd:Sound =
new Sound(url);snd.play(0,
[code].....
View 3 Replies
Mar 26, 2011
I thought I had this one right until I listened a little closer. Below is the code that I am using to make a loop button for my music player. At first, using everything but the last line, seemed to work perfectly, until I realized that the music wasn't starting over from the very beginning. Basically I'm using a pause command, followed by a resume command to keep the pressing of the loop button from playing the song over itself, if it'scurrently playing. So in that respect, it works great. But when the song ends and estarts, it starts only from the point of the song when I pressed the loop button. So I'm trying to figure out how to make the 2nd time that the song plays and each additional time after that, play from the very beginning of the song. While still being sure that the song does not play over itself, the first time it's played.
Code:
loopbutton_up.onPress = function(){
mySongPosition = _root.mySong.position/1000;
[code]....
View 8 Replies
Apr 30, 2009
[URL]
I followed it exactly and the button worked fine with the music,
but then i stated to add keyframes, it works fine carys on playing on every keyframe i go to, but the problem is when i go back to the first keyframe the music still goes on which is good, but its starts again over the one thats already playing!
View 2 Replies
Oct 28, 2002
I want to create a movie clip with 5 buttons in it..... each button will loop its own music, how to do this step by step.
View 3 Replies
Dec 16, 2009
Everytime I click on my home Logo the music overlaps and plays again. How can I stop this? and... How can I get the music to loop? (I've tried the mySound.play(0,10000); code but it didn't work)
[Code]....
View 3 Replies
Oct 11, 2009
I want a site to have background music, but when I attach the music to the file it makes it quite large ...3 meg and the site is slow to load. Is there any way of having the music separate from the flash file and still have start stop music buttons?
View 2 Replies
Apr 30, 2011
I'm working on an animation where I have my "dog" fighting the evil vacuum cleaner. I got most of it to work the way I want it to.
1) I have movie clips entitled pepper_mc (where my dog is supposed to be walking), swirl (where a swirly-type symbol is supposed to spin over the dead vacuum's head), and vacuum_mc (where the evil vacuum is supposed to have a swinging arm (called vacuumarm_mc) that I created using the bone tool). When I add them to the stage and test them, the animations within the movie clips don't happen.
2) I have background music that I'd like to stop playing at the end of the animation, but I'm not sure how to do that. (using the stop(); actionscript doesn't help).Where am I going wrong? I'm using Flash Pro CS5.
Here's the file --> Pepper and the Vacuum of DOOM!
View 1 Replies
Dec 13, 2005
When the movies performs the getURL action, I want the music to continue playing, but the getURL function seems to stop the music at frame 152 (where the getURL action is placed), when I wanted the music to continue to frame 257 (the end of the movie). I hope I've explained this clearly
View 3 Replies
Nov 9, 2010
I am trying to create a music animator. It will have bars that move up and down do the beat of the music. This is like windows media player where the music animations play. I want it to be verticle bars, where some are in sync with like the base and others are in sync with the tempo. Does anyone know of a tutorial for this? I am trying to emplement it within my website so that whatever music I am playing will auto control the bars and sync.
View 5 Replies
Mar 30, 2009
I downloaded a flash template and have modified it to suit our company but there is something that I can't do. When the file loads in the browser, music immediately plays and loops until you click a button to stop the music. On our video page, we have video
that we need to play that has sound in it. How do I get the background music to stop when my video plays without having to go up and stop the music manually. The videos are loaded via an external XML document and there are no buttons in the FLA file to link code to. the website is [URL]
View 4 Replies
Feb 21, 2007
I am streaming music from my site using flash, but after the 3rd music is done, it just stops. Do i have to flush something or create a new music object for each 3 songs?
View 6 Replies
Dec 1, 2011
What is technical difference between buffering and loading ? Say, i have a video, which is showing loader bar in progress. Then what's happening exactly ? Buffering or Loading ?
View 1 Replies
May 1, 2009
Using Macromedia Flash Professional 8.
I have a website banner made in Flash. I have added a music file to it and Play and Stop buttons. I also have a Replay button to replay the banner animation once it stops.
I have put the music on a separate frame so that it will not play automatically when the banner loads. I have made the Play button direct to the frame the music is located at so that when clicked, it will go to that frame and play the music file.
The problem I am currently having is that if I click the Play button more than once, it will play the music file again on top of the current play-through.
So if I click Play, the music will play. Then if I click it again, the music will play again, but on top of the first instance of the music, so two instances of it will now be playing and it sounds horrible.
I would like to make it so that if you click Play when the music is playing, it will not play the music again until the music has stopped.
View 6 Replies
Oct 22, 2003
ok i have a music off button...i want the text to change from "music off" to "music on" and for the actionscript code to change so that the music will turn on when you press on and not off when you press on.
Would I use attachMovie and just convert my button to a movieclip or is there another way? etc, loadmovie.
I know there is an easy answer to this and it is at the tip of my tounge.
View 3 Replies
Oct 22, 2010
Im working on a project where i have to develop an audio application for an android smart phone, but i have to present a mock app so i designed it in flash. I have a rough app where it loads the song, plays, pauses, foward, and previous, but im stuck flash isn't my first language, as you can tell from the attached .as file there are two things i need help in one is: when one clicks the next button the audio clip from the current song should fade out and the next song should fade in while the other song fades out. second thing is i don't know how to get a working seek bar for the player.
View 3 Replies
Apr 16, 2010
I would like to create a loop so the icons in the menu continually loop indefinitly.[code]
View 2 Replies
Dec 11, 2010
I am attempting to use a loop to create text field with the loop's current value. The code looks like this:
ActionScript Code:
for (var i = 1; i<=10; i++) {
var 'nameHolder'+[i]+'_txt':TLFTextField = new TLFTextField();
'nameHolder'+[i]+'_txt'.x = 40
'nameHolder'+[i]+'_txt'.y = 40
'nameHolder'+[i]+'_txt'.text = "Hello World"
}
So essentially what it should do is create 10 text fields at 40, 40 with the text: "Hello World".
View 7 Replies
Jun 13, 2004
i'm trying to do an infinate loop for my m.clip.the looping part does not want to loop...it loops back to my firrst frame even though there are two same picture in the movie clip.....here's a sample of what i use for the infinate loop script..
[Code]...
View 2 Replies
Jul 20, 2009
I have need of loops / nested loops that pick different figures depending on where you are in the loop. The whole function needs to run through 'ml' times. 'ml' is a dynamic figure. Loop 1 = While the loop is within the first 12 iterations, 'exconemp' must equal 100. For iterations 13 - 24, 'exconemp' must equal 102.5, for 25 - 36 it will be 105.06, for 37 - 48 it will be 107.69. This needs to change every 12th iteration until it has reached 'ml'. The calculation takes the value of the previous 'exconemp' and then multiplies that by 0.025.
Loop 2 = While the loop is within the first 120 iterations, 'abc' must equal 0.015 and any further iterations must use 0.01. This must also work in a way to figure out whether 'ml' is higher or lower than 120 and work accordingly. My main issue is this - how do I get the loops to run through as this: While the iteration is < 12, do this, THEN take the final figure (12th iteration) and start on 13 - 24, do this THEN etc etc. How do I produce a THEN statement? I can get the code to pick up the final values, but not change along the way.
[Code]...
View 6 Replies
May 5, 2011
Say, I had a loop in a function...
[Code]....
How would I refer to a in another function
View 8 Replies
Nov 9, 2010
Should I declare the _mcContainer var before the loop or no? (performance increase?)
for(var i:uint = _startIndex; i <= _endIndex; ++i){
var _mcContainer:MovieClip = _mcParent["i_" + _position];
}
[Code]....
View 1 Replies
Jun 2, 2011
Recently I'd been criticized for structuring my for loops like so:
var i:MovieClip;
for each(i in array)
{
[Code]....
This reads better for me personally, yet I'm being attacked for it. Is there any difference?
View 2 Replies
Nov 29, 2011
basically I need a loop within a loop to compare two different arrays in my actionscript3 lottery game. I have attempted the loop but I cannot seem to get it to work ...
[Code]....
So basically within this code check_win is a button. Once the button is clicked it runs the loop. It is meant to take an instance of matches which contains 6 properties and loop until index is greater than matches. According to my output this is happening but the second loop doesn't appear to do anything.
View 1 Replies
Aug 25, 2010
How do i word a for loop to make it loop through multiple arrays?I want 1 for loop to loop through multiple arrays in order to move/alter objects.I want to keep the arrays separate.
ActionScript Code:
characters = new Array();
characters[0] = male;
[code]........
View 3 Replies