ActionScript 2.0 :: Sound Trigger Buttons Not Working?

Jul 28, 2010

First check this website:Go to the sound menu, and try to play any of the songs. Try the first one, than try it from the bottom.You will notice, that for a few seconds the buttons are not working. After a while they just start function.The Actionscript is on the "playBtn_mc":

var my_sound5:Sound = new Sound();
my_sound5.loadSound("zene5.mp3", false);
play5_b.onPress = function() {

[code]......

View 0 Replies


Similar Posts:


ActionScript 1/2 :: Sound Isn't Working With Control Buttons

Apr 10, 2009

I have a scene with a voice over. I have split the voice over in to multiple sound files (mp3). The voice over plays correctly as long as you don't use the btns. When the forward btn is used the the file goes to the correct frame in the timeline but won't play the sound. Next issue, after pausing then using play the scene plays but without sound.

[Code]...

View 5 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

JavaScript :: Link To Trigger Sound Click

Sep 7, 2011

I want a link to trigger a sound click in flash AS3. I've taken the .play() outside of the function to confirm that it works by itself. What am I missing that will let me call an AS3 function from javascript?

Here is my html
<object width="5px" height="5px">
<param name="movie" value="play_coin_sound/playCoin.swf?v=5">
<param name="wmode" value="transparent">
<embed src="play_coin_sound/playCoin.swf?v=5" width="5px" height="5px">
[Code] .....

View 3 Replies

ActionScript 3.0 :: Sound Streaming Event Trigger?

Apr 18, 2011

I'm streaming an external MP3 (around 3 mb file) with the following method:

ActionScript Code:
import flash.media.Sound;
import flash.media.SoundLoaderContext;
import flash.net.URLRequest;

[Code].....

With that i have no problem, where i am completely lost is the possibility of triggering an event after de 15 seconds (first parameter of SoundLoaderContext) are loaded, ie, adding an event listener or something like that.

View 2 Replies

ActionScript 2.0 :: How To Use Playing Sound To Trigger Event On Completion

May 27, 2009

I'm trying to use a playing sound to trigger an event when it finishes:
onSoundComplete = function(){
redbtn._alpha = 100;
redbtn.enabled = true;
}
I have the button fading and disabling nicely (on (release)) but when the sound stops playing, I need them to return to alpha 100 and enabled=true. It doesn't work but there's no error generated either.

View 1 Replies

ActionScript 3.0 :: Trigger An Event When Any Sound In A Soundchannel Completes?

May 3, 2011

I have a soundchannel, and I'm playing a lot of sounds in it, but I need the completion of any sound file within that channel to be followed by a wait of two seconds, then trigger an event. How can I do this?

View 4 Replies

ActionScript 3.0 :: Getting Good Collisions Between Balls And Also Using Hit Tests To Trigger Sound

Apr 29, 2010

im building a sound toy that has four balls that can be thrown around and will bounce of each other. when each ball collides i have a chord to be played through a hit test for each pair. im having a problem with getting good collisions between balls and also using hit tests to trigger sound.

View 1 Replies

ActionScript 3.0 :: Make All Button Component Instances Trigger RollOver Sound?

Dec 18, 2008

I am using the Button component (the one shipped with CS3) inmany places in my AS3 project. I am coding in .as files, not on thetimeline.I have skinned the Button to use the colors I like. Now Iwish to "skin" it so that all instances generate a rollOver sound,and I'll be darned if I can figure out how.I know I can listen for ROLL_OVER events in each Buttoninstance. But I have many many Buttons and it seems kludgy to addthat same code to every class I have which tracks a Button. I amhoping there is some way I can make *all* instances of Buttonrespond to rollOver the same way. I am hoping it is likesetComponentStyle or changing the skin for the Button; I can do itin one place and it works everywhere.I guess I can listen on the Stage level for bubble-ups ofROLL_OVER, trap those that come from Button instances, and handleit from there, but stagewide listeners also seem a tad kludgy

View 1 Replies

ActionScript 3.0 :: Sound Detection And Visual Output - Trigger A Video When It Hits A Certain Volume

Dec 15, 2011

So i found a code on the adobe site which pics up input from the mic. I need that to trigger a video when it hits a certain volume. I'm a complete novice to AS3 and i need this for a proof of concept in the morning. Here's the code that i'm using to pick up the mic -

[Code]...

View 0 Replies

Actionscript 3 :: Trigger Ajax With Flash Buttons?

Jun 7, 2011

I'm working on something where there are 2 links which triggers some Ajax. However I need to turn the links into Flash buttons (AS3).

The Ajax:

<script>
$(document).ready(function() {
$('a.catlink').unbind('click').click(function(e)

[Code].....

View 1 Replies

ActionScript 3.0 :: Buttons (mouse Over And Out) - Trigger Certain Things

Nov 3, 2011

so i've been following this tutorial on youtube about buttons and how to make them trigger certain things using AS3 Anyway, here's my code:

[Code]...

What suppose to happen is when i mouse over the button, some things appear, when the hover is off, everything goes back to normal The problem: When i mouse over the button, everything start blinking and the "some things" start appearing and disappearing while i hover over the button. When i remove aOut event and function - everything works like it should - "some things" appear when the button is hovered and stay there because there's no aOut code.

Tested the same thing using MouseEvent.CLICK instead of MouseEvent.MOUSE_OVER. When it's just by itself - works fine. I clicked the button and things appear. But when I add MouseEvent.MOUSE_OUT, nothing happens at all. The button becomes unclickable.

View 4 Replies

Flex :: Manually Trigger A Buttons Hover State?

Jul 29, 2010

I need to trigger the hover state of a Flex button programatically, so that it looks like the user is hovering over it. There is a flex page about "Manually dispatching events":

[URL]

Which would work, but what I'd really like to do is change the style of the button without having to throw an event. How can I do this?

View 1 Replies

Actionscript 3 :: Trigger A Click Of The Tabs Button - Bar Buttons

Mar 8, 2012

I have a weird thing going on with my skins. I'm hoping to fix it by doing a workaround that involves triggering the click of a sparks buttonbar button, but I'm not exactly sure how to do that.

[Code]...

View 1 Replies

ActionScript 3.0 :: Pan Buttons Are Not Working But Zoom And Reset Buttons Works

Aug 12, 2009

im working on a zoom/pan gallery and i have a problem that i can't solve.URL...the pan buttons are not working but the zoom and reset buttons works. im working on movie the image using the mouse now, if you will hold the image and move it it will drag it on stage.the image is a loader the loads and image and placed on screen.there is a mask on top of it and a frame that indicates the size of the gallery.when the user pan the image loader content i want it to stop as soon as it gets to the gallery frame,but i cant seem to find the best way to do it.so basicly when the image is in 100% i dont want the user to be able to drag it but after you zoom the user will be able to drag it but only to the edge of the frame so there wont be any white spaces.i tried a lot of different ways to do it but all of them are complicated and not working the way that i want them to work.

View 2 Replies

ActionScript 2.0 :: Sound Off / Sound On Buttons

Nov 7, 2003

I have a .swf playing some background tunes, I have the soundsOff button working, but can't find some basic action to get the sound started again?..

View 2 Replies

ActionScript 3.0 :: Buttons Stop Working After Pressing Other Buttons?

Sep 14, 2009

I have three buttons and when I click the second one, the first stops working (e.g. no trace event and it won't go back to the frame "tab1") but the third still works. Then when I press the third button both the first and second no longer work. If I take out the gotoAndStop lines, the buttons work fine. The subsequent frames simply have stops on them.
 
b1.addEventListener(MouseEvent.MOUSE_UP,b1Pressed);b2.addEventListener(MouseEvent.MOUSE_UP,b2Pressed);b3.addEventListener(MouseEvent.MOUSE_UP,b3Pressed);
function b1Pressed(event:MouseEvent){    trace("b1 pressed"); 

[Code]....

View 4 Replies

ActionScript 2.0 :: MX: Trigger A MC Then Wait Then Trigger Another?

Aug 23, 2005

I have an application done in flash- on the main Scene Level, everything has only one frame but I have MCs and the like that are triggered by actionscript.There are quite a few nested functions on the main actions layer as well as an "onEnterFrame" function that reloads XML data in the background, etc... but that is not the problem.

The problem is, that at one point, I am calling a few MCs that kind of close up a section of the page like blinds- and then I want a text to appear ontop of that now closed area... but if I just write...

Code:
_root.TimelineFader.BlendeT1.gotoAndPlay(2);
_root.TimelineFader.BlendeT2.gotoAndPlay(2);
_root.TextAboveTimeline.theMessage_txt._visible = true;

...it all happens simultaneously, of course.I guess I could check for "BlendeT1"'s (or T2's) current frame (since it's an MC)... but how do I wait while that MC runs / until it reached a certain frame? How can I keep the rest of the actionscript in the main function from continuing?

View 5 Replies

Streaming SWF With Timeline Sound Not Working?

Jun 6, 2008

I'm streaming an external SWF into another movieclip, the external SWF has a timeline animation and sound (voice speech) as well on the timeline, it also has a preloader on it which it's set up that when 30% loaded is completed to start playing the animation.But when I run the main movieclip the streaming of the external SWF works fine for the animation but the sound does not play until the preloader is 100% completed.

View 1 Replies

ActionScript 3.0 :: Sound Not Working In CS4 Flash?

Apr 28, 2011

I was trying to import sound file in mp3 format to my flash.It is working fine but after I testing the movie the sound doesn't work.

View 2 Replies

ActionScript 3.0 :: Flash Sound ID3 Not Working?

Apr 16, 2010

I am trying to use the id3 tags from second table, output display undefined..
 
var sound:Sound = new Sound;     var url:URLRequest = new URLRequest("1.mp3");     sound.load(url);     var player:SoundChannel = sound.play();     sound.addEventListener(Event.ID3, id3Listener);     function id3Listener(event:Event) {               var info:ID3Info = sound.id3;               trace(info.TIME);
trace(info.TRDA);

View 2 Replies

ActionScript 3.0 :: Sound Keep Working After Finished?

Mar 27, 2012

i did this

package{
import flash.display.MovieClip;

import flash.events.MouseEvent;[code]...

it works but only one time i wanna the sound keep working after finished

View 5 Replies

Actionscript :: Why Is Sound Not Working In Flash

Mar 18, 2010

This is what I have as far as code, it is in the first frame of the movie.

nature = new Sound(this);
nature.attachSound("sound_naturally");
nature.setVolume(50);

[Code].....

I have the sound exporting to ActionScript with the link identifier 'sound_naturally', not exported to the first frame. I don't understand why it's not working. I did like the exact same thing like 3 hours ago and it worked fine, but I lost the file so I had to redo it and now it won't work at all.

View 2 Replies

ActionScript 2.0 :: [FMX] Attached Sound Isn't Working

May 1, 2004

I have the following problem. I have a attachSound for three wav files in the library. This is the code:

Code:
song1 = new Sound();
song1.attachSound("song1");
song2 = new Sound();

[code].....

This is also working.When I press the button the music stops. When I press the song1 button, song1 start playing again. But when I press on of the othet two buttons nothing happens. This is the code for the buttons:

Code:
on (release){
_root.mc_menu.song1.start();
_root.mc_menu.song2.stop();
_root.mc_menu.song3.stop();
}

View 5 Replies

ActionScript 2.0 :: Working With Sound Objects?

Apr 7, 2003

I came accross this very comprehensive webpage about sound objects in flash mx about a month ago. Since there has been 2 or 3 threads started about working with sound just today, thought i'd share it [URL]..

View 5 Replies

ActionScript 2.0 :: Reasons For Sound Not Working?

Aug 5, 2003

firstSound=new Sound();firstSound.attachSound("****");

that's easy...did the linkage thing and it doesn't work..did it with another mp3 file and it worked fine..any idea on what can be causing this particular mp3 not to work when attached with AS?

View 2 Replies

ActionScript 2.0 :: [FMX]Attached Sound Isn't Working?

May 1, 2004

I have the following problem. I have a attachSound for three wav files in the library. This is the code:

Code:
song1 = new Sound();
song1.attachSound("song1");

[code]...

View 5 Replies

Distorted Sound On MC And Buttons?

May 13, 2009

I´ve made a couple of simple buttons and I have placed a sound on the over frame, when I export the swf the sound sometimes get very distorted and in a browser too, so I made a movieclip "button" instead and attached the sound and the same thing happens!The sound is a mp3, a short "classic" click.

View 2 Replies

ActionScript 3.0 :: Play Sound Only Once SOUND_COMPLETE Not Working?

Apr 11, 2009

I have a button that rotates a wheel 90 degrees each time the button is pressed. What I'm trying to do, is play a sound when the wheel stops at each rotation. So something like this:

Wheel rotates to 90 degrees.
90 degrees = sound #1
Sound #1 plays once.

The rotation works fine, but the problem is, when I tried to do this I put in a statement that with my wheel named "wheel" if wheel.rotation==90 play my sound. But my sound keeps looping and SOUND_COMPLETE is not firing to trigger it to stop.

[Code]...

View 4 Replies

ActionScript 3.0 :: Sound Stops Working Randomly?

Dec 6, 2009

I imported a .aif sound in to my library and gave it a class name of "Beat". I'm using this sound as a rollover effect. So I have my variable initiated at the top like so:

Code:
var snd:Beat= new Beat();
My listener's function like so:

[code].....

View 1 Replies







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