ActionScript 3.0 :: Make Sound Not Play When Swf Loads?

Nov 8, 2011

I have a sound in the library named RolloverSound and a MovieClip on the stage with instance name of btn. I hear this sound whenever I rollover btn and that's all I want it to do. The problem is is that it also sounds off when the swf loads and I don't want that.

[Code]...

View 6 Replies


Similar Posts:


ActionScript 3.0 :: Make Preloader Run Before Sound Loads?

Aug 13, 2009

I am working on a Flash site with background music whose file takes up about 80% of the loading process. The preloader is on the maintimeline.

I've set assets to load on the 2nd frame, and unchecked the "load on 1st frame" box in the music files library properties. Then I get the following message[code]...

View 2 Replies

Make Sound Effect Play On Collision?

Jun 3, 2010

Im an aspiring flash game developer struggling with a bit of code in my upcoming game, I want to play a sound(A "ding") everytime the main character touches a cookie on stage. The main character follows the mouse cursor, and the cookies fall down from the sky.

I have scripted the cookies main class, with this function(which works fine)
private function eFrame(e:Event):void{

Code:
private function eFrame(e:Event):void{
this.y += 3;//move the bell slowly downwards
if(this.hitTestObject(_root.mcMain)){//if this touches the main character
_root.mainJumping = true;//make him jump

[Code].....

And I was hoping it would go into the library and play the sound bit named "bellSound" but it doesnt do this, instead nothing happends, not even any errors under the "Compiler errors" So no im a bit lost, as I do not know how to make this work, so a sound is played when the main character touches the cookie.

View 3 Replies

ActionScript 3.0 :: Make A Button To Play A Sound?

Sep 4, 2008

I've been trying to make a button to play a sound, I've created the button and have a sound in the library, but can't manage to get the button to play the sound!!! I get this error: 1120: Access of undefined property knock_sound.

I think I need to give the sound an instance name but it says I need to use AC2 to do that!!

View 3 Replies

ActionScript 3.0 :: Make Sound Play On Click?

Jul 12, 2010

The sound only plays when I hold the mouse button down. I need  it to play when I click it. But it has to stop the sound from  playing twice import flash.media.SoundMixer; this.addEventListener(MouseEvent.MOUSE_UP,f); function f(e:Event):void{ SoundMixer.stopAll(); } here is a link to my swf file [URL]

View 4 Replies

ActionScript 3.0 :: Make A Button Play Sound?

Mar 26, 2011

I have been working on flash in school, and the school upgraded from flash MX to flash CS5, i have then gone to make my project in AS3, however, it is very diffrent from AS2

My problem, is, all i want is a button to play a song from the libray (not from a URL on the internet like the code snippet) and my ICT teachers have no idea how to use AS3. I also need is a play, stop and pause button, and a volume control slider, i CAN do all these on AS2, i infact have it set up (but without a pause button) but, i cannot do this in AS3 and i need it done bady.

View 4 Replies

ActionScript 3.0 :: Make The Sound Play First And Then Stop It?

Feb 10, 2011

make the sound play first and then stop it?

var music:Sound;
var trans:SoundTransform;
var channel:SoundChannel;
var musicOn:Boolean = true;

[code]...

View 0 Replies

Professional :: How To Make Sound File Play In Only One Scene

Mar 13, 2011

I have a flash file with about 20 different scenes in it. And in one of the scenes there is an audio file that is 15 seconds long. The sound is on a menu page so i only want it in that scene. But if you are on that page for less than 15 seconds and go to another page then it carries on the sound into the next scene and if you go to and from the menu page to another scenes in quick succession you get a build up of sound which is horrible.

View 1 Replies

Actionscript 3 :: Make Sound Only Play Once When Objects Touch?

Feb 25, 2011

I have a griddle_mc, bacon_mc, and BaconCooking.wav. I want to play the wav when the bacon is moved onto the griddle. If I move the bacon until it just touches the griddle the wav plays fine, but if I continue to drag the bacon_mc across the griddle the wav becomes loud and distorted, almost like it's playing multiple instances of the wav at the same time.

private function __handleSliceDown($evt:MouseEvent):void {
slice1_mc.startDrag(true);
}

[code].....

View 2 Replies

ActionScript 2.0 :: How To Make Button To Play Specific Sound

Jun 22, 2004

I have a button that is actually a Movie Clip (so I can animate it). I want this button to play a sound. (But this isn't a sound question.) If I have a list of 20 sounds, and 20 instances of this button mc, how can I make it know which sound is being called for? If it were a normal button, each instance would have its own load- or attach-movie command. But since they're MC's, the invisible button hit is always the same. Is there a way to make it look to the MC's instance name to get which sound to load?

View 14 Replies

ActionScript 3.0 :: Create Dynamic Sound To Play Sound-file?

Oct 14, 2009

It's possible to play a sound file through AS, either by loading it from a folder or import it to flash. It's also possible to play a dynamic tone with flash.media.Sound + writeFloat.

But... is it possible to play a sound file with flash.media.Sound + writeFloat in some way? I want to play a sound file without having to deal with any files except the .swf!

View 9 Replies

ActionScript 1/2 :: Preloader Sound Settings Affect The Swf It Loads?

Jun 6, 2011

my preloader music now fades out as the progress bar completes (the preloader code is below with the new code in bold). However, the new code added to the preloader seems to be affecting the sound in the main swf (the bigger swf that the preloader loads - 'lesson.swf' - which is a series of exercises).

The exercises in the main swf have sound cues for right and wrong answers. The first time the main swf loads, there is no sound at all in the exercises. If I navigate to another page of the website and come back to the exercises, the sound is normal. But if I navigate to another page and come back a third time, the sound is audible, but reduced in volume. If I keep switching off the page and back to the page, the sound varies from no sound to full sound to about half the full volume.

Is it possible that the code on frame 2 of the preloader, the code that sets the volume for the preloader music, is also applying to the main swf, so that whatever point the preloader progress bar gets to before the main swf loads becomes the volume of the main swf? The first time the preloader runs, the progress bar goes all the way from left to right and the sound volume fades to zero. Then the volume in the main swf is zero. The next time the preloader runs, it only gets a little way across before the exercises come up, and the sound in the exercises is full volume. Is there a way to fix this? I should add that if I comment out the new code that fades out the preloader music, all the sound works normally.

[Code]....

View 3 Replies

Flash :: File Loads Much Before Than Its Background Sound In Website?

Sep 20, 2011

I have a website at [URL] The problem i'm facing is that after the preloader is done the homepage comes but the other menus still takes much time to load and the sound also take atleast 5 min ! :(

How can i make them all bind together so that after the preloader everything comes together at an instant completely !

View 1 Replies

ActionScript 2.0 :: Button Loads Random Sound Clip

Apr 18, 2011

I am a voice over artist and I'd like to have a button and when you click it, it loads one of say 20 mp3s stored...wherever. It can be in the flash movie itself...but I'd rather the script access a directory on my server, that way the movie itself doesn't take long to load.

View 2 Replies

ActionScript 2.0 :: Play Sound/stop Sound Button?

Feb 13, 2007

i want to make a single button to play a sound, and if pressed again, stop the sound. and if pressed again, play the sound, and so on...
i know it has to be made with a boolean variable, true/false, but i just can't figure out how.

View 13 Replies

Play A Movie Clip While It Loads?

Sep 29, 2010

I want to create a preloader, but I don't want to deal with percentages and loading bars... I just want to play a movie clip while it loads.

View 1 Replies

ActionScript 3.0 :: Nested SWF Loads But Won't Play

Jun 29, 2009

I am working with Captivate 4 and have embedded a SWF that has AS3 code to dynamically an image (among a few other things) that needs to position another animation based on the size and position of the image. I've tried placing the animation in the captivate file directly and referencing it with this.parent.name which didn't work and seeme to break the rest of the code. I also tried loading the animation as a separate external swf which works until it's embedded into the parent. It loads it and positions it but won't advance it past the first frame even when I called objectname.play();

View 9 Replies

ActionScript 2.0 :: Button Loads MC But Does Not Play It?

Nov 17, 2007

i have this code below that allows me to switch between images using a mc button, but when i press, the mc loads but does not play the fade in? Can someone explain what is missing in this code that skip the play?

[Code]....

View 3 Replies

Video Doesn't Automatically Play When Swf Loads

Jul 5, 2009

I'm using Flash CS4 and have linked to a video that hosted on a web server with one of the preloaded flash video skins (ArcticExternalAll). When the page loads the video plays without any problems, but I would like to make it so the user decides when the video starts rather than it automatically starting when the page loads. Is there any way to do this?

View 3 Replies

Professional :: FLV Loads When Tested, But Won't Load/play On Web?

Oct 23, 2010

(Slightly different from the person's post below.)I have been using FLV-encoded short movie (1mb - 10mb) files with good success, but now I have encoded and uploaded a new movie (encoded with Adobe Media Encoder), and, when tested here on my computer, all works fine, I get the movie and the controller skin. However, I've uploaded the files to their proper locations, and when I go to the URL, the movie file will not load/play on the web page! All of my other previous movies (this is the same site/directory, no changes there) load and play fine. This new movie seems cursed. I tried encoding several versions, each slightly different.

View 7 Replies

ActionScript 2.0 :: Have The 4 Swf Files Automatically Play When The Page Loads

Jan 14, 2009

I have been working in Flash CS3 now for a couple of months and action scripts have been a challenge for me. I have created a site that has 4 areas that play a looping swf file of images. I can get this to work no problem with a behavior for rollover, but what I am looking to do is have the 4 swf files automatically play when the page loads.

The swf file I want to play is really simple, just images of banners.

View 9 Replies

ActionScript 2.0 :: Unable To Play Flv From Xml Though The Xml Loads Perfectly Fine?

Feb 27, 2008

I am unable to play flv from xml though the xml loads perfectly fine. When flv path is hardcoded the video plays fine but when from a node it seems to make the video disappear and it dosent play.I am having the same issue i got the xml loaded and even the url into the video source but it dosen't seems to play the video when reading from xml...

[code]...

View 1 Replies

ActionScript 1/2 :: Make Button On Rollover Starts Sound And Rolloff Stops Sound?

Jul 28, 2009

I have several buttons in a movie and I want to be able to rollover an individual button and play the sound for that button and when I rolloff I want the sound for that button to stop.

View 6 Replies

ActionScript 2.0 :: Movie And Sound - Make The Sound Fade Away When The Mouse Is Rolled Away?

May 18, 2007

I use Flash MX 6.0

1) I have a button and when I put cursor over it, it must start looping a sound. When I drag away, the sound must stop. I would be even cooler if it was possible to make the sound fade away when the mouse is rolled away. I have no problem creating another sound file that fades my current sound away.

2) I have a button which represents a knife, that should stab something (a panel) once pressed. So fist the knife must be clean. but after one or more presses, the blood should remain as a movie clip (as I want to animate the dripping blood)

3) once rolled over a button, the sound must start looping (as I wrote in 1.) AND the knife should slowly go backwards (MC). BUT when I roll mouse away, the sound fades away (as in 1. again) PLUS the knife should slowly move back to its place in stead of just jump from one place to another.

View 1 Replies

ActionScript 3.0 :: Loads But Won't Play Till Manual Page Reload?

Sep 22, 2009

My "train of albums" loads but won't play until I reload the page. I want to keep the bitmaps in memory if the user comes back to the page. bitmaps are 100k jpg's.

The Action Script 3 asks "if the albums are already in memory" start the "animation" if not, start loading.

Code:
if (theAlbumArray.length < albumArray.length){
LoadAnAlbum(); // starts loading art
stage.addEventListener (Event.ENTER_FRAME, fillBuffer);

[Code]....

View 1 Replies

IDE :: Add Sound - Sound To Play On The 'Over' State

Mar 6, 2009

I'm trying to add sound to some buttons. It's just a little metallic 'klink' sound that plays on rollover. I only want the sound to play on the 'Over' state. So I've set up a layer (just for sound) for the button and I add my sound in the 2nd frame (the Over state). Everything is cool. All is good. And the sound plays on rollover. But the sound also plays when I click the button (i.e. it also plays on the "Down" state). Why? The Down state keyframe is completely empty. What's going on here? I've only put the sound in the "Over" keyframe, why does it also play in the "Down" frame (or when I click)?

View 1 Replies

Professional :: FLV To SWF To HTML - Loads The Background Color Of The Flash File But It Doesn't Play The FLV?

Nov 26, 2010

I made a 'movie' in Premiere and exported as FLV., Its suppose to be a banner on the top of a web page. The site was made with Dreamweaver. When played locally, the banner does great. When I put it on the server, thats a different story. I can tell thats something is there because it loads the background color of the flash file but it doesn't play the FLV.

View 1 Replies

ActionScript 2.0 :: LoadVars() - Text File Loads Properly And Displays The Title Of The Mp3, But It Won't Play The Mp3?

Oct 22, 2005

I have on one file (player1.fla), a movie that plays MP3s from an array, which I specify in that movie. The code for that works just fine.I've duplicated the file and renamed it to a different one (player2.fla) so I could load the MP3s from a variable (array) on a text file. This way, to add more songs, all I would have to do is update the text file.

I changed the code around a tiny bit in the "player2.fla" file to accomodate for loading a text file, but nothing more.*My Problem* The text file loads properly and displays the Title of the mp3, but it won't play the mp3.The text file looks something like this: (just an example)

Code:
&songs=song1.mp3, song2.mp3, song3.mp3
&songTitles=my song1, my newer song, the third song

My script is very similar to this: (shortened; just an example)

Code:
lv = new LoadVars();
lv.onLoad = function() {[code]......

View 3 Replies

ActionScript 2.0 :: Play Sound Like "stop All Sound" Option In Flash?

May 17, 2003

I want to use a sound loop in my flash movie. The movie has many scenes. And the problem is that when I go to next scene or different scene I hear the sound repeating twice. I mean sound does not stop from first scene and begins from the different scenes.Is there any way to play sound like "stop all sound" option in Flash.

View 6 Replies

ActionScript 3.0 :: Play A Sound File And Show The Progress Of The Sound File Being Played

Mar 16, 2009

I have to play a sound file and show the progress of the sound file being played. I am using import flash.media.Sound; import flash.media.SoundChannel; But the PROGRESS event gives theprogress of loading of file. I want to know of much of the song has been played and how much more is left.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved