Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




How To Make Sound Behavior Loop ?



I added a "play sound" behavior to a button. only thing is it only plays once. how can I make that loop over and over.

here is an example:

http://www.zunskigraphics.com/KOR/index.html

also, the song there now is about 5 min. long, just to show the client. I intend to use a small sound loop; 20 or 30 sec. at the most, but need to figure out the "loop" part.

thanks for the help!!!!

- Lance



ActionScript.org Forums > Flash General Questions > Flash 8 General Questions
Posted on: 04-04-2006, 01:09 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

How To Make PlaySound Behavior Loop ?
I added a "play sound" behavior to a button. only thing is it only plays once. how can I make that loop over and over.

here is an example:

http://www.zunskigraphics.com/KOR/index.html

also, the song there now is about 5 min. long, just to show the client. I intend to use a small sound loop; 20 or 30 sec. at the most, but need to figure out the "loop" part.

thanks for the help!!!!

- Lance

Make A Sound Loop
Hi, i'm using Flash 5, i putted this code :

s = new Sound();
s.attachSound("mySound");
s.start();

to play a sound, but how can I modify that code so it plays continuously, or loop 5 or 6 time?

thx

[CS3] AS3 - Make Sound Loop
Hey I'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:
import flash.media.Sound;
import flash.media.SoundChannel;

status.text = "Chimes Off";

playButton.addEventListener(MouseEvent.MOUSE_DOWN, playChimes);

var chimesSound:SoundChannel;

function playChimes(e:MouseEvent):void{
if(status.text == "Chimes Off"){
var chimes:Chimes = new Chimes();
chimesSound = chimes.play();
status.text = "Chimes On";
}else{
chimesSound.stop();
status.text = "Chimes Off";
}
}

Script To Make Sound Loop
Hi

I have a soundclip that I had imported into Flash and am trying to use scripting to make it loop.

Can anybody tell me how?

Thanks

Make Random Sound Loop
i'm using this AS to load external mp3's and play a random one:

code:
mp3urllist1 = new Array("aphex_loop.mp3","boards_loop.mp3", "suv_loop.mp3");
mp3Player = new Sound(this); // create a sound object to hold mp3

// loads streaming mp3
function loadRandomMP3(sndlist){
// random number between 0 and highest array index
randomSoundNum = Math.round(Math.random() * (sndlist.length - 1));
mp3Player.loadSound(sndlist[randomSoundNum],true);
}

loadRandomMP3(mp3urllist1 );



This is all working fine but each of the sounds is a loop but i cant seem to be able to make them loop because the loadSound function seems to have a shed load of arguments already passed to it.

Could someone help me make the sounds loop please.

PLEASE HELP : How To Make A Loaded Mp3 Sound Loop?
hey every1,

I wanted to know who to make a loaded mp3 song or sound loop, the script which I'm using right now is pretty simple...

on (release) {
mySound = new Sound();
mySound.loadSound("music.mp3", true);

}

PLEASE HELP : How To Make A Loaded Mp3 Sound Loop?
hey every1,

I wanted to know who to make a loaded mp3 song or sound loop, the script which I'm using right now is pretty simple...

on (release) {
mySound = new Sound();
mySound.loadSound("music.mp3", true);

}

How Do I Make A Simple Sound Loop Chooser? PLEASE
I really need help with this guys.

I'm creating a couple of different sites for two clients and they both require the option for the user to choose what they want to listen to.

Site #1:
All I need for this site is a VERY simple soundloop chooser. I have 3 loops. I just need to know what actions to put in frames and where. Here's an example of exactly what I need. The sound controls are on the bottom right. http://www.aldoshoes.com

Site #2:

The second site I'm working on is for a band. They want people to be able to choose what song is playing while they on the site. I'm assume the best way to load complete songs instead of loops would be to make them a seperate SWF file and then use the LoadMovie command? Please let me know. Here's an example for this. http://www.shiner.net

If ANYONE can help me with this, I'd be in debt for you for life! lol. I'm hoping the moderators will help with this too. Thanks in advance.

Using Actionscript To Make Sound Loop On Movie Start
the sound plays once then stops for good. I made a button that plays and loops but it wont at the start of the movie.
how do i achieve this? i bet its a simple 2 line script but i cant get it work. im using flash 8

oh and if theres time, id like to know how to keep the sound playing when you start the movie over.

Loop Of Behavior
I have a sound file playing from pressing a button, using the 'Behavior' panel...
How do i get it to loop??

Statement Behavior Different Inside Loop
Hi,

I have a simple class that loads 3 movies into empty movie clip containers. This class works as long as I do the 3 loadClip statements outside of the "For Loop", namely:

mcLoader.loadClip( MOVIE_URL[0], eval(CONTAINER[0]) );
mcLoader.loadClip( MOVIE_URL[1], eval(CONTAINER[1]) );
mcLoader.loadClip( MOVIE_URL[2], eval(CONTAINER[2]) );

But if I include these statements inside the "For Loop", then it fails, no movies are loaded. I'm baffled! Any help/suggestions would be greatly appreciated.

I have attached the three dummy movies to be loaded. The class can be invoked simply by a "temp = new MovieLoader(_root);" statement.

Thanks!

Ben

// ------- CODE BELOW --------
/*
This class loads 3 movies, just displays them, and stops on the first frame.
*/
class MainLoader {

private var rootMovie: MovieClip;
private var movieCounter: Number = 0;
private static var loadedMovieCounter = 0;
private static var NUM_MOVIES: Number = 3;
private static var MOVIE_URL: Array = new Array("movie1.swf", "movie2.swf", "movie3.swf");
private static var CONTAINER: Array = new Array("container1", "container2", "container3");
private var mcLoader: MovieClipLoader;
private var mcLoader_Listener: Object;

function MainLoader(rootMovie: MovieClip) {

this.movieCounter = NUM_MOVIES;
this.rootMovie = rootMovie;

var layerCounter = 50;

mcLoader = new MovieClipLoader();
mcLoader_Listener = new Object();
mcLoader_Listener.ref = this;

mcLoader_Listener.onLoadStart = function(target_mc) {
trace("started loading " + target_mc + ", loadedMovieCounter = " + loadedMovieCounter);
target_mc._visible = false;
loadedMovieCounter++;
};

mcLoader_Listener.onLoadInit = function(target_mc) {
target_mc.gotoAndStop(1);
};
mcLoader_Listener.onLoadComplete = function(target_mc) {
target_mc._visible = true;
trace("In onLoadComplete: " + target_mc+" finished");
trace("loadedMovieCounter = " + loadedMovieCounter + ", movieCounter = " + this.ref.movieCounter);
if (loadedMovieCounter == this.ref.movieCounter ) {
trace("ALL MOVIES LOADED into empty movie clips...");
}
};
mcLoader_Listener.onLoadError = function(target_mc, errorCode) {
trace("ERROR CODE = " + errorCode);
};
/*adding the listener*/
mcLoader.addListener(mcLoader_Listener);
/*create empty movie clips*/
//In the for loop, I intend to do a loadClip on the 3 movie clips. But for some
//mysterious reason, it doesn't work. However, if I simply repeat loadClip the statements 3 times
//as shown below, then it works.
for(var j = 0; j < this.movieCounter; j++) {
this.rootMovie.createEmptyMovieClip( CONTAINER[j], layerCounter++ );
//mcLoader.loadClip( MOVIE_URL[j], eval(CONTAINER[j]) );
}

//This loads 3 movie clips, but I were to include these lines in the loop above, then
//the 3 clips will not be loaded, why????
mcLoader.loadClip( MOVIE_URL[0], eval(CONTAINER[0]) );
mcLoader.loadClip( MOVIE_URL[1], eval(CONTAINER[1]) );
mcLoader.loadClip( MOVIE_URL[2], eval(CONTAINER[2]) );
}
}

Statement Behavior Different Inside Loop
Hi,

I have a simple class that loads 3 movies into empty movie clip containers. This class works as long as I do the 3 loadClip statements outside of the "For Loop", namely:

mcLoader.loadClip( MOVIE_URL[0], eval(CONTAINER[0]) );
mcLoader.loadClip( MOVIE_URL[1], eval(CONTAINER[1]) );
mcLoader.loadClip( MOVIE_URL[2], eval(CONTAINER[2]) );

But if I include these statements inside the "For Loop", then it fails, no movies are loaded. I'm baffled! Any help/suggestions would be greatly appreciated.

I have attached the three dummy movies to be loaded. The class can be invoked simply by a "temp = new MovieLoader(_root);" statement.

Thanks!

Ben

// ------- CODE BELOW --------
/*
This class loads 3 movies, just displays them, and stops on the first frame.
*/
class MainLoader {

private var rootMovie: MovieClip;
private var movieCounter: Number = 0;
private static var loadedMovieCounter = 0;
private static var NUM_MOVIES: Number = 3;
private static var MOVIE_URL: Array = new Array("movie1.swf", "movie2.swf", "movie3.swf");
private static var CONTAINER: Array = new Array("container1", "container2", "container3");
private var mcLoader: MovieClipLoader;
private var mcLoader_Listener: Object;

function MainLoader(rootMovie: MovieClip) {

this.movieCounter = NUM_MOVIES;
this.rootMovie = rootMovie;

var layerCounter = 50;

mcLoader = new MovieClipLoader();
mcLoader_Listener = new Object();
mcLoader_Listener.ref = this;

mcLoader_Listener.onLoadStart = function(target_mc) {
trace("started loading " + target_mc + ", loadedMovieCounter = " + loadedMovieCounter);
target_mc._visible = false;
loadedMovieCounter++;
};

mcLoader_Listener.onLoadInit = function(target_mc) {
target_mc.gotoAndStop(1);
};
mcLoader_Listener.onLoadComplete = function(target_mc) {
target_mc._visible = true;
trace("In onLoadComplete: " + target_mc+" finished");
trace("loadedMovieCounter = " + loadedMovieCounter + ", movieCounter = " + this.ref.movieCounter);
if (loadedMovieCounter == this.ref.movieCounter ) {
trace("ALL MOVIES LOADED into empty movie clips...");
}
};
mcLoader_Listener.onLoadError = function(target_mc, errorCode) {
trace("ERROR CODE = " + errorCode);
};
/*adding the listener*/
mcLoader.addListener(mcLoader_Listener);
/*create empty movie clips*/
//In the for loop, I intend to do a loadClip on the 3 movie clips. But for some
//mysterious reason, it doesn't work. However, if I simply repeat loadClip the statements 3 times
//as shown below, then it works.
for(var j = 0; j < this.movieCounter; j++) {
this.rootMovie.createEmptyMovieClip( CONTAINER[j], layerCounter++ );
//mcLoader.loadClip( MOVIE_URL[j], eval(CONTAINER[j]) );
}

//This loads 3 movie clips, but I were to include these lines in the loop above, then
//the 3 clips will not be loaded, why????
mcLoader.loadClip( MOVIE_URL[0], eval(CONTAINER[0]) );
mcLoader.loadClip( MOVIE_URL[1], eval(CONTAINER[1]) );
mcLoader.loadClip( MOVIE_URL[2], eval(CONTAINER[2]) );
}
}

ComboBox Behavior A.k.a Help To Make This Better
For various reasons, my company needed a non-html based combo box for the main page search. The solution that I created is here www.promopeddler.com (left had side, middle of the page) Although I am pleased with my results, as this is my first Flash "application" there are some quirks that I would like to try to resolve.

The comboBox components don't behave the way standard html ones do. That is what needs to be replicated. Flash seems to be very touchy when it comes to this, the slightest odd mouse movement makes the comboBox close and then some mouse movement leads to the comboBox not closing at all.

Right now, I have a 0% alpha movie clip behind the whole movie, I did this so that the comboBox would close on mouseRollOut. This only gave me part of my desired outcome. The behavior is still odd.

Any suggestions, advice, help is very appreciated.

Thanks,

J.

Sound Behavior
I use the Sound Behavior in FlashMX2004 to stream an MP3-file.
But I need the script to check if the MP3 has stop playing, so it can begin to loop it, without clicking any button. Can U help?
Here is the code I use:

//Load Streaming mp3 behavior
if(_global.Behaviors == null)_global.Behaviors = {};
if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {};
if(typeof this.createEmptyMovieClip == 'undefined'){
this._parent.createEmptyMovieClip('BS_jls',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.jls = new Sound(this._parent.BS_jls);
} else {
this.createEmptyMovieClip('_jls_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.jls = new Sound(this.BS_jls);
}
_global.Behaviors.Sound.jls.loadSound("JLSFancyFai r.mp3",true);

Load Sound From Library Behavior ?
Hi!
Can someone explain me what´s the use for this behavior?

Because I did some test using it on buttons (roll over behavior),
and loads sounds fine testing the movie on local computer,
but when you publish the .swf file to the web server, sounds are gone!
I guess its because he can not find the .fla library...

So, why use it?!

Make One Element Loop Without Making Enitre Movie Loop?
i'm trying to make one element continue looping without making the entire movie loop... here's what i mean..

i have a layer that i've name actions which i've asigned a stop(); to at the end of the animation. but i want the red pulsating dot to continue looping/ animating ... to give you an even better idea, here's the swf file...

http://www.push1.com/roster_art_gal.swf

cheers!

[CS3] Sound Behavior Not Working Within A Nested Loaded Movie
Hi,

Im having trouble with the Load sound and play behaviour in CS3. Basically Ive set up a button to load and play a sound from the library on its first frame e.g.

//Play Internal Sound Behavior
if(_global.Behaviors == null)_global.Behaviors = {};
if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {};
if(typeof this.createEmptyMovieClip == 'undefined'){
this._parent.createEmptyMovieClip('BS_bgsound',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.bgsound = new Sound(this._parent.BS_bgsound);
} else {
this.createEmptyMovieClip('_bgsound_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.bgsound = new Sound(this.BS_bgsound);
}
_global.Behaviors.Sound.bgsound.attachSound("ambie nt");
if (true) {
_global.Behaviors.Sound.bgsound.start(0,1);
}
//End Behavior

Then when it is clicked the sound stops using:

_global.Behaviors.Sound.bgsound.stop("ambient");

This works fine on its own - however the sound button is part of a SWF that is loaded within another SWF (website). When viewed like this the sound does not play.

Has anybody got any ideas please?

I Would Like My Sound Loop To Continously Loop Without Looping Over Itself When I Repeat My Images.
I have a sound loop moving along with my flash images. When the flash images finish and I send it back to frame 1, my sound doubles. How can I play my sound loop once, but allow my images to continously loop.

Is there away to just run one loop of sound, and let the image aspect continue to loop.

I would like my sound loop to continously loop without looping over itself when I repeat my images.

My Sound Loop Is Repeating Itself Ontop Of Previous Loop
Here is a link to a movie that I am working on:


LINK-
http://blue-title.com/v2/


My client says that when you first start the movie, the loop starts fine but when he clicks on one of the three buttons at the bottom (Home, Florida, Alabama) the initial first loop continues to play and a new loop is beginning to repeat while the first one is still playing.

It works fine for me in Firefox and Safari on a Mac.

Any solutions?

Todd Temple

Peculiar Movie Clip Behavior (or Button Behavior?)
Hmm. Weird. My movie clip menu behaves in a peculiar way.

My menu is built like a movie clip, and the buttons inside have regular button behavior. The menu rolls down on roll over and back up on roll out, and the buttons have the regular roll over behavior as well. All this works fine. Now comes the peculiar.

All buttons have the same code, which links to a different frame on the mainstage – except one button that link to an external URL. This button is the only one that works. Okay, so I know as much as there’s a spook lose in link land – I just can’t nail him. When I click the buttons, the menu just jumps up – not rolls up as it should, but jumps like it’s been reset. It doesn’t reset the entire scene, though, because another movie in the same frame keeps on playing.
Please help….!

Following code handles the movie clip from the mainstage:

onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe<this._totalframes) {
nextFrame();
}
} else {
if (this._currentframe>1) {
prevFrame();
}
}
}

Following code is placed in the first frame of the only button that works:

this.btn_butik.onRelease = function() {
getURL("myurl", "_blank");
};

And following is placed in the first frame of the other buttons:

this.btn_inspiration.onRelease = function () {
gotoAndPlay("scene_main", "page_inspiration");
}

I haven’t used the onClipEvent before this, so I might be missing something there.

Hope you can help

Wierd Behavior With SortOn (not That Numeric Sort Behavior)
NOTE: I have read a bunch of posts about sorting on numbers with the sortOn function and having 10 come before 2 but this isnt one of those posts.

I have an array of Objects that I created from an xml document.. I'm trying to output all the names in alphabetical order but i'm getting some wierd behavior.. it works for the most part until the end.. it then gives me a few "out of order" names.

when i switch around the order of the xml file it gives me different results after the sort...

Any help would be greatly appreciated!!!


(ive attached a folder with the .fla, .xml and .as files)
------------------------
the .fla code is:
------------------------
myXML = new XML();
myXML.ignoreWhite = true;
var myClassInstance = new MyClass();
myXML.onLoad = function(success) {
myClassInstance.populateArray(myXML);
};
myXML.load("people.xml");

------------------------
the .as code is:
-------------------------
class MyClass {
var peopleArray:Array = new Array();
public function MyClass() {
}
private function populateArray(_xmlData):Void {
var i:Number;
for (i=0; i<_xmlData.firstChild.childNodes.length; i++) {
peopleArray[i] = new Object();
peopleArray[i].id = parseInt(_xmlData.firstChild.childNodes[i].attributes.id);
peopleArray[i].personName = _xmlData.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue;
}
sortAndOutput();
}
public function sortAndOutput() {
var sortedPeopleArray:Array = peopleArray;
sortedPeopleArray.sortOn("personName", Array.DESCENDING);
var i:Number;
for (i in sortedPeopleArray) {
trace(sortedPeopleArray[i].personName);
}
}
}

-------------------------
.xml (excperpt from the file)
------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<people>
<person id="3">
<person_name>Donna</person_name>
</person>
<person id="4">
<person_name>Lisa</person_name>
</person>
<person id="5">
<person_name>John</person_name>
</person>
<person id="6">
<person_name>Lara</person_name>
</person>
..... more rows....
</people>

Loop Sound ( Sound Class Preloader By Moock)
how can i loop the sound if i use the sound class preloader by collin moock?? here its the code :


ActionScript Code:
Sound.prototype.checkLoadProgress = function() {
    var kbLoaded = Math.floor(this.getBytesLoaded()/1024);
    var kbTotal = Math.floor(this.getBytesTotal()/1024);
    var percentDone = isNaN(Math.floor(kbLoaded/kbTotal*100)) ? 0 : Math.floor(kbLoaded/kbTotal*100);
    this.onBytesLoaded(this.getBytesLoaded(), this.getBytesTotal(), kbLoaded, kbTotal, percentDone);
};
Sound.prototype.clearLoadCheck = function() {
    if (this.loaderID) {
        clearInterval(this.loaderID);
    }
};
Sound.prototype.preloadSound = function(url, isStreaming) {
    this.clearLoadCheck();
    this.loaderID = setInterval(this, "checkLoadProgress", 200);
    this.loadSound(url, isStreaming);
};
music = new Sound();
music.onLoad = function(success) {
    this.clearLoadCheck();
    if (success) {
        loadMsg_txt.text = "Done loading.";
    } else {
        loadMsg_txt.text = "Load failed.";
    }
};
music.onBytesLoaded = function(bytesLoaded, bytesTotal, kbLoaded, kbTotal, percentLoaded) {
    loadMsg_txt.text = "Loading: "+kbLoaded+" of "+kbTotal+"
"+percentLoaded+" percent complete.";
};
music.preloadSound("song.mp3", true);



thanks in advance

Mp3 Sound Loop Bad. Wav Loop Good.
I have a soundloop which is a WAV file
and it works just fine when i loop it in flash

But when i convert it to an MP3 file...for osme weird reason theres a little less than 1 second pause when it starts again...you can tell its a loop...not smooth

But in WAV format its fine.
Its weird..ive used two different softwares to convert my wav file.
ive used Creative Wave Studio, Ive used a dedicated third party MP3-WAV convertor.

same results...the mp3 has bad looping.

any ideas?

How Can I Make A Startdrag And Stopdrag Actioned Mc Make A Sound?
HI there,

I need help on this one. I have used the start and stop drag AC for pulling a sword in and out of its sheath(holster). Thats all it has to do. One problem is that no matter how hard i try i can get the sounds to match up with it. I wanted for the sounds to play everytime the user puts the sword in and everytime the user takes the sword out. how can I do this?
Thanks alot

~Joe

Synchronizing My Sound With My Sound Loop..how?
Hey everyone,

I have created a flash movie with 2 scenes and i have added my sound loop to it in the first scene. the sound loop is long enough to cover both my scenes, but when i play it is never synchronized with the sound.  when i export the movie and listen to it i try to see where it ends and expand or reduce my animation to fit it but it never really works.

what's worst is when i take it to another computer and try it, it is all off even worse!  is there a way to synchronize my animation and sound?  i'm sure it will be easier if i had one scene cuz i could see (better) where the sound loop ends but can i do it with two scenes.

also i have made my movie using flash mx but is there i can make it compatible with a flash 4 plugin?

thanks in advance.
-Shu

[CS3] Make A Sound Play... (it's Different From My Other Sound Question :) )
How would you make a sound play when you press a button?
Thanks

How Do I Make A Loop?
Hey guys, I'm really new to Flash I just purchased it the other day. I need some help on our to create a loop. I have put in a blue background and then drawn a large aeroplane infront of that, and i need to get the illusion that it keeps on flying along, therefore i need to loop it so it plays the same frames over and over, until i decide to make some action.

Thanks alot.

Can Someone Make This A For Loop?
code:
URL000 = "<u>" + desArray[0] + "</u>";
URL001 = "<u>" + desArray[1] + "</u>";
URL002 = "<u>" + desArray[2] + "</u>";
URL003 = "<u>" + desArray[3] + "</u>";
URL004 = "<u>" + desArray[4] + "</u>";
URL005 = "<u>" + desArray[5] + "</u>";
URL006 = "<u>" + desArray[6] + "</u>";
URL007 = "<u>" + desArray[7] + "</u>";
URL008 = "<u>" + desArray[8] + "</u>";
URL009 = "<u>" + desArray[9] + "</u>";
URL010 = "<u>" + desArray[10] + "</u>";
URL011 = "<u>" + desArray[11] + "</u>";


the list could get longer.

Make An Flv Loop
hey, i just started playing flv's, and since i have to get something up tonight, i thought i'd just use the mediaDisplay component to play it. When i get some time I'll play around with how to control it with AS.

anyhow, i have it playing fine, however, i can't figure out how to get the video to loop. anyone know how to do this? i can't find an option in the component. my swf is 1 frame, and there isn't a stop, and i set my swf to loop.

thanks in advance.
ty

Please Help Me Make This Flv Loop.
how can i loop this video?










Attach Code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function MM_CheckFlashVersion(reqVerStr,msg){
with(navigator){
var isIE = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
if (!isIE || !isWin){
var flashVer = -1;
if (plugins && plugins.length > 0){
var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
if (desc == "") flashVer = -1;
else{
var descArr = desc.split(" ");
var tempArrMajor = descArr[2].split(".");
var verMajor = tempArrMajor[0];
var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
flashVer = parseFloat(verMajor + "." + verMinor);
}
}
// WebTV has Flash Player 4 or lower -- too low for video
else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

var verArr = reqVerStr.split(",");
var reqVer = parseFloat(verArr[0] + "." + verArr[2]);

if (flashVer < reqVer){
if (confirm(msg))
window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
}
}
}
}
</script>
<script src="AC_RunActiveContent.js" type="text/javascript"></script>
<style type="text/css">
<!--
body {
background-image: url(bkg10.jpg);
}
.style5 {font-size: 10px}
.unnamed1 {
background-color: #FFFF33;
}
.unnamed2 {
background-color: #FFFFFF;
}
.style10 {
background-color: #FFFFFF;
font-family: "Times New Roman", Times, serif;
font-size: 24px;
font-style: italic;
}
.style19 {background-color: #FFFFFF; font-size: 10px; }
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: underline;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
-->
</style>
<script src="AC_ActiveX.js" type="text/javascript"></script>
</head>

<body onload="MM_CheckFlashVersion('7,0,0,0','Content on this page requires a newer version of Adobe Flash Player. Do you want to download it now?');">
<p>&nbsp;</p>
<p align="center">
<script type="text/javascript">
AC_AX_RunContent( 'classid','clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B','width','682','height','460','codebase','http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0','controller','FALSE','src','primslideshow.mov.flv','type','video/quicktime','bgcolor','#FFFFFF','border','0','pluginspage','http://www.apple.com/quicktime/download/indext.html','autoplay','true' ); //end AC code
</script><noscript><object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="682" height="471" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0">
<param name="controller" value="FALSE">
<param name="type" value="video/quicktime">
<param name="autoplay" value="true">
<param name="src" value="primslideshow.mov.flv">
<param name="pluginspage" value="http://www.apple.com/quicktime/download/indext.html">
<embed width="682" height="471" controller="FALSE" src="primslideshow.mov" type="video/quicktime" bgcolor="#FFFFFF" border="0" pluginspage="http://www.apple.com/quicktime/download/indext.html"></embed> </object></noscript>
<br />

























Edited: 01/17/2009 at 04:08:14 AM by kristin1224

Make FLV Loop
Is there a way to make an flv file loop?

How Do I Make This Loop?
So I used the following tutorial to load an external image:

http://www.kirupa.com/developer/mx20...slideshow2.htm

but I only have two images I want to load and I want to loop back to the first image when you press the next button.

How would I do that?

Thanks in advance

How Do I Make Frames 11-x Loop?
ok at the end of my movie i want it to keep on blinking my name not starting all over. How do i do that? its on frames 11- something(x)

Is It Possible To Make PrevFrame(); Loop?
I have a bitmap sequence in a movie clip. This mc has the following code:

onClipEvent (enterFrame) {
if (_root.direction==-1) {
prevFrame ();
}
if (_root.direction==0) {
stop ();
}
if (_root.direction==1) {
nextFrame ();
}
}


On the main timeline I have this mc with 3 buttons that calls the above code: prevFrame, stop or nextFrame.
eg.

on (rollOver) {
_root.direction = -1;
}

I have also set my variable on my main timeline: direction=1


In my mc I have added a gotoAndPlay(1) on my last frame so that the mc can repeat. This works fine. My problem is when I rollover the button that reverses (prevframe) the mc. It prevframes fine until it gets to frame 1 and stops. I want it to continue prevframing but I can't get it to work.

Any ideas?

How Can I Make A Delay Within A Loop
im facing a problem.. and i hope some1 has faced it but solved it..

what i want to do is :
1- create a box. - thats the easy part!-
2- i want that box to change its alpha from "lets say" from 10 to 50.
but i want to be able to watch the alpha while it is beeing
changed - as in motiontween -.

what i did is that i created the box.. and using a loop that changes "x" which is the alpha degree of the box.. but i only see the final result..
so i thought i'll make a delayer that takes 1 sec. every time it executes the loop.. but the player halts till that time is over.. and i see the final result again..

CAN ANY! HELP ME...........PLEASE

Make Code Loop
Is there a way to make actionscript code repeat itself in Flash 5?

Basically, I have a movieclip that I want to run some code, and then loop round and run it again, indefinatly. What is the trick?

----

Back in the old days of Basic you could do something like this:

10 print "hi"
20 goto 10

Is there a similar process to 'goto' in Flash 5 actionscript?

Im Trying Make A HitTest With A For Loop
Im trying make a hitTest with a for loop with a list of three walls But my charater is not moving. I have put a break in there and it is not breaking out. How do I make this work thanks. Here the code. I also attached the file.

onClipEvent (enterFrame) {

var xd = 0; // direction of movement
var yd = 0;
if (Key.isDown(37)) {
xd = -10;
}
if (Key.isDown(38)) {
yd = -10;
}
if (Key.isDown(39)) {
xd = 10;
}
if (Key.isDown(40)) {
yd = 10;
}
// check if there is a collision with the target coords
list = ["walls", "walls1", "walls2"];
for(i=0; i<list.length;i++) {
if (this._root[list[i]].hitTest(_x+xd,_y+yd))
{
// if not, make the adjustment
_x += xd;
_y += yd;

}
with (this._root[list[i]]) {
if (_currentFrame == _totalframes) {
} else {
nextFrame();
}
}
break;
}



}

How 2 Make A Random Loop?
Hi group

I want flash to pick randomly any of the following numbers:2,3,4,5

Now if say flash picks the number 1 (which I dont want), how do I make it repeat the process until it picks a number from the said list.

Heres where I'm at so far

frame = int(Math.random()*5)+1;
if (frame==1){
// now what?
}


Any help would be greatly appreciated
Cheers
Vic

Just some background
What I want is for flash to pick a random number from that list, lets say 3 and then it will jump to frame labelled 3 in that movieclips timeline.

How Can I Make This Loop Seemless?
ive gone through loads of tutorials, but just cant seem to get this loop to be smooth

added my fla for someone to look at thanks

After You AttachSound, How Do You Make It Loop?
OK, I know how to use attachSound to load a sound clip and then use start to get it to play. But how do I tell Flash to loop the clip continuously?

-= Dave= -

How To Make Music Loop?
how do u make a sound loop LOOP in flash?

How Do I Make A Movie Loop Once.....
so im trying to get a loop to play the first frame
until i is greater than 2.

so on the first frame Im increasing the value by 1

i++;


then on the last frame Im putting a if then statement
that if i is less than 2 replay, else goto and stop at
the next frame

var i = 1

if (i < 2 ){
gotoAndPlay(1);
}else{
gotoAndStop(361);
}

now I kinda know whats happening when the second code excecutes its resetting
var to 1, so my question is, how do I say once this movie has played once, stop the second time?

Can You Make Variables In A Loop?
I'm still kinda new to Actionscript but I'm trying to do something like this:

for (i=0; x=i; i++) {
// make a variable
var name + i = array[i];
}

Could that be done?

Thanks!

[AS] For Loop To Make This Picture
Hi, I'm trying to use for loop to make this menu system to show my photos....just wondering if it's possible to make it, here's my code, it only can duplicate and make it horizantally seperated, but can I use for loop and tell these clips to look like this?(the yellow boxes are the menus which I want them to arrange like by for loop)..




here's my code

ActionScript Code:
for(i = 1; i <= 3; i++){
        duplicateMovieClip(box, "box" + i, i);
        boxes = "box" + i;
        _root[boxes]._x += 60*i;
}


it only makes 3 of them horizantally sit next to each other, but what I wanted to do is to make it look like the graphic above, thanks a lot for your time and help..

How Do I Make An Actionscript Loop?
In the old days of programming the ZX spectrum it was soooo easy...


Code:

10 for a=0
20 input a$;
30 if a$="Kryo" goto 70
40 a=a+1
50 print "Access Denied"
60 if a=3 print "Login failed!!!"; else goto 20
65 end
70 print "WooHoo!!!"
80 end



Ahhh the memories...

Anyway, I have an object on the stage which i want to move to a certain location, when it reaches the location it needs to go back to its original coordinates and repeat the movement. S'all good until it attempt to put it on an onRollOver button.

I thought...

Code:

//First frame actions...
function move() {
if (_root.obj1._x<100) {
_root.obj1._x += 5;
}
if (_root.obj1._x>=100) {
_root.obj1._x = 0;

}
}




Code:

// Button actions...
on (rollOver){
move();
}



How do i go about infinately repeating the move() function?

Make A Movie Loop 5 Times
i need to make a movie loop 5 times then refresh

Editing Mp3's So I Can Make Them Short And Loop Them
anyone out there know how to edit mp3's so I can decrease the file size and just loop the audio

How To Make A Time-loop Skrip (or Something Else)?
Hi i made two eye's in a flash movie. both eyes cloes and oben in a animation (30 frames in the timeline). if someone moved with the mouse into my movie som other stuff happend, but if no one movies in the movie nothing happend. and so i want to make the animation in a loop. but first after 30 seconds or so.

is there someone who knows a toturial how to write a skript with loops a part in the timeline after a defined period?

Make A Swf Loop Blank If Not On My Site ?
Can I make a loop that will prevent a movie from playing off of the intended site ?

Copyright © 2005-08 www.BigResource.com, All rights reserved