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


Similar Posts:


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 :: 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

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 :: 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 :: Looping Through Event Object?

Jul 3, 2010

Why can't I loop through an event object that is handed as an argument to a handler function?

ActionScript Code:
myObject.addEventListener(MouseEvent.MOUSE_DOWN, myMouseEvent)
function myMouseEvent (event:MouseEvent){
trace ('event is ' + typeof (event));

[Code]......

The event argument is classed as an 'object' but it doesn't seem to act like an object...

View 5 Replies

IDE :: Looping And Adding Event Listeners?

Apr 5, 2009

Im just trying to add an event listener to all of the objects in an array I have posted my error and the code below.

error:
TypeError: Error #1006: addEventListener is not a function.

code:
mainMenuArray = new Array([introButton], [photographyButton], [graphicsButton], [contactsButton], [projectsButton], [linksButton]);
private function firstMenuListeners()

[Code]....

View 1 Replies

ActionScript 3.0 :: Looping FLV (event:NetStatusEvent) Trigger?

Nov 3, 2009

why my function "replicaLoop" doesn't run?? I'm sure the function will work but it's not running

var replicaConnection:NetConnection = new NetConnection();
replicaConnection.connect(null);
var replicaStream:NetStream = new NetStream(replicaConnection);
replicaStream.play("replica.flv");
var replicaListener:Object = new Object();
[Code]....

View 4 Replies

ActionScript 3.0 :: Looping Frame Breaks Mouse Event?

Apr 28, 2011

I have a picture of a van moving on its x and y in relation to the mouse movement on screen..

stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMovement);
function mouseMovement(e:MouseEvent):void{
van.x = (mouseX/20) + 490;
van.y = (mouseY/20) + 285;

[Code].....

View 1 Replies

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

ActionScript 3.0 :: Looping - Clickable FLV Preview - Click Event Not Being Recognized

Apr 10, 2009

I have tried the following code to create a thumbnail preview that loops and is clickable to go to a new page with a video gallery. The video plays anbd loops, but, it does not seem to recognize the mouse click i have a trace that isn't being triggered an nothing happens. code is below.

[Code]...

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

Looping A Layer Within Fla File?

Jul 22, 2009

Im having trouble getting my head around writing script for looping certain layers of a fla file.I have a project that I urgently need to finish and can't figure out how to achieve what I need.I have an fla file that has several animated layers.I want layer 1 to play once and stop while continuing to be visible (which I have achieved).I then need to play layer 2, layer 3 and layer 4, and loop these layers continuosly without relooping layer 1.

View 2 Replies

Can't Stop File From Looping

Jul 2, 2009

I created a small Flash movie that I want to end at the last frame. Instead it keeps looping and starting from the beginning. This is the link: [URL] At the end of each timeline I inserted a keyframe and added the action: stop(); But this doesn't seem to have any effect.

View 1 Replies

Professional :: Looping The .swf File?

Dec 9, 2010

I'm having a problem with a .swf file created in Flash CS3. I want it to loop, which it does when I Test Movie in Flash, or when I play the .swf file in the Flash Player. But when I upload to my web space it stops looping.
 
I used the follwing script in the last frame of the file to create the loop:
 
gotoAndPlay(1);

View 4 Replies

Html :: Swf File Not Looping?

Aug 6, 2010

I'm working with a swf file (a simple flash movie) and I am trying to get it to loop. I've tried setting loop="true" in the embed tag, and for the object.

Does this mean that the problem is in the swf file itself?

View 1 Replies

Looping A Layer Within Fla File

Jun 29, 2009

I am very new to flash CS4 and am having trouble getting my head around writing script for looping certain layers of a fla file.I have a project that I urgently need to finish and can't figure out how to achieve what I need.I have an fla file that has several animated layers.I want layer 1 to play once and stop while continuing to be visible (which I have achieved).I then need to play layer 2, layer 3 and layer 4, and loop these layers continuosly without relooping layer 1

View 3 Replies

GotoAndPlay - Flash (SWF) File Not Looping

May 7, 2009

I'm new to this actionscript stuff and I'm having trouble making my swf file loop over and over. I have several movie clips in my scene and in the last movie clip, in the "actions" layer, in the last frame, I put "gotoAndPlay(1);" hoping that this would make the file loop over and over.

Instead, I get a error message:
1120: Access of undefined property social_media_mc.
How I can make my swf loop over and over?

View 2 Replies

Flash :: Create Looping Swf File From Mp4?

Jun 6, 2011

I am having a problem where i am trying to get a swf file to loop. I am starting with a mp4 of a slideshow i have made.
 
I can import it to flash and export it as a .swf file but it does not loop.
 
Does anyone know of a way to get it to export a file that loops?

View 11 Replies

Actionscript 3.0 :: Looping A Layer Within Fla File?

Jun 29, 2009

I have an fla file that has several animated layers.I want layer 1 to play once and stop (which I have achieved).I then need to play layer 2, layer 3, layer 4 and loop these layers continuosly without relooping layer 1.

View 6 Replies

ActionScript 2.0 :: OnPress And Looping XML File

Dec 5, 2007

I'm having a problem with my onPress actions when reading them form an XML file. Here's what I'm trying to do: Read xml file: duplicate movie clip according to how many xml items there are. Place a different onPress action to each movie clip according to what the corresponding path is in the xml. My problem is that each time I press any movieclip I always get the last path in the xml file. The loop is over writing the value and when the onPress function is called it uses the last value. How do I get the onPress to remember which movie clip it is and use the appropriate onPress action?

Here is my code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var Portfolio:XML = new XML();
Portfolio.ignoreWhite = true;
Portfolio.onLoad = function(bSuccess:Boolean):Void {
[Code] .....

View 3 Replies

HTML :: Parameters Added But SWF File Not Looping

Mar 22, 2011

I have a .swf file that is not looping although I have added the parameter to do so. It plays just the once, and at the end of the video it stops instead of looping.
<div id="video">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="211" height="316" id="FLVPlayer" style="visibility: visible; ">
<param name="movie" value="FLVPlayer_Progressive.swf">
<param name="quality" value="best">
<param name="wmode" value="opaque">
[Code] .....

View 1 Replies

ActionScript 2.0 :: Reading Messages From A XML File And Looping Through Them

Dec 22, 2006

I have done before, but unfortunately no longer have the FLA file. The idea is to have a web page header that has some eye-catching animated messages that keep changing to the next one after a few seconds.

An XML file (header-messages.xml) contains one line per message, and also a hyperlink, see example below

<?xml version="1.0"?>
<config>
<message1 lineOne="Special offer on red widgets" hyperLink="/special-offer.htm" />
<message1 lineOne="Read our latest news" hyperLink="/latest-news.htm" />

[Code].....

View 1 Replies

ActionScript 3.0 :: How To Stop Looping An External .SWF File

Dec 20, 2010

How can I stop my Logo.swf file from looping. Actually the external Logo.swf file doesn't contain any looping code inside it. If I open it in any flash player it animates only one time. Writing "stop();" in code stops all other animations which I don't want.

Code:

var J:Loader=new Loader();
addChild(J);
J.load(new URLRequest("Logo.swf"));
J.x = 275;
J.y = 25;

[code].....

View 1 Replies

ActionScript 1/2 :: Stop Looping File At Specific Frame?

Oct 19, 2011

Ive created a banner ad in AS 1.0-2.0. The ad can only loop 4 times then it must stop. The following code does this at frame 170. The timeline is 170 frames in length, and this code is keyframed on an actions layer on frame 170 - however, I'd like the final stopped flash swf file to occur at frame 155. I can't just put this code on frame 155 - it skips a whole section of  animation (from frames 155 to 170) that I want to keep in the loops. 
 
loop = loop + 1
if (loop < 4) {
this.gotoAndPlay(2);
} else {
this.stop();
}

View 3 Replies

ActionScript 3.0 :: Get Flv File Looping Within The Swf - Access Of Possibly Undefined Property

Jun 5, 2011

I want to get my flv file looping within the swf. I've used the FLVPlayback Component. I've given the flv file the instance name of "vid". Actionscript is as follows:

import fl.video.*;
vid.addEventListener(VideoEvent.COMPLETE, rewind);
function rewind(eventObject:VideoEvent):void {
vid.autoRewind = true;
vid.play();
}

The error message I get at runtime is: 1119: Access of possibly undefined property COMPLETEthrough a reference with static type class.

View 3 Replies







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