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




Trouble With Sound



Hey all, I’ve been teaching myself flash using the MX version and I’ve hit a snag…

I added some sound to a layer and built a cool little movie that followed the beat. I watched it several times in the preview mode while working in Flash and then exported (published) the finished file. When I play the .swf the music is significantly out of sync…? Something to do with the way Flash compresses the file? The music I’m using is an mp3 I imported in to the “library”.


Any help or suggestions would be greatly appreciated,


Jake



FlashKit > Flash Help > Flash Newbies
Posted on: 12-17-2004, 07:10 PM


View Complete Forum Thread with Replies

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

Help Me Pls Sound Trouble
In my movie i have a button that turns off the sound loop when i click on it but when i click on it again it doesnt turn the music back on. i want the button to turn the music off when u click on it and turn it back on when i click on it again.

I Hope someone can help me....it will be greatly appreciated!!!

Trouble With Sound
Hi flashers, I´m doing some kind of puzzles, and I´d like some help to get the sound in. The doubt is how can I make a sound to get played when the piece I move doesn´t go to the place I´ve selected to; and how can I do the inverse thing. I´ve got all the code already done, but I just can´t do it. Any help will be welcome. Thank you all.

Some Trouble With Sound
I'm working on a site that has a sound in the background. To activate that sound i use the following actionscript in the timeline in the main scene:

mySound = new Sound();
mySound.attachSound("Music");
mySound.start("", 999);

I created a volume slider to work with it. The volume slider is in a movie clip, which i put onto the main scene timeline and attach the following actionscript:

onClipEvent (load) {
_parent.volSliderDrag._x +=50;
}
onClipEvent (enterFrame) {
vol = _parent.volSlider.drag._x+50;
_parent.mySound.setVolume(vol);
}
All is good and it works however what i want to do is put that volume slider inside a sliding menu, so the volume slider slides out every time u roll over a word. But i cant seem to get it to work. I use the same script and nothing.
Has anyone got any ideas, it would be greatly appreciated. Has it got to do with the volume slider no longer being on the same timeline that activates the music?

Sound Trouble
I have several buttons I want to attach different sounds to, but when Im done, all the buttons play the first sound. Please give me some advice on what Im doing wrong.
Thanks All

Having Trouble With Sound
ive used flash 4 about 2 years now but never had this problem before in the past. when i add sounds into my flash, i normally stream. to make lip synch look good. when i put the sound in it plays fine in the .fla. but when i export it the sound plays way too early in the swf b4 it hits the scene. it really is frustrating me when this happens. ive tried using event, stream, and start 4 the sound but the same result happens every time. i use lots of layers but i dont think that has to do with ne thing. please help.

Sound Trouble...
how do i get a sound to play just once when its in an onEnterFrame function.
i have nameOfSound.start(0,1);
but when its played, its over and over and over....
whtats the correct way to do it?

Sound Trouble
hello
i am having a problem with the mySound.position thing
i have a movie in which the user can change songs, but when i do that, the position continues to run all the time.
i want to make it start again every time a new song is loaded, and i tried to do that also by setting a variable to 0 every time a new song is loaded, but it keeps on moving
can anyone help?

Trouble With Sound
Hi guys

I have a movie clip on the main timeline. Within it, are several other movie clipe. I want a looping sound to be triggered when each member is clicked. here is the following code I have, but so far it aint working! I set them all to play initially, so that they are in sync. I imagine this is just a linkage issue of sorts.


Code:
stop();
this.createEmptyMovieClip('sound1Holder', 100);
this.createEmptyMovieClip('sound2Holder', 101);
this.createEmptyMovieClip('sound3Holder', 102);
guitar = new Sound(sound1Holder);
drumbass = new Sound(sound2Holder);
tribal = new Sound(sound3Holder);
guitar.attachSound('guitar');
drumbass.attachSound('sound2');
tribal.attachSound('sound3');

guitar.setVolume(0);
drumbass.setVolume(0);
tribal.setVolume(0);

guitar.start();
guitar.onSoundComplete = function() {
this.start();
};
drumbass.start();
drumbass.onSoundComplete = function() {
this.start();
};
tribal.start();
tribal.onSoundComplete = function() {
this.start();
};
//silence_btn.onRelease = function() {
//mother_mc.gotoAndPlay(11);
//child_mc.gotoAndPlay(11);
//girl_mc.gotoAndPlay(11);
//};
blinds_mc.onRelease = function() {
blinds_mc.gotoAndPlay(2);
};
ears_mc.onRelease = function() {
ears_mc.gotoAndPlay(2);
};
gunk_mc.onRelease = function() {
gunk_mc.gotoAndPlay(2);
rightface_mc.gotoAndPlay(2);
};
leftface_mc.onRelease = function() {
leftface_mc.gotoAndPlay(2);
};
boy_mc.onRelease = function() {
boy_mc.gotoAndPlay(5);
sound1.setVolume(100);
};
At the moment im just focusing on getting the one with boy_mc to work... any ideas?

cheers

Trouble With Sound
I was so happy I finally finished my movie just to find out that when I play it in .swf, the sounds are all screwed up, they'll all play at once and keep repeating through the movie hundreds of frames before they should, the first frame has a stop and stopallsounds action, but its only for the first frame, I have a lot of sounds on this movie, I tried messing around with it, it would play the sounds right, then start to mess up at a certain part, so I changed the sounds to event instead of streaming, but see I don't put the sounds on a frame where there's an image, I made like 15 layers with blank keyframes with sound in them, when I play the movie in flash, the sounds are all fine, but when I play it in .swf, They're all screwed up, and sometime I get a warning when i publish it that says the .swf contains multiple copies of a sound, anyone know what's wrong?

Sound On/off Trouble
Hi, I have an interface with many buttons that play sounds in thier over state and down states. I am trying to make two buttons, one to turn the sound off, and one to turn the sound on. I have tried stopAllSounds but that doesn't work for this application because once I hover over a different button it's plays the sound for that button again.

Any ideas?

Sound Trouble
The first frame of my movie has the action "stop" and has music playing. A button there plays the movie and stops the music playing in Frame 1. Now, my problem is that I add sound to Frame 2, but after clicking the button, the movie plays, but there's no sound. What's wrong?

Sound Trouble
heres what I got , I have a drop down menu. And want to add a sound when the menu opens, and a differant sound as it closes ( when the mouse leaves. Can anyone help me out with this, can I have it play a sound once and not play it again til the mouse leaves the menu?

heres what I got;


ActionScript Code:
nav.onMouseMove = function() {
    if (this.hitTest(_root._xmouse, _root._ymouse, true) && (_root._ymouse > 150)) {
        nav.slideShrinkRotateTo(0, 144, 100, 0, 4);
        activated = true;
    }
   
    else if( activated == true) {
        nav.slideShrinkRotateTo(0, 70, 100, 0, 8);
        activated = false;
        }

Sound Compression Trouble
Hi everyone,

I'm running into sound problems with Flash MX, specifically recorded speech.
Attempting to use professionally produced, compressed etc voiceovers of higher-pitched female voices have resulted in seriously distorted, sibilant "s" sounds when exported out of Flash.

Using programs like SoundForge or ProTools to clean up anything in the source files is misleading because it sounds fine until the final Flash export, even while scrubbing the timeline it sounds good, and regardless of what setting the soundfile is, "speech" "mp3" whatever, the result remains the same. It either sounds like they're suddenly underwater or in a large metal tube...heavy reverb and as mentioned, sibilant "s" distortion.

Has anybody encountered anything similar, and if so, how did you remedy the problem.

Much obliged,

fj

Sound And GotoAndPlay Trouble.. HELP
Here is my Flash 5 .fla

http://aratea.net/rey/flash/features_2.zip

1.1MB

Flash can be viewed here
flash swf

::Auto Anomaly is the only working section::

problem happens at the end of Auto Anomaly where the menu
comes up again. and the anuto anomaly button there after.




Problem is:

1) when I leave one scene ( "Auto Anomaly" with a stream sound that is finished)
and goto another scene with no sound, about 60 frames into the 2nd scene it begins the previous sound and plays it for about 10 frames
then stops it.

1) gotoAndPlay frame label takes me to the correct scene that begin
with said frame label, but the goto takes me to the middle of that scene, not the beginning where the label is.

I need help asap. Any help would be greatly appreciated!!

Rey

Thanks All...still Having Scrollbar/sound Trouble Though...
Thank you iguanagirl32 and oldnewbie ....

After checking out the tutorial, I can now create a sound object and attach it to the movie, and get it to play. The trouble: it plays during the whole scroll (movie) and is not started specifically when one image(mc) is called or stopped when another image (mc) is called. My main trouble is that I don't know what code and where to write it in order to make the sound start and stop in conjunction with its image (mc). Another complicating factor is that each image movie clip has "hidden" and "showing" states so that it hidden when the scroll is moving and only appears when it's affiliated scroll thumbnail is clicked. Would the "showing'" state of the mc need to be written into the code also?

Bless you if you're inclined to weed through this one.

Thanks

Playing Sound Trouble
Hi,

I'm making a Flash audio player for a client that will play three song clips. The titles will play when clicked on. I can get my first title to play but not the rest.

My actions are attached to buttons as follows:


Quote:





on (press) {

//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_track1',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.track1 = new Sound(this._parent.BS_track1);
} else {
this.createEmptyMovieClip('_track1_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.track1 = new Sound(this.BS_track1);
}
_global.Behaviors.Sound.track1.attachSound("track1 ");
if (false) {
_global.Behaviors.Sound.track1.start(0,1);
}
//End Behavior

}
on (release) {

// Play Sound Behavior
_global.Behaviors.Sound.track1.start(0,1);
// End Play Sound Behavior

}







Quote:





on (press) {

//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_track2',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.track2 = new Sound(this._parent.BS_track2);
} else {
this.createEmptyMovieClip('_track2_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.track2 = new Sound(this.BS_track2);
}
_global.Behaviors.Sound.track2.attachSound("track2 ");
if (false) {
_global.Behaviors.Sound.track2.start(0,1);
}
//End Behavior


//Stop Sound Behavior
_global.Behaviors.Sound.track1.stop();
}
on (release) {

// Play Sound Behavior
_global.Behaviors.Sound.track2.start(0,1);
// End Play Sound Behavior

}







Quote:





on (press) {

//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_track3',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.track3 = new Sound(this._parent.BS_track3);
} else {
this.createEmptyMovieClip('_track3_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.track3 = new Sound(this.BS_track3);
}
_global.Behaviors.Sound.track3.attachSound("track3 ");
if (false) {
_global.Behaviors.Sound.track3.start(0,1);
}
//End Behavior


//Stop Sound Behavior
_global.Behaviors.Sound.track2.stop();
}
on (release) {

// Play Sound Behavior
_global.Behaviors.Sound.track3.start(0,1);
// End Play Sound Behavior

}






Any help would be great.

Streaming Sound Trouble
Hey peeps...

here is the problem.

i want to download audio, but while it's downloading i want it to start playing after it downloads 1 meg of a 10 meg file...

how can i do this, cause my setup is screwed.
what do i need to do or keep in mind?

thanks a bunch

p.s. i have a preloader going, it tells me how much of the file it's downloading, but as that's showing me how much it's downloading i want the audio to play as the progress bar slowly increases as the file goes on.

if you don't understand, let me know so i can describe it better,
thanks

Trouble With Scenes And Sound...
Hi,

I am having trouble with a scene based movie. I cannot make the music stop from the previous scene even once i have navigated to the next scene, i can still hear the music from the first one. Can someone tell me if there is a way of fixing this?

Is there some sort of action script i can paste into the second scene to kill off oll the unwanted sounds still coming from scene 1?

Hopefully somebody can help me?

[MX] Trouble With Exporting Sound
Dear Flash Aficionados,
I am having trouble with exporting sound with my animations. Although, the sound shows up in the library and plays when I preview it in Scene I get a message like this whenever I try to export it.
Can someone tell my what I am doing wrong. I've tried to export as Flash and Quicktime to no avail???

Sound has no valid device sound path although exporting device sounds was requested in the export settings. This sound will be ignored.

I get different error messages but always the same "no valid device sound path" main message?

I have sound on my computer. I play CD's and other sounds come across with no problem? I don't understand?

Sound Muting Trouble
Hi,

I am having trouble muting sounds with a mute button. I can successfully mute sound in a movie clip using the following code:

_root.my_mc.allSound.stop();

("allSound" is a sound object I created that has no sound attached to it so that it controls all sounds within the movie clip).

However I have another movie clip again with a sound object controlling all sound that I am unable to mute using the same procedure in the mute button:

_root.my_mc2.allmcSound.stop();

I have tried using stopAllSounds() but still no luck.

The strange thing is, I use the same procedure for controlling the volume in my volume slider, and it works:

allSound.setVolume(_root.volume);
my_mc2.allmcSound.setVolume(_root.volume);

