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




Looping Sounds/Images..



Ok so, I want my images to loop back so I did this actionscript..

gotoAndPlay(1);

The image loops back but I want the sound that is in another layer in the same scene to not loop.. How do I do this?



FlashKit > Flash Help > Flash MX
Posted on: 10-25-2004, 08:20 PM


View Complete Forum Thread with Replies

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

Looping Several Sounds... A Gap Between The Sounds
Hi,

I planned to use several loops in a presentation, and queue them so it will sound like a longer piece of music.

I planned to use onSoundComplete with the following basic behavior :


ActionScript Code:
snd1 = new Sound(this);
snd1.attachSound("loop1");
snd2 = new Sound(this);
snd2.attachSound("loop2");

snd1.onSoundComplete = function() {
    snd2.start();
}

snd1.start();

The same principle has been suggested several times on this forum, like here :
http://www.actionscript.org/forums/s...d.php3?t=32921

But it doesn't work fine for me : there's a gap between the two sounds when I do so, a brief silence that cuts the music flow.

So I am considering using the setInterval function instead, something like this :


ActionScript Code:
att = setInterval(function() {
    clearInterval(att);
    snd2.start();
}, snd1.duration-150);

which works, but I'm not found of it. Plus notice that I have to set the callback 150 milliseconds shorter than the snd1 duration in order to loop fine, otherwise it doesn't loop well.

So you're gonna tell me : there is something wrong with my loop files. Nope, if I make them one file, pasting the second sound at the end of the first, it works fine.

Please, does anyone has a solution ?

Thanks,
_marabout_

Looping Sounds
hey, i wanna play a sound that loops forever. is that possible? for example, instead of a number such as 7 times looping, it plays forever. respond please. much thanks =)

Looping Sounds
I am having trouble looping the sound in my intro. There is a delay between loops that I would like to eliminate! Any suggestions are greatly appreciated.

Looping Sounds
Can someone tell me the trick to getting a nice loop with music in Flash?
It seems that I can never get the music to loop seemlessly like I hear it on other sites.
I am giving it enough frames to last a life time (exaggeration)but it always sound like a stuck record.

Thanks,

Jordan

Looping Sounds
hi, ive got a button that plays a sound when the user rolls over it, using the loadsound method. How can i get it to loop all the time that the mouse is over the button?

thanks a lot!

Looping Sounds
how do u make a small music keep on looping until the end of the movie...???

and also, is it possible to keep the music playing for sometime, even after the movie has stopped ??

thanx in advance

Looping Sounds
My eyes are bleeding from looking at the monitor so long!!! I am using this sciupt to play sounds that are pre loaded on demand:

// Button 1
on(release) {
_root.nextSound=1;
_root.playMe=1;
_root.mySound1.loadSound("loop1.mp3",false);

}

it works great but it doesnt loop? does any one know how to do this?????

please help me before I hurt my self and possibly my family

Looping Sounds
hey there,

i'm trying to create a website sound track by using one simple loop that plays itself immediately after it's finished in order to sound seamless like it's was just one big sample.

my problem is when i use a sound attached to the time line using gotoAndPlay(1); there is always a little hiccup before the sound starts again making it sound bad

i'm reading to use this code instead


Code:
mySound = new Sound(this);
mySound.attachSound("loop1");
mySound.start();
mySound.onSoundComplete = function(){
mySound.attachSound("loop1");
mySound.start();
};
but it still has a hiccup EXACTLY like using the timeline does.

UGH!

any ideas?

thanks,

-mikey

Looping Sounds
hi im really having a tough time looping a sustained tone that was converted to aiff
upon looping it in flash i get skips and pops
and the sound editing interface i think is to primitive to fix this job
if anyone has any suggestions i would be much appreciative
i have a feeling the problem lies in frame rate recording speed and importing it into flash

although i could be wrong

spx

Looping Sounds Trouble
Hello Everybody !.

When I loop the sound by means of a "go to" in the final frame, playing the scene you can heard a little intermediate void, regardless the sound sticks or not.
How can I fix this subject ?.

Greetings from Argentina !.

Looping Dynamic Sounds
hiya,

right i've made a juke box for my site where sounds loops are loaded directly into the player using the loadSound command....

the problem is that they don't loop and only play once therefore leaving the viewer with 10 seconds of sound, then silence unless they move to the next tracj where after that is finished the same problem occurs

at the moment i'm trying to use onSoundComplete to play the soundFuction but that's not working....what is the way that will work????

hopesome one can help me, this is the code that i think needs adding to >
function playSong() {
if (playing == false) {
s.stop();
s = new Sound();
s.loadSound(songList[i], true);
playing = true;
songNumber = (i + 1);
songTitle = songDetails[i];
}
but i have also attached all my code if i am wrong!!!

thank you very much for anyone who can help!!

ross

Looping Sounds And Synchronization
How can I integrate 3 different sound bits using flash mx??

Basically, I have an intro to my movie with a 4 second mp3 clip. I want it to flow into a 2nd clip which is a loop. Finally when "enter" button is clicked i want a fading out clip to play.

I can't get the mp3 files to match up and create an uninterupted sound.

Please Help!!!

[F8] Looping And Stopping Sounds
In my game I want to use looping sounds for machine gun fire. Both the main player and the AI might be firing, so all the sounds need to be controlled separately - I need to be able to stop one without stopping the rest. I understand that the way to do this is to make each sound on a different MovieClip (so if I want to control sound1 and sound2 separately, I do sound1=new Sound(mc), sound2=new Sound(different_mc). But while this works fine for movie clips that I drag and drop onto the stage, it doesn't seem to work with MCs I create using attachMovie or createEmptyMovieClip. Why does this happen, and is there an elegant way around it?

Thanks very much,
Max

Looping Sounds Over Scenes...
Dear all, been encountering some problems here.. im new at flash(MX) and am trying to loop an ext BGM in my main file over multiple scenes...

1) I tried using this but it doesnt seem to work intially
this.onEnterFrame=function(){
moviecontainer.loadMovie("BGM.swf");
}

2) then i edited it to...
moviecontainer.loadMovie("BGM.swf")

and it worked... BUT

3)when i click on a button to go to the next scene... the music stops

Would appreciate any help on this.. thx

Looping Uploaded Sounds
Hi,

I have uploaded a sound using this code.

Code:
sound1 = new Sound();
sound1.loadSound("yak.mp3", true);
How do i loop it

Attaching Sounds By Looping
I've got ten .mp3 files in my library(all with linkage) named "cbleep_"+(0 to 9). I'd like to create ten Sound objects and attach the .mp3s to them. I've done it - laboriously - one by one, but it seems to me it should be able to be done with a simple loop. Been wrestling with all afternoon, with no luck. Below is where I'm at. Any guidance would be enormously appreciated. Thanks!








Attach Code

//array of mp3 file names in library
var bleeps:Array = new Array();
var audio:Array = new Array();
//for 10 sounds
for(var i:Number=0;i<10;i++){
//push the names of the mp3 clips
bleeps.push("""+"cbleep_"+i+""");
//create 10 entries in the audio array
audio.push(i);
//make each audio entry a new Sound object
audio[i] = new Sound();
//attach the sounds from the library
audio[i].attachSound(bleeps[i]);

}


btn.onPress = function(){
audio[5].start();
//nothing happens
}

Looping Sounds Seamlessly..
Hey. I'm stuck and I have a deadline for this project soon.

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?


Quote:




this is my code:

loadMusic = function() {
loop = new Sound();
loop.loadSound("lomtrack.mp3", false);
}
loadMusic();

playMusic = function() {
loop.start(0, 100);
}

playmusic();

Looping Sounds With A Delay
Hello all.. I want to loop sounds but also create a delay within the loop. I am using this script below but it does not delay. Could someone fimilar with this help me out.
thanks!

on (release) {
mysound = new Sound(this);
mysound.attachSound("ocean");
mysound.start(0, 99);
}

Looping Sounds In Flash....
OK this is really dumb but....how do you loop a sound in Flash MX???? Where's the option???? I only know to do it in 5....thanks in advance.

Looping Sounds Infinitely
Yeah.... how do I go about doing this? I have some sound loops for a movie I'm making and instead of putting the sound on the timeline and changing it to "loop 100 times" isn't there a way I can just make it loop forever until I put in a "stop all sounds" action?

Looping Sounds Seamlessly..
Hey. I'm stuck and I have a deadline for this project soon.

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?


Quote:




this is my code:

loadMusic = function() {
loop = new Sound();
loop.loadSound("lomtrack.mp3", false);
}
loadMusic();

playMusic = function() {
loop.start(0, 100);
}

playmusic();

Unloading Sounds From Looping Clips
Hello,
I have a flash banner that loops, it has sounds that are loaded on level 1, I have a button that unloads the movie, but it starts up again when the first movie starts its loop again, how can I make it unload for ever ?

Can't Stop Sounds Or Music - It Keeps Looping
I couldn't find the answer to my question in the thousands of threads here, so here goes...I created a flash movie and the scenes have sounds within them. At the end of the scene, I have it set to play a music file (MP3) - all of it works well, until the sounds within the scence loop and start over again. How can I stop this from happening? The stop command didn't work (unless I didn't do it correctly)

Thanks

Loading Streaming Sounds And Looping
Does any know how to dynamically load an mp3 as a streaming sound (not event sound) and have it loop?

I know I can loop an event sound with

mySound.start(0,999);

but this does not work with streaming.

Please help...

Looping Sounds With Flash MX 2004 Pro..
How do you loop sounds/Music with Flash MX 2004 pro?
I checked in the tutorials, but they're all based on Flash MX not on Flash MX 2004 pro. so the instructions dont make sense.

can someone with Flash MX pro help me?

thanks!

Ma chao

Looping Attached Sounds In Flash 5
Is there anyway to loop an attached sound in Flash 5? I want the sound to be attached so I can programatically control them. I notice that alot of the sound objects methods are specific to mx and up. Is there something obvious that I am missing or is the fucntionality simply not there?

scott

Looping Sounds Multiple Times (time Dependant)
Ok say for example I have a sound of a bell chime. I want to play this sound independent of the mainstage and have it key off local system time. So naturally I want to have my sound loop twice at 2am/pm and eleven times at 11am/pm etc.

Can this be done? Oh I hope so because that would be mega sweet.

Looping Sounds Multiple Times (time Dependant)
Ok say for example I have a sound of a bell chime. I want to play this sound independent of the mainstage and have it key off local system time. So naturally I want to have my sound loop twice at 2am/pm and eleven times at 11am/pm etc.

Can this be done? Oh I hope so because that would be mega sweet.

Help 4 Background Images N Sounds
Can any1 help with this?
I want to make a Flash Website, but I am having a problem.
I want that the user(visitor), can change the background image, from the options given. And also choose 1 of the 2 or 3 music that will keep playin in the background.

And is it possible for that a background animation can have a limited(say 5 sec) animation, that keeps loopin?

john

CS4 Looping Images
Hi,

I've not touched flash in any way since 2001 when I was introduced to it at Uni.

I've created a standard banner which has some images which I have tweened to travel R to L across the banner.

There are 7 images which are spaced 25 frames apart.

What I want to do is, when the last image has started to move across the banner I want the 1st image to start again immediatley after the 7th.

The result should be like what is on this page: http://www.shopwindow.com/ in the Featured merchants banner.

My .FLA file can be downloaded here: http://www.quog.co.uk/banner.fla

If someone could help me with it i'd be eternally grateful as its drive me round the bend.

Xml Images Looping?
hai to all
i am in a problem that is, i did a backgorund image changer for 10 secs for my project. the code below works fine. all well but what i need is after compeleting all the images in the xml file it stops.

i want it to loop or repeat the process again can any say how plzzz

this is my code:-
xmlData = new XML ();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load ("images.xml");
function loadXML (loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image = xmlNode.childNodes.childNodes[0].firstChild.nodeValue;
//trace (image);
}
firstImage ();
}
else {
trace ("file not loaded!");
}
}
p = 0;
filesize = picture.getBytesTotal ();
loaded = picture.getBytesLoaded ();
function firstImage () {
if (loaded == filesize) {
picture.loadMovie (image[0], 1);
picture._alpha = 100;
alpha (picture);
effect (picture);
timer ();
}
}
function nextImage () {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture.loadMovie (image[p], 1);
picture._alpha = 100;
alpha (picture);
//removeMovieClip("effect1");
effect (picture);
timer ();
}
}
}
/*function prevImage () {
if (p>(total-1)) {
p--;
picture.loadMovie (image[p], 1);
picture._alpha = 100;
timer ();
}
}*/
function timer () {
var secs = 10;
var id = setInterval (function () {
clearInterval (id);
nextImage ();
}, secs*1000);
}
var alpha_interval = setInterval (alpha, 100, picture);
function alpha (picture) {
picture._alpha += 10;
if (picture._alpha<100) {
trace ("alpha");
clearInterval (alpha_interval);
}
}
function effect (picture) {
this.attachMovie ("effect", "effect1", 10);
}

