ActionScript 2.0 :: How To Make A Song Loop
Dec 12, 2009In Flash mx, how do you make a song loop, because everytime I make a quiz game and someone restarts the song is played over the other....confusing.
View 5 RepliesIn Flash mx, how do you make a song loop, because everytime I make a quiz game and someone restarts the song is played over the other....confusing.
View 5 RepliesI have a list of mp3-songs, when song 1 is clicked it gets streamed, a stop-button appears, if this Btn is clicked, this Btn disappears as it should - but if user forgets to click for stopping sound and clicks song 2, stopBtn 1 remains and the new stopBtn 2 also appears. there should be only one stopBtn, the one next to the song is playing.
I would like to move the stopBtn and I have tried several approaches move; graphics.moveTo; if(stopButton !=null) {removeChild (stopButton)}; I packed the var stopButton:Sprite in the header and so on.
Code:
SoundMixer.stopAll();
import flash.display.Sprite;[code]..........
I am writing a mp3 player and having some issue getting the song length before the entire song has been loaded - which messes with my position indicator, as it needs to know the track length. I thought I could get the length from an ID3 tag, problem is ID3.TLEN returns undefined, though if I right click the track and show properties, the summary tab shows song duration, bitrate, etc... how I can retrieve the song length before the entire thing has been downloaded?
View 4 RepliesI have a Music controller, but i want the song to start automatic when the flashfile is loaded. The script is:
var song:Song = new Song();
var myChannel:SoundChannel = new SoundChannel();
var soundVol:SoundTransform = new SoundTransform();
[code].....
I am trying to make a song position slider, ala most media players, which will slowly slide along as the song progresses, but also allows me to drag and drop it to change the position of the song. I have some code which works perfectly in regards to the progress and dragging parts but the song doesn't change position and the bar reverts to the pre-drag position when I drop it.
Code:
// Sound
sneaker = new Sound();
[code].....
I have a small animation that contains a doll, that need to be synchronized(doll should dance) with the song that is being played at the background. The song is loaded dynamically and the it should shake according to the music.
View 3 RepliesI'm having trouble figuring out the code to add to this to create a random loading song every time the page is refreshed.[code]...
View 0 Replieshow do you make a horizontal scrolling text like in music players where song name scrolls from right to left for example?and then repeats itself after some time...
View 2 RepliesI'm using this code to play/stop a sound in my flash movie, but I can't figure out how to make it loop. What do I need to do?[code]
View 3 RepliesI have made a header with images that fade in/out for a site that I am designing. I have a preloader on there with the following [code]...
All of the preloader images and script are on the first frame, with the content starting on the second frame with the action "play();" so that the fade will start. Everything works beautifully - except that I can't loop it for the life of me! I am a newbie to flash... I published the file with the "LOOP" checkbox checked under the html tab in the publish settings and placed loop parameters in the html of the site, but to no avail.
So I'm trying to make an walking animation but I don't want to move a symbol in motion tween for each part of the leg each time. So how can I make a loop of it?
View 3 Replieshow to make my FLV loop with the script bellow?
[Code]....
Any steps and code to make a simple flash movie loop 2x or 3x in Flash 9?
View 2 Repliesim trying to make a For loop that when run will create a movieclip containing 3 text boxes (title, summary, date) for each one of the XML items. Am i way off here?
Actionscript Code:
function onLoaded_2(e:Event):void{ xml_2 = new XML(e.target.data); xml_2.ignoreWhite = true; var il:XMLList=xml_2.channel.item; for(var
[code].....
I have a little video that is supposed to be an endless loop. I embeded it into a web site as a swf, it streams and than stops at the end. I just read there is a action script to make it loop.
View 6 RepliesI have written a little advertise i AS2.. Now I want to make the whole movie go into a loop, but how?
Do I need to delete all onEnterFrame's first?
Trying to pick up a movieClip instance from my library and set it on stage and make it clickable, (dropdown/dropup) menu).
var MenuItem1:Array = new Array("text1", "text2", "text3","text4");CreateM(MenuItem1.length);function CreateM(Menu1:Number):void{
for(var i:Number=0;i<MenuItem1.length; i++){
[code]......
I looked through the documentation on looping, but I don't understand it. I'm trying to make this function loop, until the user stops it:
function playMusic(evt:MouseEvent):void{ channel.stop(); //to prevent users from starting files multiple times over top of each other - is there a better way to do this? channel = myMusic.play(songPosition); myTimer.start();}
In these loops (that works perfectly) I seem to be repeating myself alot. Is there a way I can write all these tweens in a more elegant way?loop 1:
ActionScript Code:
for(var projIdx=0; projIdx < projectsArray.length; projIdx++) {
trace(gallery["photoItem"+ projIdx].isOpened);
[code]....
All I want is my circle to go across the page and to keep looping. My circle is moving great with this code:
onClipEvent(enterFrame) {
speed = 9;
this._x += speed;
}
What do I add to make it loop?
Is there a way to make a random 'for loop' like[code]...
i'm pulling stuff from an xml file and would like the loop to display all the entries, but in a random order rather than 0, 1, 2, 3.
if i used the random math function i'm not sure how to tell the loop which entries have been displayed and which have not.
i developed a short movie in actionscript 2.0 with all of the AS is in one frame, and i chose "loop" under publish settings. the swf file has been added to a web part on my sharepoint site, but the movie will not loop. how can i get it to loop infinitely? is there AS that i can add for this? or does some coding need to be added to the aspx file?
View 1 RepliesI am doing a really simple flash piece and was wondering if someone could help me real quick...all I want is my circle to go across the page and to keep looping. My circle is moving great with this code:
onClipEvent(enterFrame) {
speed = 9;
this._x += speed;
}
what do I add to make it loop?
I am needing to make the flv loop from my .fla file which contains .flv files. I know there is a piece of AS 3.0 I need in order to make them loop/make the entire movie loop but I am not sure what it is.
View 6 RepliesI have an embedded 10-second video (of water ripples, for example) that I would like to loop continuously without displaying an obvious break/jump from the end frame to the first frame.The video itself does not end at the beginning, so it cannot simply be looped. The only way I can think of to simulate a seamless loop it to use the alpha/fade tween somehow, but I have no clue where to begin, or if this is even possible in flash. I just have these two theories:
THEORY #1:
If a movie clip can be reversed, then I can append a reversed copy of the clip on the end, which would create an actual seamless loop.
THEORY#2:
If I can cut the first 2 seconds of the clip, and paste it over the last 2 seconds of the clip, then fade in on the first one, this would create a virtual seamless loop.
Of course, I have no idea if these options are possible in Flash (I have CS3).
I played around quite a bit and came up with exactly the effect I was looking for. Basically a movie clip with floating icons that come in and out of the stage. All was done in actionScript 3.0 and Code Snippets. There is no timeline per se, using the classic timeline view it is only one keyframe, the animation lasts for about 45 seconds.
I want the animation to loop continueously. Even in the HTML output I did click Loop Cont. under Publish settings. That does not work either.
for (i = 0; i < _root.myArray.length; i++) { _root.searchAndDestroy(); }
how do i make the for loop continue only after _root.searchAndDestroy(); has finished it's task?
How to make time delay in a loop..[code]But I want every containers_array[i] to be added one after another. I don't have them scaled to 100%, they remain being 1%, just like little dots on the screen when I write down:[code]
View 2 Repliesi have a main menu that when you roll over the shop button, a sub menu will appear beside it.this sub menu is a movie clip namely;shopSUB.
shopSUB is animated and when i load it on the stage it loops again and again. and so, how will i make it loop only for once?
is there a way to get the animation to start for the first time from frame 1 but then loop from a different frame,,, something like frame 30.
so it starts of like normal but then the loop starts at frame 30 instead of 1.