Not sure why I cant mute "allmcSound"

Sound/microphone Trouble
hello,

i have the actionscript to allow an object to be manipulated by the sound recieved in the microphone:

m = Microphone.get();
attachAudio(m);
m.setUseEchoSuppression(false);
onEnterFrame = function () {
circle._xscale = circle._yscale = m.activityLevel+50;
};

but i need the script to allow the function that when sound is made it triggers a jump to a different frame.

can anyone help me with this?!

Sound/microphone Trouble
hello,

i have the actionscript to allow an object to be manipulated by the sound recieved in the microphone:

m = Microphone.get();
attachAudio(m);
m.setUseEchoSuppression(false);
onEnterFrame = function () {
circle._xscale = circle._yscale = m.activityLevel+50;
};

but i need the script to allow the function that when sound is made it triggers a jump to a different frame.

can anyone help me with this?!

Sound Object Trouble
i'm using the sound object to load an mp3 and stream it. the object doesn't seem to be responding to the "stop" "start", etc. methods of the sound object.

when you set a sound object to stream do you lose control over that sound's playback?

the AS dictionary says this:


Quote:




event sounds are completely loaded before they play. they are managed by the actionscript sound class and respond to all methods and properties of this class




for streaming sound it says:

Quote:




steaming sounds play while they are downloading, playback begines in when sufficient data has been received to start the decompressor...




this seems to imply that you cannot control streaming sounds via the sound object???

i need to stream an mp3 and want to have a button that lets the user stop the sound if it's playing and start it again if it's stopped. should be super easy right? apparently i'm screwing something up...

the sound object streaming get's playing no problem then i simply reference the object in my functions like this:


Code:
nextTune="music/"+mp3ToLoad;
tunes.loadSound(nextTune, true);
_root.tunePlaying=true;
tunes.setVolume(0);

_root.holder.loadMovie(movieToLoad);
gotoAndPlay("preload");

stopSound=function(){
tunes.stop();
_root.tunePlaying=false;
}
startSound=function(){
tunes.loadSound(nextTune, true);
tunes.setVolume(100);
_root.tunePlaying=true;
}
HELP!!!!!

Sound Object Trouble
i'm using the sound object to load an mp3 and stream it. the object doesn't seem to be responding to the "stop" "start", etc. methods of the sound object.

when you set a sound object to stream do you lose control over that sound's playback?

the AS dictionary says this:


Quote:




event sounds are completely loaded before they play. they are managed by the actionscript sound class and respond to all methods and properties of this class




for streaming sound it says:

Quote:




steaming sounds play while they are downloading, playback begines in when sufficient data has been received to start the decompressor...




this seems to imply that you cannot control streaming sounds via the sound object???

i need to stream an mp3 and want to have a button that lets the user stop the sound if it's playing and start it again if it's stopped. should be super easy right? apparently i'm screwing something up...

the sound object streaming get's playing no problem then i simply reference the object in my functions like this:


Code:
nextTune="music/"+mp3ToLoad;
tunes.loadSound(nextTune, true);
_root.tunePlaying=true;
tunes.setVolume(0);

_root.holder.loadMovie(movieToLoad);
gotoAndPlay("preload");

stopSound=function(){
tunes.stop();
_root.tunePlaying=false;
}
startSound=function(){
tunes.loadSound(nextTune, true);
tunes.setVolume(100);
_root.tunePlaying=true;
}
HELP!!!!!

Trouble With Sound Using Actionscript
I'm using this script to play sounds when hitting a playbutton:

on (release) {
mySound = new Sound(this);
mySound.attachSound("soundfile");
mySound.start(0, 1);
}

How can I make this script better so the soundfile will not start over and over again when hitting the playbutton?

Loadmovie() With Sound Trouble
Hello hello,

I need to import a .swf into an emptyclip... it works fine but I can't have the sound of my buttons from LeBook.swf to work while all the rest of the librairy from LeBook.swf is just fine.

The code is :

_root.createEmptyMovieClip("a",1);
//_root.a._lockroot = true;
_root.a.loadMovie("LeBook.swf");

I tried to create it on level0 and it's just the same.
I also tried a .setvolume() and it's a no no.
Thanks for your help.
Fabrice

Trouble W AS For Synching Sound. Thank U
If someone could help me with this I would be most grateful!

On the main timeline, I've got six different dialogue sound clips (same layer), with around 15 to 20 blank frames between the different sound clips. When I hit the pauseButton, the sound clip stops and the movie clip stops, which is what I want. But, when I hit the play button, the movie clip starts, but, the sound won't start until the beginning of the next sound clip (on the main timeline.) I want the sound to also pick up right where it left off, as it is dialouge..

Here's the script I'm using:

pauseButton.onRelease = function() {
stop();
this._parent.little.stop();
stopAllSounds();
};
playButton.onRelease = function() {
play();
this._parent.little.play();
playAllSounds();
};

Please help, as I'm stuck until I resolve this.

Thanks, kf.

Sound And GotoAndPlay Trouble.. HELP
Here is my Flash 5 .fla
http://aratea.net/rey/flash/features_2.zip


1.1MB

Flash can be viewed here
flash swf

::Auto Anomaly is the only working section::

problem happens at the end of Auto Anomaly where the menu
comes up again. and the anuto anomaly button there after.




Problem is:

1) when I leave one scene ( "Auto Anomaly" with a stream sound that is finished)
and goto another scene with no sound, about 60 frames into the 2nd scene it begins the previous sound and plays it for about 10 frames
then stops it.

1) gotoAndPlay frame label takes me to the correct scene that begin
with said frame label, but the goto takes me to the middle of that scene, not the beginning where the label is.

I need help asap. Any help would be greatly appreciated!!

Rey

Trouble With Streaming Sound
Hi, all. I'm having a little issue with streaming sound. What I'm trying to figure out how to do is to start playback of the streaming sound from the beginning of the track without having to reload the whole thing. I tell a sound to load:

music.loadSound(URL, true);

And then I tell it to stop:

music.stop();

But when I try to start it again:

music.start(0, 0);

It doesn't start again. To make it start I have to use loadSound again which erases whatever it has stored in cache. The start command only seems to work for event sounds.

Any help would be greatly appreciated and thanks in advance.

Chris

Site + Sound Loop Trouble
Hi, I'm a newb to flash, but I am making a site. On my site, each link has a seperate swf for it's page. I created an swf for the 'about me' page button, 'my hobbies' page etc, so when clicked on it accesses the flash file which is located in the same folder. I want to have a sound loop playing in the backround, but it would start over everytime I click a different link, since It was opening a different swf. Is there anyway I can have a sound loop playing through the final presentation, regardless of what link you click on. Thanks alot I appreciate it.

Trouble With Sound Using Flash 2004 Pro
Hello,

I'm trying to build a presentation in Flash 2004 Pro using slides.
I have an audio file playing immediately upon entering that slide, but if you move to another slide either through a link or the Nextslide button, the previous audio continues to play. we have tried various combinations of _parent.currentSlide, etc., and still can't seem to get this to work and we're getting desperate, for we have run out of time on this project. Any help or suggestions/code to move us in the right direction would be greatly appreciated.

Trouble With Exporting - Sound Out Of Time
hi there, im having this little problem when I export my movie clip.
some of the sounds I used get out of the timeline for few miliseconds, but it sounds bad anyway.

any solution please.
thanks

Trouble Importing Sound Files
I'm trying to add a sound file to my timeline, but it comes up with the error message

'one or more files was not imported beacuse there was a problem reading them'


does anyone know whats wrong?

[F8] Trouble Synching Sound With Animation
when im live testing the animation the sound and the flash are synched but when i hit ctrl enter they go off synch. whats up with this.

Trouble Accessing Sound Duration - Help
I can't seem to access the sound duration value in my code, I am not sure what I am doing wrong.


ActionScript Code:
var directory:String = "Voices/";var noOfSongs:Number = 100;var aSongs:Array = [];var currIndex:Number = 0;for (var i = 1; i<=noOfSongs; i++) {aSongs.push("v"+i+".mp3");}VSound = new Sound(Voice1_mc);function playSound(songIndex:Number):Void {VSound.loadSound(directory+aSongs[songIndex], true);VSound.setVolume(VSound.getVolume()+50);trace(VSound.duration);VSound.start(0, 0);}VSound.onSoundComplete = function() {currIndex++;if (currIndex == aSongs.length) {currIndex = 0;}playSound(currIndex);};playSound(currIndex);

Having Trouble Attaching Sound To Button
Hey there Fellow Flashers,

I am trying to attach a sound to a button, but I do not want to have the sound on the timeline. In other words I am trying to have the sound triggered via action script.

I know the code should be something similar to the following:

on (release) {
Sound = new Sound();
sound.attachSound("seagulls");
}


However, I'm not quite sure this is right. Well, I know it's not right because my sound is not working...

Anyway, if there's anyone out there that can be of assistance please let me know.


Thanks,


Kelly

Trouble With Sound Playback Using Hit Test
I've got a file that I want to start and stop a sound clip that dependant to the mouse position on the MC.

Here's the code attahced to my MC:

onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
mySound.start(["emerge"])
} else {
this.prevFrame();
mySound.stop(["emerge"])
}
}



Does this look right? I get no sound when I publish it. Linkage is good.

Trouble Looping An External Sound Source
I have an mp3 being pulled from an external URL and streamed into my Flash movie. It plays fine, but I can't get it to loop. This is my code:

Code:
var s = new Sound();
s.loadSound("http://www.dustwurks.com/musick/" + num + ".mp3", true);
s.start(0, 10);
This starts the sound fine, but it does not loop. I also tried adding this technique to no avail:

Code:
s.onSoundComplete = s.start();
Is Flash only able to loop sounds that are located within the swf itself?

Trouble With Sound Library/sub-movieclips/preloading
I'm building an application in MX that needs to use a fairly large library of sounds that are exported for actionscript in the first frame (as per the default linkage settings) and the movie won't display the first frame until it finishes downloading all the sound data.

I tried building a preloader file that would load my application into a movie clip, but the sounds would never play from inside the clip. I'm never referencing the _root in any of the script, so I'm not sure where the problem is. I can't figure out how to even check to see if the sound files are being attached to the sound object when I call them or if it's simply doing some sort of stopallsounds command at random.

I have also tried loading the application into the root level of the pre-loader but even though the sounds work properly when I do it, the preloader graphics are all wiped out as soon as the application begins to load and I'm stuck leaving users with a blank screen until all the files finish loading.

Does anyone know of a problem with defining a sound object inside of a movie clip (I tried setting them all to _root also and that had no effect either) or is there some problem with referencing an externally-loaded library if it's not in the main timeline? I would have just spread out all the sounds on different frames but the whole point of the application is to make it simple to dump a bunch of sound files into the library without having to attach them to specific frames.

Trouble Getting Sound Objects Working In An External SWF
I have tried targetting the root, and just keeping the targetting within the external swf, neither system works. As of now I have all the objects activated on the root level.

Does anyone know a way around this. Here's the Fla's for reference
(only the intro page is active)


parent movie:
http://www.spfstudios.com/temp_fla/spf_index.fla
Child:
http://www.spfstudios.com/temp_fla/spf_intro_sc.fla

Thanks in advance...

Autoplaying Sound & Full Screen SWF Trouble
I have two problems - can anyone help!?

1) I have my finished swf file and for some reason, just highlighting it makes the music from the movie start - therefore when doubleclicking the sound is playing twice???

2) Can anyone help with making a flash movie when opened fills the entire screen similar to when opening a director projector??

Your help would be much appreciated

At Sound.position X Go Play These Frames Trouble
Hi. I've made a movie clip that synchronizes sound and animation, but it doesn't work for everyone that views it. Sometimes the sound never plays, thus preventing the animation from happening. Not cool.

Here's my _root : frame 1 code:


Code:
stop();

var playing = false;
this.onEnterFrame = function () {
var total_bytes = this.getBytesTotal();
var loaded_bytes = this.getBytesLoaded();
var remaining_bytes = total_bytes-loaded_bytes;
if(total_bytes == loaded_bytes) {
firstSound=new Sound();
firstSound.attachSound("driveby01");
firstSound.setVolume( 75 );
firstSound.start(0,0);
playing = true;
delete this.onEnterFrame;
}
}
Then I have a movie clip on the same frame that contains this code:


Code:
_parent.traceBox.vScrollPolicy ="on";
var firstTime = true;
function myTrace(msg)
{
_parent.traceBox.text += msg + newline;
_parent.traceBox.vPosition = _parent.traceBox.maxVPosition;
}
onEnterFrame = function () {
if ( _parent.playing && _parent.firstSound.position/1000 >= 2.55 ) {
if( firstTime ){
myTrace("Going to play.");
firstTime = false;
_parent.gotoAndPlay( 47 );
}
} else {
myTrace("Not yet: " + _parent.firstSound.position/1000 + " sec");
}
}
The game plan is to sit at frame 1 until the sound reaches 2.55 seconds, then the main timeline should go to frame 47 and play. It works for me but maybe not for you. Animation is the live at www.goccb.com.

