ActionScript 2.0 :: Sound Plays Several Times During Hittest Instead Of Once

May 9, 2010

I posted a previous thread on this but i have found the problem but cant fix it!!

i have balls that can be thrown around the screen and when they touch i want them to play a specific sound to those balls.[code]...

View 0 Replies


Similar Posts:


Actionscript 3 :: Sound Plays Multiple Times At Once?

Apr 10, 2012

I'm having trouble with sound in Flash. I may have went about coding the wrong way, because most of my codes are on frames.

So, I have these two variables

var outsideDay:Sound = new daysong();
var outsideNight:Sound = new nightsong();

And I want to play these songs on a specific frame. However, the sounds play sporadically, like 50 times at once. I think it's because I have other codes that link to the frames with a Enter_Frame function. How can I get the sounds to loop and not play multiple times at once?

View 1 Replies

Actionscript 3.0 :: Movie To Loop - Movie Plays A Certain Number Of Times Then Plays The Opening Of A Screen Then Stops

Aug 30, 2011

I want my movie to loop. Would prefer an If/Else loop so that the movie plays a certain number of times then plays the opening of a screen then stops. This is a simple 4 screen ad I am doing for a school project. Can't get it to work. I tried containing my code in the proper loop syntax, didn't work. Then wrapping the loop in a function and calling that with a timer event, didn't work. My final solution was to call my whole movie in a timer event set to play once. Then calling the entire movie again in a second timer event set to play 20 times and set to start at an interval when the first movie ended. This did work but each time the movie plays thru function calls drop off making the movie degrade.

[Code]....

View 5 Replies

Actionscript 3 :: SoundTransform Is Muting The Sound But Sound Still Plays

Apr 6, 2010

I am using the following code, in the last line when I play the sound I can still hear it even when I have transformed it to 0.

[Code]...

View 1 Replies

Button Plays Sound Twice

Nov 28, 2009

In my flash game, every time you click a button, it plays a short sound. Almost all of the buttons work - Except for a few random handful. Those couple play the sound twice. I don't know why either - I double checked everything.None of the frames have sound. The buttons that play twice are only set to play once. I didn't do anything different between the ones that worked and the ones that don't work.

View 2 Replies

Professional :: Site Sound When .FLV Plays

Apr 18, 2011

I have a Flash 8 site that plays a music clip throughout the site.  I have a flv video on one of my site's pages and would like to know if there is a way to stop the site's music when the user clicks on the "Play" button of the video and to have the site music start again when the video either ends or the user clicks on stop.

View 1 Replies

ActionScript 3.0 :: Sound Still Plays When Unloading Swf?

Oct 26, 2009

We have 4 buttons, each calls a different swf. Cannot get one swf to unload audio when another is called.Have tried many scripts but none work. Still hear audio of previous swf on top of newly-loaded swf. This was never a problem in AS2 but too late to go back to AS2, must resolve in AS3.I read that this is a bug but everything I have tried does not work. Have been using UILoader to get position accurate x=150, y=40.

For loading have tried List, UILoader, addChild, etc. Don't know which is best to use so it can be unloaded.

View 4 Replies

ActionScript 2.0 :: Sound Only Plays On Timeline

Nov 20, 2009

sound it only works when placed on timeline. Im pasting the as where im using so that anyone can maybe see a solution. One thing to note, my swf is being loaded by another swf, ok...?

[Code]...

View 1 Replies

HitTest Was Playing The Sound Over And Over?

May 20, 2009

I have a playhead that moves across the screen and when it hitTests a movie clip it plays a sound. all is working fine except that it will only work the first time it is played. The playhead is controlled by a button. I am working in Actionscrpt2. Here is the code on the movieclip:

onClipEvent(enterFrame)[code]....

In the begining I was having trouble because the hitTest was playing the sound over and over but the above code sorted that out. I think that the new problem was created by fixing the old one.

View 7 Replies

30 Buttons With Sound But Only Plays The Pressed Ones In Sequence?

Jun 12, 2010

I�v build a simple flash projector to offer to my local fire department Essentially they used to in internal audio alarms to warn firefighters when there is an accident, fire, aggression, etcIn the version 1.0 they click several buttons, one to play the alarm sound, otherto announce the vehicle or vehicles that goes out, and a last one that says what is occurring.

The problem they report is that the sounds play immediately when you click in each of the buttons, and even the sound overlaps the other, which makes they click on each button and have to wait for the sound to finish and then click next. All this is normal because I associated the sounds to the buttons. What do I need to do the flash in this order in the version 2 of my projector:

1 The Fireman choose the type of alarm you want to play and click the button corresponding (but do not want the sound to play now) let's imagine that he pressed the button "alarm 1"

2 The Fireman choose (s) vehicles which are going out to the occurrence (but do not want the sound to play now) let's imagine that pressed the button "ABSC01"

3 The Fireman choose the type of occurrence (but do not want the sound to play now) we will imagine that pressed the button "fire"

4 finally the fireman holding down the "PLAY" (the green on on the top of the image) and this Makes the sounds selected to start playing in sequence, liker "Alarm 1" then "ABSC01 "and then" Fire "

Logically speaking I believe that each button must declare a variable associated with every unique sound, and then pressing the button takes the variables and plays them in sequence and without overlapping sounds.

View 1 Replies

Flash8 :: Plays A Sound In The Library On Loop?

Aug 21, 2011

i was looking into if there is anyway to work with sounds using actionscript?Basically im looking for something that

* Plays a sound in the library on loop

* stops that sound

* mute that sound (so it's still playing but cant be heard)

* unmutes that sound

the idea is so i can spread out this in scripts instead of in the frames.

View 1 Replies

Flash :: Plays Unwanted Sound On DOWN Event?

Feb 27, 2011

I'm newbie in flash. I have created a button - it looks perfect. I got seperate keyframes for UP, OVER, DOWN and HIT events. The OVER (and only it) has assigned the sound. The problem is flash plays sound (assigned to OVER) for DOWN event (no sound assigned). I have no idea what is wrong, tried everything with this. I am unable to find soultion,

View 2 Replies

Php :: Test If A Flash Animation Plays Sound With PHP?

Oct 25, 2011

I'm developing a web app with PHP and I need to test if a page of a website has background music. As many of you already know, this is the list of the tag (I miss someone?) where the background sound can be inserted in a webpage:[code]While checking if there's background audio because of the presence of the tag bgsound or audio is easy to do, testing if a flash animation has the sound is not so easy (at least for me).I know that I can check if a tag embed has in the src attribute something like sound.mp3 but how can I test if the sound is totally embedded in the flash animation?I searched a lot to find an answer but unfortunately I've not found one.

View 1 Replies

ActionScript 3.0 :: Sound Plays When I Click Button

Aug 4, 2010

I have a movie clip with a sound at the beginning of my project, and when I click a button in another scene it starts playing the voiceover from that clip. I don't have the button linked to that clip.

View 2 Replies

ActionScript 2.0 :: Sound Overlap And Plays On All Frames?

Nov 29, 2010

the sound is place inside a movieclip timeline on the first frame. its about 600 frames long the sound. the main timeline were the movieclip is situated is only 1 frame long. The main timeline is 50 frames long.I thought if the movieclip was not on the frame the sound wouldnt play.

i have an issue with the sound in the game.ive place a soundtrack on the first frame. its a long sound track. over 600 frames long. I place the sound inside a movieclip due to a large size. My issue i have is it sound plays even on the frames the movieclip is not situated on.when i return to the frame. the sound starts to overlap and play twice which is a bit of a mess and a racket.

View 4 Replies

ActionScript 2.0 :: Play A Sound On HitTest?

Jul 11, 2009

ActionScript Code:
onClipEvent(enterFrame){
if(this.hitTest(_root.player)){
_root.coinsnd.play;
}
}

When the player touches the movie clip this sound will play, no errors found on this script but it doesn't work

View 3 Replies

ActionScript 3.0 :: Stop Sound On Hittest

Jun 30, 2011

when the game starts im playing a simple song, and when my character falls, the sound should stop playing.[code]if ( player_mc.fall_mc.visible && player_mc.fall_mc.currentFrame == player_mc.fall_mc.totalFrames )// here when player falls, it plays a falling sound, but the main song wont stop, and when i restart the level, the main song starts again over the current playing song.[code]

View 2 Replies

ActionScript 2.0 :: Playing A Sound On Hittest?

Feb 18, 2005

Okay so i'm making this game, and I want it, so when the bar scrolls across the screen and hits the box it will play the sound inside the box mc.The code I have inside the box with the sound is.

onClipEvent (enterFrame)
{
if (this.hittest(_root.trackline))

[code].....

View 4 Replies

ActionScript 2.0 :: HitTest To Trigger Sound?

Nov 27, 2005

I'm a flash newbie working on a "game" for an architecture grad school class, using 2004 MX and and a Flash 8 demo. The game is a player in a street scene, where the user moves the player around with the arrow keys, and the up and down keys also zoom in and out. That part is working okay. My other objective is that when the player collides with any of the bulding facades, text describing the building would pop up, and a sound would be played. This is where I'm having trouble. I'm having some success with using hitTest to keep the player contained within the buildings, but great difficulting trying to get sound to play or text to appear when the player collides with a building front.

I converted one of the building facades on the "obstacles" layer to a movie clip ("snare3_mc"), with export to actionscipt checked. I'm trying to reference this movie clip in the "actions:Frame 1" code to play a sound when the player collides with it, and I'm also doing a test to see if it works by having it trace some text. I can get the trace to work for the "obstacles" layer with the buildings, but not specifically for the "obstacles.snare3_mc" facade (the green one). If I change line 123 of the code from "obstacles.snare3_mc" to just "obstacles", the trace text works, but I hope to have it specifically address the green building, not all of the buildings. Somehow I must not be properly loading or properly referencing the green object, my "snare3_mc" movie clip. Any ideas?.

Beyond not being able to specifically address the "snare3_mc" in the code to get the hitTest to even work, I can't get my audio clip to play no matter what I try. I'm trying to make the player's collision with this movie clip trigger the "snare3.wav" sound, but to no avail. The part of the code where I'm attempting this is the same hitTest with the trace text, lines 123-128 of the "actions:Frame1" code. Again, I'm probabl-y improperly loading or improperly addressing the sound in code.

The one other thing I want to do is to try and make text pop-up in a hidden box when the player collides with the green facade ("snare3_mc"). Ideally this text would appear out of nowhere when the player is in collision with the green facade, but dissapear entirely when the player moves away from the facade. I haven't even tried this yet in my .fla, but would want it as part of the same hitTest referred to above, lines 123-128.

Attached are 2004 MX and Flash 8 .fla files of this rough, ugly test version of my game.as the semester is winding down and my professor is not so into Flash or games. I feel like I am close, but really need help with these three little issues: properly referencing movie clips in the code for the hitTest, making the hitTest play a sound in my library, and making the hitTest pop up a text box with text while the player is colliding with the building facade.

View 1 Replies

ActionScript 2.0 :: Playing A Sound On Hittest

Feb 18, 2005

Okay so i'm making this game, and I want it, so when the bar scrolls across the screen and hits the box it will play the sound inside the box mc.

The code I have inside the box with the sound is.

onClipEvent (enterFrame)
{
if (this.hittest(_root.trackline))
{

[Code]....

View 4 Replies

Flv - Flowplayer Flash Component Plays Sound But Not Video?

Jan 17, 2010

The flow player will play the audio of a *.flv, but doesn't play the video and I've no idea why. The initial example page using the default flowplayer flv url works fine. When I change the url to my godaddy site, it doesn't work. I'm using Movavi Video Suite 8 to perform the conversion to flash from mp4. I think the metadata is included in the flash file when it converts, but I'm not certain. I used the meta data injector found here: [URL] to inject meta data into the flash files and it still did not work.

Also of note is that the player's progress bar shows the start, current, & end time values of the video, so I think the metadata is there. I've still no clue why this isn't working, though.

I wonder if it's my *.flv file as the player will load the mp4 file it was generated from. I used a premium application called MOVAVI Video Suite to perform the conversion. I don't think this is the case because I can upload the converted *.flv file to youtube and it plays fine.

Also worth noting is that the Flow Player plays audio and not video both when the flv source is pointed to my godaddy site as well as when its pointed to a local folder on my hard drive that contains the player, it's files, the video files, and the example .html page being used to test this.

Possibly something else worth mentioning is that I have not put the flow player files on my godaddy site yet because the video picture isn't showing locally.I have the same issue with the LongTailVideo player.

Here is the html for my test page:

<!--
include flowplayer JavaScript file that does
Flash embedding and provides the Flowplayer API.
-->
<script type="text/javascript" src="flowplayer-3.1.4.min.js"></script>

[code].....

View 2 Replies

ActionScript 3.0 :: Sound Only Plays When Clicking On Pause Button

Sep 2, 2009

All my sounds work however, the play button only seems to play my sound when I click on the pause or stop button first! Plus, my stop button acts like a pause button, it doesn't start the song from the beginning once it stops. [code]...

View 3 Replies

ActionScript 3.0 :: Got A Toggle Button That Plays Sound When Clicked?

Jan 3, 2010

So I got a toggle button that plays sound when clicked, now I need it to stop playing sound when clicked again.

[Code]...

View 1 Replies

ActionScript 3.0 :: Volume Gets Two Times Louder On Playing Sound

Jan 21, 2011

When I try to play a sound via Actionscript repeatedly, it gets louder when you do it really fast. The crux of the code that did this is pretty simple:

Actionscript Code:
buttonGreen.addEventListener(MouseEvent.MOUSE_OVER, reactionGreen);
private function reactionGreen(e:MouseEvent):void{
blob = new blob_cls() as Sound;
blob.play();
}

I made a .swf that shows what's happening. If you roll your mouse over the button repeatedly, you find the sound getting pretty loud. [URL]. My webpage isn't very stable, so this might be better. The volume seems like it could go up to 2 times louder than it originally is..

View 2 Replies

ActionScript 1/2 :: Play A Sound Once If HitTest Is True?

Dec 31, 2010

I have 2 movieclips with instance names: bonus and platform. (and a movieclip inside platform with instance name: hit) I need a sound to play when hitTest is true.
Here is non-working code:

[Code]...

I dont see why this doesnt work. The sound is in the library with linkage name: snd50Points The trace("hit"); doesnt give an output when they do collide. I have a seperate hitTest that does give an output however, could this mean I cant have a hitTest of the same thing at once? I cant delete the onEnterFrame loops of the other hitTest because it has code that needs repeating. So yeah, I need a sound to play once when they collide and play the sound once again when they collide and so on.

View 5 Replies

ActionScript 3.0 :: Sound - When Press Stop Then Play It Only Plays From The Last Pause And Not The Beginning

Apr 26, 2009

i'm habing abit of problem with this code, its supposed to play pause and stop, the problem being that when i press stop then play it only plays from the last pause and not the beggining how to get it to play from the start after the stop button is pressed

[Code]...

View 1 Replies

Professional :: Button Over Sound Plays Again Before Button Down Sound

Apr 15, 2010

I've assigned a sound to the button over frame and a different one to the button down frame. When i over over the button the button over sound plays. When I then click the button, the button over sound plays AND the the sound I put in the button down frame plays.

View 8 Replies

ActionScript 3.0 :: Use A 'master' Sound Instance ,that Can Play Multiple Times Simultaneously?

Jul 27, 2010

Imagine this scenario:The application is a Game, where the enemy characters can 'attack' the player, and each time they attack the 'Attack.mp3 file is played from the libraryNow my question is, if I have to create a new instance of the MP3 file in the memory, each time playing it, or can i use a 'master' Sound instance ,that I can play multiple times simultaneously.(similarly I can use one 'enemy.jpg' bitmapdata, that I can then copy to the screen with copyPixels, and only having it in the memory just once )IE if i have 50 'Enemy' characters running around the game

View 1 Replies

ActionScript 2.0 :: XMLsocket - Make A RSS Reader In Flash That Plays A Sound When The RSS Feed Is Changed

Jul 31, 2006

What I try to do is make a RSS reader in flash that plays a sound when the RSS feed is changed. In an older version I reloaded the xml via a little timer, but what I understand about this socketthingy is that it keeps an open connection with the server/feed? Am I correct that this socket parses data (or smth) as soon as the xml changes ? If yes, why dont this work ? (it does after loading, but not if the swf is running and the xml is changed)

[Code]...

View 2 Replies

ActionScript 1/2 :: Make A Flash Application Which Will Record The Sound Or Else Just Grabs The Voice Input And Plays It?

Oct 1, 2007

i want to make a flash application which will record the sound Or else just grabs the voice input and plays it..!

View 7 Replies







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