Looping Images
Im using an image rotator tutorial i found on google with a black background. 4 images in it, but when the last pic fades out, it shows black background before it starts over again (as you can see here) http://www.deltas-sanctuary.com/images.html How can i get first image to fade in as last pic is fading out. my flash knowledge is next to non-existent. Here is the fla so you can see how i have it set up http://www.deltas-sanctuary.com/images.fla

Dynamic Looping Images
I am trying to create a loop that will display up to 20 images one after another. This is working well until it is posted.

The problem is that the images blink. If I change the FPS the jest blink faster. I think this has a lot to do with the fact the images have to be loaded.

I have created this in javascript & Colefusion and it work like a movie.

Can anyone help as to what can be done to fix this problem?

See script below:

Code:
Layer 1 Frame 1 :
if(ImageType ==null){ImageType='ir'}
loadVariables ("http://headoffice-dell/Weather/Flash/FlashAni.cfm?ImageType="+ImageType, "", "POST");
chk="";
c=0
Layer 1 Frame 3 :
c=c+1
Layer 1 Frame 5 :
if(c>10){stop()}

chk=Images
if(chk==null)
{
gotoAndPlay (_currentframe-2);
}
else{
gotoAndPlay ("scene 2");
}
Scene 2
Layer 1 Frame 1:
ImagesSp=Images.split(":")
var i=0;

Layer 1 Frame 5:
WeatherImages=loadMovieNum("http://Headoffice-dell/Weather/Images2/"+ImagesSp[i],2)

if(Images == null){gotoAndPlay ("scene 1");}

Layer 1 Frame 8:

i=i+1
if(i>RedCounts-1){i=0}
gotoAndPlay ("Scene 2",5);

Continuous Looping Images
Hello

I am trying to continuously loop 20 different logos - horizontally. I found some help online and it sort of works but then the logos get all clumped together the second loop around. I know only basic ActionScript but I can usually look at something and figure it out. Unfortunately, I am not sure how to resolve this issue - it seems like I am missing something simple. I only have 7 images in there for now but will have 20 in the end.

Is anyone willing to have a look at my FLA file? Please? I have looked at several boards and everything I see is different from the last one.

Many thanks!

Looping Fading Images
This probably wasnt the best way to do this lol, kind of ugly way actually but yea, trying to get it to loop.

theres 6 images, 3 spaces they fade into, the first 3 images fade in one after another, then the next 3 fade in over them, in the same spots. I want this to loop so it will keep fading in the 2 sets of images. Any help would be appreciated.


Code:
easeType = mx.transitions.easing.None.easeOut;
myTween = new mx.transitions.Tween(beach_mc, "_alpha",easeType, 0, 100, 10);

myTween.onMotionFinished = function() {
easeType = mx.transitions.easing.None.easeOut;
myTween = new mx.transitions.Tween(girlanddog_mc, "_alpha",easeType, 0, 100, 10);

myTween.onMotionFinished = function() {
easeType = mx.transitions.easing.None.easeOut;
myTween = new mx.transitions.Tween(scuba_mc, "_alpha",easeType, 0, 100, 10);

myTween.onMotionFinished = function() {
easeType = mx.transitions.easing.None.easeOut;
myTween = new mx.transitions.Tween(hamoc_mc, "_alpha",easeType, 0, 100, 10);

myTween.onMotionFinished = function() {
easeType = mx.transitions.easing.None.easeOut;
myTween = new mx.transitions.Tween(ruins_mc, "_alpha",easeType, 0, 100, 10);

myTween.onMotionFinished = function() {
easeType = mx.transitions.easing.None.easeOut;
myTween = new mx.transitions.Tween(waterfall_mc, "_alpha",easeType, 0, 100, 10);

}
}
}
}
}

Help Looping/fading Images
Hey all, I did a search for what i am trying to do but couldnt find it really, some things similar but still not gettin it.

I have a banner that has 3 images on the stage that fade in using the tween class. I then want them to loop through about 2-3 images each.

they fade in one at a time until all three are loaded, then i want it to wait about 10 seconds and fade in another image for each one, one at a time, and loop through those 2 sets of images like that. If anyone could give me a hand that would be great.

thanks in advance

Issue Looping Images From XML
First, I am new to AS and appologize for my coding.
I have a slideshow that plays, while pulling images from XML. The problem I am having is that I can't seem to get it to loop. It loads up and runs through all the images, but after the last one, I get a list of errors. Starting with RangeError #2066. Please help point me in the right direction.


Code:
var fadeTween:Tween;
var images:Array = new Array();
var time:Array = new Array();
var currentimage = 0;
var i:Number = 0;
var maximage = 0;
var loader:URLLoader = new URLLoader(new URLRequest("http://www..photogallery_fish2.aspx"));
function loadXML ()
{
loader.addEventListener (Event.COMPLETE, onLoadSuccess);
loader.addEventListener (IOErrorEvent.IO_ERROR, onLoadFailure);
}
var myTimer:Timer = new Timer(1000);// 1 second
myTimer.addEventListener (TimerEvent.TIMER, loop);
function loop (event:TimerEvent):void
{
currentimage++;
loadimage ();
}
currentimage = 0;
function onLoadSuccess (event:Event):void
{
var loader:URLLoader = URLLoader(event.target);
var myXML:XML = XML(loader.data);
myXML.ignoreWhitespace;
maximage = myXML..image.length();
var number:int = 0;
for each (var property:XML in myXML..image)
{
images[number] = myXML..image[number].@source;
time[number] = myXML..image[number].@time;
number++;
}
loadimage ();
}
function onLoadFailure (event:Event):void
{
trace ("Error loading file: " + event.type);
}
function loadimage ():void
{
picload.source = images[currentimage];
picload.refreshPane ();

var newdelay = time[currentimage]*100;
myTimer.delay = newdelay;
myTimer.reset ();
myTimer.start ();

}
loadXML ();

Continuous Looping Images
Hello -

I am trying to continuously loop 20 different logos - horizontally. I found some help online and it sort of works but then the logos get all clumped together the second loop around. I know only basic ActionScript but I can usually look at something and figure it out. Unfortunately, I am not sure how to resolve this issue - it seems like I am missing something simple. I only have 7 images in there for now but will have 20 in the end.

Is anyone willing to have a look at my FLA file? Please? I have looked at several boards and everything I see is different from the last one.

Many thanks!

Dynamic Looping Images
I want to dynamically load some images, and have them scroll across the screen in a loop. The solution I've come up with is to create a MC, load and display the images in that, and then tween the MC across the stage. Here's how I'm loading the images:


Code:
for(n = 0; n < 14; n++){
_this.createEmptyMovieClip("image"+n, 200+n);
_this[ "image"+n] ._x = n*700;
_this[ "image"+n] ._y = 0;
loadMovie("home/0"+(n+1)+".jpg", ["image"+n]);
}
I'm not sure if it's not loading the images at all or just not displaying them. I'm certain I've got my syntax wrong somehow, but I'm not sure where. Any help would be appreciated.

Thanks,
-b

Dynamic Looping Images
I want to dynamically load some images, and have them scroll across the screen in a loop. The solution I've come up with is to create a MC, load and display the images in that, and then tween the MC across the stage. Here's how I'm loading the images:


Code:
for(n = 0; n < 14; n++){
_this.createEmptyMovieClip("image"+n, 200+n);
_this[ "image"+n] ._x = n*700;
_this[ "image"+n] ._y = 0;
loadMovie("home/0"+(n+1)+".jpg", ["image"+n]);
}
I'm not sure if it's not loading the images at all or just not displaying them. I'm certain I've got my syntax wrong somehow, but I'm not sure where. Any help would be appreciated.

Thanks,
-b

Looping / Panorama-like Images
I'm trying to take an image and loop it so when it pans right or left, when it reaches the end, it simply links back to the beginning of the image... kind of a pseudo-panoramic image. Any thoughts?

SB

Looping Images With Transitions Using XML Doc
Looking at creating a looping function for my external xml file.

I have created an xml file that contains my images that i want to call into flash, i know how to achive this part many tuts on this, what I need help with is when the xml doc is called into flash i need to write a function that does the following:

1. im asumming i will need to call a function that gets triggered using this.onEnterFrame, my images get dropped into an empty movie clip

2. do i call the movie clip or frame when the movie clip resides?

3. in either case when the event is called I want to first have it alpha=0 and blur=5 which then tweens to alpha=100 and blur=0

4. once alpha=100 and blur=0 i want to pause the image for about 15 secs and loop another image to start the process over again until all the images from the xml doc have been processed.

5. when other images trans in i want the previous image to fade out, i.e have top image trans over the below image, fading effect

Im not sure where to start, i can accomplish this easily using motion tweens and embedding the images but im not strong on writing AS functions an example of this trans can been seen here

http://www.humbervalley.com/ Make sure you click on high bandwith option[/url]

Looping Images In Movieclip
Hello,

I have a next and previous button controlling the x position of a movieclip that houses images that run off the stage. I am wondering how to make the first image appear after the last image hits a certain x position... I guess this could be categorized under "looping" images in movieclip.


Code:

pixels = 600

nextbutton.onRelease = function() {
tweenmc();


easeType = mx.transitions.easing.Strong.easeOut;
var begin = se._x;
var end = se._x-pixels;
var time = .5;
var mc = se;
Tween = new mx.transitions.Tween(mc, "_x", easeType, begin, end, time, true);
}

previousbutton.onRelease = function() {
tweenmcreverse();
}

function tweenmcreverse() {
easeType = mx.transitions.easing.Strong.easeOut;
var begin = se._x;
var end = se._x+pixels;
var time = .5;
var mc = se;
Tween = new mx.transitions.Tween(mc, "_x", easeType, begin, end, time, true);
}



Any help is appreciated.

Sudden Problem Loading Sounds And Images
Hi,

I'm quite new to flash and I hope you can help me because this problem is
driving me nuts.

I'm working with Flash CS4.

Everything went very well until I was going to add some new images and
soundfiles to my game. I had a lot of sounds and images before dynamically
created in the code and it had all worked well, so i really don't know why
things went all wrong now. what's differ is that the other images and sounds
are created on the second frame in my main scene (a read values from
XML-files and different create objects due to the XML data). The new
images and sounds are created in the first frame (that will only be played
once since it handles all declarations and initialiazing that only needs to be
made once), like:


PHP Code:



var mcPingSound = this.createEmptyMovieClip("mcPingSound", this.getNextHighestDepth());
_global.sndPing = new Sound(mcPingSound);
sndPing.attachSound("ping");




In the library I have checked all the sounds with "Export for Actionscript" and
"Export in frame 1".

Like i said, it has all worked so far, and suddenly don't.
What's happening is that when exporting/running the game, the scene just
goes blank. It's like it by some reason can't load all the data (?).

I made a preloader in a different scene that is excecuted before my main one:


PHP Code:



var loadedData:Number = this.getBytesLoaded();
var allData:Number = this.getBytesTotal();
var percentageLoaded:Number = Math.floor(loadedData/allData*100);
mainpreloader_mc.infodisplay_txt.text = "LOADING: " + percentageLoaded + "%";
if (percentageLoaded >= 100) {
gotoAndStop("main", 1);
}




When exporting after that, the program seem to get stuck in an infinite loop
and after a while it asks me to stop a script that makes flash running slow. If
i remove the last sound that made the problem (or just uncheck "Export in
frame 1", the preloader works very well again.

My troubleshooting makes no sense:

* I thought it could be something wrong with the sound-file, even though i
make all my sounds in the same program and export them in the same
format. I tried to add a random mp3 file in it's place (a much much bigger
one) - and suddenly it worked! For a while. One day later, that mp3 didn't
work either.

* I noticed that checking "Export for frame 1" caused trouble, so I changed
all attachsound functions to loadSound instead. It works, for some sounds.
Then the program wasn't able to load again.

* I make a lot of backups and have noticed that some fla-files gets extremly
big by no reason. They are usually on 9MB but sometimes mysteriosly
become 67MB. If i take a 67MG file and saves it as another backup - it
becomes 9MB again. (???)

I mostly had this problem with sounds, even though it happened when I tried
to add new images earlier. I just don't know why it suddenly worked.

I'm kind of stuck right now and have no clue of what's wrong. Is it a bug in
Flash or am I doing something terrible wrong? I've searched all over internet
but can't find a solution.

I would be so greatful if anyone could shed some light over this.

/Iona

Looping Over Images (loop Not Waiting)
Hello,

I am having some trouble trying to troubleshoot a looping problem that will not wait for images to load before making its next iteration. When i break the logic out of the loop and do a single image, it performs as expected. When I use the loop, it ignores all but the last image and performs the resizing/moving there. Does anybody have any suggestions? Thanks, Steve


// ***************************************** INIT VALUES ***********************************************
//set max image height
maxHeight = 175;
//set vertical middle point
imageTopLeft = (this._height-maxHeight)/2;
//init set total width
var nextXPos = 25;

// ***************************************** GET IMAGE ARRAY ********************************************
// Get album count
albumArray = new Array();
albumArray = _root.currentAlbum.split(",");
albumArrayLength = albumArray.length-1; //subtract 1 because the last value in the string = 0

for (i=0; i<albumArrayLength; i++) {
singleImageArray = new Array(albumArray[i].split("--"));
albumArray[i] = singleImageArray[0];
//create blank movie. define it's name first
var currentImage = "image"+i;
createEmptyMovieClip(currentImage, i);
this[currentImage].loadMovie("/library/portfolio/"+albumArray[i][0]+".jpg");
//set top and left position
this[currentImage]._y = imageTopLeft;
this[currentImage]._x = nextXPos;
//wait for image to load
onEnterFrame = function() {
this["percent"+i] =(this[currentImage].getBytesLoaded()/this[currentImage].getBytesTotal())*100;
if(this["percent"+i] == 100){
//Get current width/height
var imageWidth = this[currentImage]._width;
var imageHeight = this[currentImage]._height;
//set new width/height
this[currentImage]._height = maxHeight;
this[currentImage]._width = (imageWidth*maxHeight)/imageHeight;
//set next location
}
}
nextXPos = nextXPos += imageWidth+45;
}

Flickering External Images When Looping
I have external images loaded from an xml, When the images are looping they are flickering. Is there a way to creat a smooth "no flicker" transition from one image to the other.

Loading, Scrolling And Looping Images In A MC
Hi all, I want to create a movie that will load images from a folder, scroll them (from the right to the left) and when it gets to the end of the images it loops them. Can someone point me in the right direction on how to start this or an online example?

Thanks so much,
Mike

Displaying Images One At A Time Then Keep Looping
I have an HTML page Using CSS. At the top I have text 3 images and another line of text that I would like to highlight one at a time each time someone accesses the page. I will attach the page. Does anyone know how to do this.
Thanks

Looping Set Of Images Through The Screen Redering Problem
so idea is simple, images are placed on stage and every time moveS is engaged by timer event all the images have their Xcord updated via their UILoader and are moved either direction by so much once they reach their -/+ Xcord destonation limit their X cord is switched to either starting -x or ending +x cord based on their direction of movement so that the loop is created.

first couple of loops its smooth but then i get different space size between images and its iregular pattern.

so i wondering is there is better solution to this loop of images

should i work with movie clips instead like created multiple instances of them which hold same pictures and loop them around like that.

any solutions?

code:


Code:
//Animation
var moveTimer:Timer = new Timer(speedUseable);
moveTimer.addEventListener(TimerEvent.TIMER, moveS);
moveTimer.start();

var speed:Number = 1;
var minSpeed:Number = -3;
var maxSpeed:Number = 3;
var rangeSpeed:Number = maxSpeed - minSpeed;

function moveS(e:TimerEvent):void
{
speed = mouseX / stage.stageWidth * rangeSpeed + minSpeed;
for (var i:Number=0; i<=picQTY; i++)
{
this["image"+i].x -= speed;
if (this["image"+i].x < -imageWidthSwfPar+speed)
{
this["image"+i].x = picQTY*imageWidthSwfPar-imageWidthSwfPar;
} else if (this["image"+i].x > picQTY*imageWidthSwfPar-imageWidthSwfPar) {
this["image"+i].x = -imageWidthSwfPar-speed;
} else {

}
}
}

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