Thanks in advance!

Trouble With Flash MX 2004 Banner Loop With Sound.
I am having trouble with Flash MX 2004. I have a banner for a website and I want it to have a sound in it. I want the banner to loop continuously and the sound to play once. But the actionscript I have been inputing has been causing so many problems. I even apply it to the correct frame. I do not know if my actionscript is wrong or not...

I attached the .fla. Could someone please fix it and tell me my errors. I do not know what to do. Please help me!

Trouble With Flash MX 2004 Banner Loop With Sound.
Trouble with Flash MX 2004 banner loop with sound.
I am having trouble with Flash MX 2004. I have a banner for a website and I want it to have a sound in it. I want the banner to loop continuously and the sound to play once. But the actionscript I have been inputing has been causing so many problems. I even apply it to the correct frame. I do not know if my actionscript is wrong or not...

I attached the .fla. Could someone please fix it and tell me my errors. I do not know what to do. Please help me!

Having Some Trouble With Loading, "preloading", And Playing Sound...
Not sure whats going on here. I am completely novice so please excuse my code examples. Well, here goes...

Use the media player...
Download Source...

Occasionally(not everytime, but enough to feel quirky) when i load the movie, the actionscript to preload the sound does not work. any suggestions?

also need to know how i would create a bar that says how much of the song has played. i assume that it would be similar to the preload bar(in theory) but dont know how to get the song length or how much of the song has played into a variable

LoadMovie Trouble Trouble Troubles
hello,

i'm having a little bit of trouble here trying to load multiple movies into the same container. not all at one time. like this:

when a button is clicked this happens in my preloader clip which is located in my _root movie:

********************************
// set vars
sectionMovie = _root.currentSection + ".swf";

// un/load movie
unloadMovie("_root.SectionContent");
loadMovie(sectionMovie, "_root.SectionContent");
********************************

then the next frame of the preloader says:

********************************
// get the percent of the movie loaded
bytesLoaded = _root.sectionContent.getBytesLoaded();
bytesTotal = _root.sectionContent.getBytesTotal();
percentLoaded = int((bytesLoaded / bytesTotal)*100);

// if it's loaded then continue
if (percentLoaded == 100) {
this.gotoAndStop (1);
}
********************************

it all seems like it should work. i click "button1" which loads "movie1.swf" perfectly. then i click "button2" and it will unload the movie fine, but it just stops when it gets to "loadMovie"... anyone know what is happening?

thakns in advance for the help, it's a school project...mwaahaha!

xo

"Oooooh Trouble Trouble..." (Foghat Reference +1000 Points)
I am attempting to add X movie clips to the stage via script, with follow AI behaviors added to each of them. But for now I am just having them immediately start moving left until they hit the stage edge OR eachother...which is the problem.

I cannot get them ALL to stop when they collide with somehting else on the stage...

the way I atempted to solve this problem was to start an array... a list... and to add to that list the name of every object I add to the stage when I add it to the stage. So before ANYTHING moves it loops through this array to see if it is hitting anything else on the stage. Sounds simple right?

Well it seems to only work for the LAST movie attached in my function.

I have attached the script to this post. Please take a look, provide some help, give me some alternative ideas, tell me a good joke :-P, just gimme some feedback. Thanks in advance to anyone who even tries to help.

Trouble Explaining The Trouble
i am having a hard time explaining this problem so i have attached my fla file with some notes attached to it.
i'm trying to customise the a.s. but alas i'm not very good at it yet.

i have an element on the page that when it is clicked on it zooms big and comes to the center of the stage. when you click on it again it zooms back to its original position. - i have this part working.

the problem is i want elements within the zoomed elements to behave the same way. essentially zooming further into the stage. i just can't get it to work.

at this point i am completely lost, any help on this is much appreciated.
thanks everyone

Attach Sound, Play Sound & Stop Sound.
Hey there,

I was wondering if any of you could help me please.

I want to play a song which I have named "rundmc" The file extension is ".mp3"

I want a button to play this mp3 which I read you need to attach that sound, then play it and I want to a button to stop that sound, or preferably the play button to change into a stop button.

I've read the help files, but none of it works and I've changed the linkage for the mp3 to export for action script, but nothing works!!!

Please help,

NK.

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