Actionscript 3.0 :: SOUND_COMPLETE Event Will Not Fire

Sep 28, 2010

Working on an mp3 player that i have cobbled together myself, bit rusty on the as3 so im sure it could be improved in many ways but the it works apart from that i cannot get the SOUND_COMPLETE event to fire at the end of a track, thus playing the next track. I have looked on this forum and others but cannot seem to get this to work

[Code]...

View 6 Replies


Similar Posts:


IDE :: SoundChannel.SOUND_COMPLETE Won't Fire

Jan 12, 2009

i have a little flash-player with a playlist and so, it plays normally a vlc-mp3-stream but has an extended prelisten-function (wich plays the mp3's directly via http, secured with a password)i've got an array with 2 Sound()-objects (for preloading purposes), the code looks like this :

Code:
playStream = url=="";
if (playStream) {
SoundObjects[SN].load(new URLRequest("http://" + URL + ":8001/MIRstream.mp3?" + Math.random()), sloader);
} else {

[code]....

this works for the vlc stream (which is not continuos), but not for the mp3s on the http-server in my opinion, this doesn't makes sense..except, maybe the recent CSRF-hardcore-paranoia [URL]

PS: i use AS3 with flex_sdk_3.2.0.3794 and flashdevelop (i activated flash10-support, but it still works in fp9)

View 1 Replies

IDE :: SOUND_COMPLETE Event Does Not Trigger?

Jun 6, 2007

I am working with a short vocal track and when the audio ends I would like a replay button to appear. The codes should work fine, no errors appear. Trace displays nothing...Here is some of the code:

var clip = "testClip.mp3";
//Create the Sound & SoundChannel Objs
var soundReq:URLRequest = new URLRequest(clip);

[code].....

View 5 Replies

ActionScript 3.0 :: SOUND_COMPLETE Event Does Not Trigger?

Sep 18, 2010

This should be easy but I can't figure out. The sound is playing which means the mp3 file was successfully loaded but SOUND_COMPLETE event does not trigger

Code:
private var soundReq:URLRequest = new URLRequest("blabla.mp3");
private var sound:Sound = new Sound();

[code].....

View 2 Replies

ActionScript 3.0 :: Getting The SOUND_COMPLETE Event To Trigger?

Oct 4, 2011

I'm trying to run some simple code for a Flash slideshow involving the SOUND_COMPLETE event.All I'm trying to do is to get to the next frame where my nav buttons show up after the current audio file plays completely.I'm aware that new Sound Channel object is returned after the audio file plays and a new eventListener is required, but I've inserted a new listener in every place imaginable and I still can't get this to work.Here's my code.

var soundReq:URLRequest = new URLRequest("Slide_1.mp3");
var sound:Sound = new Sound();
var oneSoundChannel:SoundChannel = new SoundChannel();[code]...........

View 3 Replies

ActionScript 3.0 :: SoundChannel Event.sound_complete Not Working?

Mar 4, 2010

For some reasons, my soundchannel event.sound_complete is not working. Basically, my class is to import sound into it and to allow use to change their volumes and the speedness of the sound.
 
This is the tutorial for the speed [URL]
 
Right now, what I want to do is to auto loop back the song once the song have finished play but I have having troubled doing it.

[Code]....

View 5 Replies

ActionScript 3.0 :: MovieClips To Change On Sound_Complete Event?

Sep 19, 2011

I have a playlist menu made up of movie clips acting as buttons, one clip for each track from a CD. The user clicks on a button, a corresponding sound clip plays and the movie clip button the user selected switches from frame 1 to frame 2 to change color while the sound is playing to show which track is currently playing.

Using an array to store the music tracks (named "Track 01" to "Track 08") and a "switch" command, my user is currently able to select and listen to a given track. My current problems lie with presentation.

I am having two problems with this project:

1. If the user allows the track to play through to the end, I need a single function to be fired on the SOUND_COMPLETE event (and I have applied the appropriate listener to my sound channel) which will reset the button to frame 1, as a visual indicator that the track has stopped. I have been unable to come up with such a function as yet.

Currently, the selected button just stays yellow (frame 2) instead of turning white (frame 1), and the user has to click twice (instead of once) to make the track play again.

2. My playlist includes a "play all" function to play all the tracks through in sequence as laid out in an array. While the track sequence plays fine, I would like to have the corresponding button for each track jump to frame 2 while that track is playing, then back to frame 1 when the track stops.

View 0 Replies

ActionScript 3.0 :: Looping Mp3 File And Event.SOUND_COMPLETE

Jul 3, 2007

I am trying to find a workaround to the problem of looping mp3 files, basically the silence in the transition (from end to start). I could use wav files but I need to load the file externally, which makes not possible to use wav. So I did this

HTML Code:
var channel:SoundChannel = myMp3.play();
channel. addEventListener (Event.SOUND_COMPLETE, onComplete);

[Code]....

Edit: Now I know it is not a problem of flash, it is problem of the mp3 format itself.

View 7 Replies

ActionScript 3.0 :: Flash Event.SOUND_COMPLETE Not Working 2 Well?

Feb 10, 2011

I have a movie that has a bunch of animations on diferent scenes the problem is that I need my movie to wait for my sound to finish before it goes to the next scene, when I use the sound complete it works fine on the first scene but it won't go past that.

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

[code]....

View 1 Replies

ActionScript 3.0 :: Play Sounds One After Another Avoiding Overlapping Without Using The SOUND_COMPLETE Event?

Jun 20, 2010

is there a way to play sounds one after another avoiding overlapping without using the SOUND_COMPLETE event by SoundChannel? I have a few sounds to be played in order and using SOUND_COMPLETE would take me to add to many listeners.

View 3 Replies

ActionScript 3.0 :: Detect The Finished Event Listener And Fire Out Another Sets Of Event

Nov 17, 2011

if I have an event listerner (mouse, keyboard, enterframe,....event) that is being triggered, and when it finishes its event, something that is able to detect the finished event listener and fire out another sets of event.
 
It works more like MOTION_FINISH in TweenEvent, but it is only available for TweenEvent only, what if I want to detect a mousclick, keyboard, enterframe or even touch event?

View 3 Replies

ActionScript 3.0 :: Event Listeners Only Fire Off At Event Once?

Feb 13, 2010

An odd thing is happening for me, my eventlisteners only fire off once then they seem to stop working.

This thing is a movieclip that slides up the parent movieclip and another movieclip within mc slides it down. They only work once.

ActionScript Code:
slider.up.addEventListener(MouseEvent.MOUSE_UP, activateSlider);
slider.down.addEventListener(MouseEvent.MOUSE_DOWN, activateSlider2);
var frameBoolean:Boolean = false;

[Code].....

View 9 Replies

Flex :: Air - Event Will Only Fire Once

Oct 12, 2009

In an AIR application, I have a private variable and a setter:

[Code]...

The first time that I set "saveResult" the event fires. But it will never fire again unless I restart the application. If I change the setter to:

[Code]...

View 2 Replies

Professional :: Mosue_over Event Auto-fire?

Sep 8, 2010

I write a mouse_over event handler in a movieclip. But the event fired when the application run automatically even if the mouse out of the application.

View 6 Replies

Flex :: Roll_out Event Fire In Code?

May 24, 2010

I have made this short example to demonstrate some problems I'm having.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Canvas
id="buttonCanvas"

[Code]...

View 3 Replies

Flex :: Event.Complete Does Not Fire When Loading A URL?

Aug 11, 2010

I'm an experienced AS developer, but this is something very basic about flex that I can't figure out. In the class below, I'm not sure why the function imageLoaded would not be executed when the image loads a url. Is there a race condition happening here? The application is completely loaded by the time this object is created and setPicture is called. How can I get the Event.COMPLETE event to fire properly in this case?The line and Log.info functions are conveniences for me, and they definitely work. Here's my MXML definition:

<?xml version="1.0" encoding="utf-8"?>
<photo:PhotoClass xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:photo="com.xxx.widgets.photo.*">

[code]....

View 2 Replies

Flash :: How To Fire A Event For Array Push

Aug 17, 2010

How would I go about as to addEventListener for a array object. I'm trying to avoid running a timer every x milliseconds to check for new elements in array object, rather trying to make a event fire when new elements are detected to process them and remove them. Is it possible with Arrays? maybe ArrayCollections? either is fine.

View 4 Replies

Flex :: Does Fire An Event After A Chart Is Rendered In UI

Sep 7, 2011

I am looking for an event which is fired (if any) after a chart is rendered (visible in UI) in Flash, we are using Flex SDK 3.0. We have to capture the screenshot after the chart is rendered, current implementation adds a huge delay in update_complete event callback, this is slowing down the whole job of generating images. I tried to use EXIT_FRAME event, but this doesn't seem to serve the purpose.

View 2 Replies

Flex :: HTML Control's Event Won't Fire?

Sep 14, 2011

I'm having trouble firing or capturing the results of an event firing.

Here's the current code...

<s:Panel id="instructionsPanel" left="0" right="0" top="0" bottom="0" title="Register">
<mx:HTML id="htmlViewer" left="10" right="10" top="0" bottom="10"

[Code].....

What's happening is that the user fills out a form in the HTML Viewer, then when they click the submit button I want to be notified of the page change.

If they land on URL A, then they'll be shown one message. If they land on URL B, they'll be shown another.

However, the event isn't firing.

I've also tried COMPLETE and HTML_DOM_INITIALIZE.

View 1 Replies

Flex :: Fire Event Off YesNo Alert Box

Oct 9, 2011

This is very basic and there are samples out there, but I am still struggling.

I need to fire an alert with a yes/no option.

I need to do this in actionscript.

Alert.show("Open new tab to search in Google Maps?","No places found", Alert.YES | Alert.NO, this, alertListener, null, Alert.NO);[code]...

View 1 Replies

ActionScript 3.0 :: Fire An Event When The A Timer Reaches 0?

Jan 20, 2010

I am trying to create an if statement where when the timer reaches 0 seconds it loads level 2. It isn't working.

ActionScript Code:
private var numberOfSeconds:Number = 10;
private var myTimer:Timer = new Timer(1000, numberOfSeconds);

[code].....

View 8 Replies

ActionScript 2.0 :: Second OnPress Event Doesnt Fire

Dec 19, 2005

I have run into an issue where when you use the onPress function, it won't register the second onPress event if the mouse doesn't move and the user clicks the same pixel. I have to use onPress, and am wondering if there is a way around this. It is just a little annoying that I have to move my mouse to have it catch that second onPress..

View 2 Replies

ActionScript 2.0 :: Fire Off A Custom Event On _alpha=0

Jun 20, 2007

In my app I fade a movieclip, and when that movieclip reaches _alpha=0, I want it to send out a signal to let another movie clip begin to fade in.

How do I do this? Is it something even remotely like:

Code:
firstMC.on(_alpha==0) = secondMC.beginFade;
???

EDIT: I don't want to put any code on movie clips -- my code all runs from the root/main timeline.

View 6 Replies

ActionScript 2.0 :: Second OnPress() Event Doesnt Fire?

Aug 16, 2010

I have run into an issue where when you use the onPress function, it won't register the second onPress event if the mouse doesn't move and the user clicks the same pixel. I have to use onPress, and am wondering if there is a way around this. It is just a little annoying that I have to move my mouse to have it catch that second onPress...

View 14 Replies

ActionScript 3.0 :: Making A Keyboard Event Only Fire Once When The Key Is Held Down?

Jan 28, 2010

this one has got me stumped. I want an object to move 10 pixels every time a key is pressed, and I don't want it to keep moving when the key is held down.And I want to know why it moves once, and then waits a bit before moving more. I do not see why anyone would want it to do that!!!

View 1 Replies

ActionScript 3.0 :: Moving Mouse Causes To Fire KEY_UP Event

Feb 28, 2009

I'm trying to make as3 application which uses custom mouse pointer while pressing spacebar on my keyboard. Everything works fine when I don't move my mouse but when I do the KEY_UP event is dispatched to my listener almost immediately (and this is while I'm still pressing my key down). Below is simple main class which used to test this behaviour:

[Code]...

View 14 Replies

ActionScript 1/2 :: Fire Click Event To A Swf Loaded Dynamically?

Nov 24, 2009

I have an swf converted from powerpoint, the version is in flash 8, and i want to fire a click event on that swf to advance in the slides, how can i perform this action?

View 4 Replies

ActionScript 1/2 :: Use Set Interval To Fire Event Every 5 Seconds When If Statement Is Met?

Aug 2, 2010

Here is an extract of code from something im making:
 
if (MC_battleTrigR1a.hitTest(this._x, this._y, true)) {
if (random(220) == 0) {
//random(220) the code is onEnterFrame and so this random function is called

[Code]....
 
The player walks into an area, within a random amount of time or after 5 seconds it should send the player to the frame labelled: battle It works with the random(220) but I dont know how to make it definetly go to frame: battle after 5 seconds. I dont know how to use setInterval correctly, I have tried and failed.The code is nested in onEnterFrame fps:  24 frame label: treePath frame number: 17

View 3 Replies

Flex :: Embedded Button.swf Does Not Fire CLICK Event?

Aug 9, 2010

i'm trying to embed a swf to my as3 flex project like this:

[Embed(source = "../assets/next_button.swf")]
[Bindable]
protected var nextButtonClass:Class;
protected var next_btn:MovieClip = next_btn = new nextButtonClass() as MovieClip;
// ...
next_btn.addEventListener(MouseEvent.CLICK, onAdChange);

next_button.swf is as2 and created with adobe flash cs4. there is a single button inside it.

if i change type of button symbol to movieclip at next_button.fla, there is no problem at passing CLICK event.

i tried to cast next_btn to mx.controls.Button and fl.controls.Button classes, next_btn is becoming null in that case.

by the way button is reacting mouseover and click events properly just doesn't pass it to upper swf.

is there any trick i can do to pass Button events to my container swf?

View 3 Replies

Flash :: FileReference Doesn't Fire SELECT Event?

Apr 4, 2011

I have the following code. The problem is that neither SELECT nor CANCEL event never fired after i choose a file through browse dialog.

I have MacOS 10.6 and FlashPlayer 10.

[Code]...

View 2 Replies







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