ActionScript 2.0 :: Starting And Stopping Audio Files?

Jan 10, 2007

I have 4 sets of 2 buttons (on and off):

Each set of buttons I want to trigger and stop a different audio file. (4 audio files in total)

I would like for the sound files to be saved within the .fla file.

I have done lots of searching but I still haven't been able to get this to work.

View 1 Replies


Similar Posts:


Flash - Calling The Function Within That Function And Later Stopping The Loop - Starting And Stopping Functions?

Jan 7, 2012

I am making a character walk. This code will make him wobble to the right and when thats done it will trigger him to wobble to the left and then call the function again to continue the loop.I can get the loop to work fine by calling the function but how do I STOP the function? Also I want to call it later on. Is there a way to start and stop a function?

function wobble()
{
var ws = .1;
var dis = 1;

[code]....

View 2 Replies

Starting And Stopping Video And MP3

Aug 5, 2009

I can't seem to get around my video and audio files starting when I arrive at the page. I'm even using some example code with start and stop buttons. This is in CS4 Flash. I expect it's because the ActionScript is in the wrong place because when I run the movie it flashes through all of the pages on the site without stopping at the home page. Is there some generic code that will allow me to simply swap out the name of the video or audio file I want to start. If there is, do I need to locate it on its own layer at the top of the timeline?

View 6 Replies

IDE :: Sound Starting And Stopping Across Scenes?

Oct 2, 2007

I've set a music sound to play across three scenes in my movie. However, when the user clicks to enter the fourth scene, I'd like the music to stop. Simple enough.

Here's the problem...the fourth scene contains individual keyframes in the scene where I have separate voice overs for each frame. The user navs forward or backward among the scene's keyframes using arrow buttons for forward and backward. How can I have the voice over stop playing on frame 1 if the user clicks the arrow to go to frame 2 if the frame 1 sound isn't finished playing? Frame 1 plays out until finished, even if the user has clicked to go to frame 2.

Then, on return to the main scene where the general music file played, I'd like it to resume playing upon the user clicking 'return home.'

Incidentally, I set up my sound files to play on a soundtrack timeline.

View 4 Replies

ActionScript 2.0 :: Stopping And Starting With A Button?

Nov 5, 2003

I have placed an invisible button over the tweened animation, now here's my question:Whe i click on the invisible button the animation stops and when I click on it again, it restartsSo that's it really, can this be done? I know how to stop the animation by putting a stop in the action script, so I am looking for some actionscript that works on an alternative click method if I am making myself clear? Example:

View 2 Replies

ActionScript 3.0 :: Starting And Stopping An Animation Using Buttons?

Nov 23, 2010

I'm working on an assignment for a Flash Game Programming class (1 of 2) where I have to take a pre-made animation, add start and stop buttons to it, and use AS3 to make those buttons work. I got the buttons on the .fla, but I'm having a heck of a time stopping the animation using the stop button (I haven't even done the start button yet). This course is an independent study so I'm not being "taught" anything by the instructor. I have to find the answers myself. I've asked said instructor, my former AS instructor, and several computer lab monitors for help and we cannot get the animation to work correctly. There are compile errors that come up that really make no sense. This is my last resort in regards to this assignment!

Assign1WalkCycle

Code:
function onTimerStart(evt:TimerEvent):void
{
play();
}

[Code]......

View 1 Replies

ActionScript 3.0 :: FLV Starting And Stopping At Specific Times?

May 14, 2009

Im using the flvplayback to put up a video in my swf. in my swf i also have several buttons. the thing i want to do is when i for example click a button i want to start playing the movie from 5 seconds in it and then stop the movie at for example 10 seconds in it. even if the video is 20 seconds long i want to be able to stop it automatically at 10 seconds in the movie. the start and stop should be controlled from the button..
 
i know how to start the movie at a specific time but i dont know how to stop it at a specific time.

View 2 Replies

ActionScript 2.0 :: Starting And Stopping Sounds With One Button

Aug 17, 2010

I want to play my songs in my Flash site..

I tried Making the song title as a button, and then I figured out how to make the song play by releasing the mouse button. This works great, however, when I click on the button numerous times, the song starts playing numerous times..

What I would like is to be able to click on my Song_btn once to start the song, and then click again on the Song.btn to stop the song.

or another option is to start the song with the Song_btn, and then some way to just let that song play through.

I have used the "stop all sounds" command when you navigate away from that songs particular page..

View 9 Replies

ActionScript 2.0 :: Tween - Stopping And Starting With Button?

Nov 5, 2003

I have a simple tween that runs over 50 frames, there is no stop action so it loops, just what I want. I have placed an invisible button over the tweened animation, now here's my question: When I click on the invisible button the animation stops and when I click on it again, it restarts. So that's it really, can this be done? I know how to stop the animation by putting a stop in the action script, so I am looking for some actionscript that works on an alternative click method if I am making myself clear?
Example: First click stops it, second click starts it, third click stops it fourth click starts it - this goes on forever.

View 2 Replies

IDE :: AS3 Starting/stopping Mc's On Specific Part Of The Timeline

Feb 23, 2009

I need to create a tall background, when the user clicks on a button the background will scroll up and down to the area that the user wants to go to. ( I attach an image of how that might look like)

The background is divided in to 4 sections, the way i figure to do this, is to have each section be a different part of the timeline- and what I need to happen is as the user arrives at one of the sections or in that part of the timeline the mc's on that sections start playing and stoping once he/she leaves.

If there is a better way of doing this as well- feel free of telling me- Im use flash about once a year.

View 2 Replies

IDE :: Loop To Keep Playing Regardless Of The Timeline Stopping And Starting

Apr 29, 2009

i just want my loop to keep playing regardless of the timeline stopping and starting. is this possible?

View 1 Replies

ActionScript 2.0 :: Stopping And Starting A Dynamically Loaded Movieclip

Jul 28, 2010

Im having trouble stopping or starting loaded swf files. I need to dynamically load the swf file but make sure it doesn�t play until the user requests it. The trouble is I wont know anything about the loading swf file (for example frame labels, if it has a 'stop' script in the first frame etc.) Ive attached a simplified version which I think illustrates the problem but the code is:

[Code]...

View 2 Replies

ActionScript 2.0 :: Continuous Slider - Stopping / Starting MovieClip

Jan 20, 2006

I have a nested MC that functions as a continuous slider; when you mouse right of center it slides one way and when you mouse left of center it slides the opposite direction. Right at center it stops. The problem I have is that I'm using this as a menu at the bottom of a .swf and there are other places to mouse on the page, which means that this menu is constantly in motion even when it's not being used. I want it to stop when it isn't being used, only because it's an MC I can't use the onMouseOut command to stop the clip. I tried making a button that targets the clip and stops it when you roll over the button but it doesn't work.

Here's the script I'm currently using:
onClipEvent (mouseMove) {
xcenter = 467.5;
speed = 1/25;
} onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
[Code] .....

View 3 Replies

ActionScript 3.0 :: Three Separate Tweens - Starting / Looping And Stopping Wheel

Feb 4, 2009

I have a wheel that starts, loops, and slows to a stop, using 3 separate tweens, which is functioning pretty well. The issue I'm having is the transition between the startup tween and the looping tween:

Startup tween:
mWheelStartTween = new Tween(mcWheel, "rotation", Regular.easeIn, mcWheel.rotation, mcWheel.rotation+360, 2, true);

Looping tween:
mWheelLoopTween = new Tween(mcWheel, "rotation", None.easeNone, mcWheel.rotation, mcWheel.rotation+360, 1.5, true);

Visually, everything should be based on the duration of the looping tween. I played with the duration of the starting tween to get it close, but there's still a small jump. How can I set a target rotational velocity for the end of the startup tween, so it seamlessly blends in with the looping rotational velocity? Should I not be using a tween for this? I'd like to pass in a duration value to the looping tween to support different speeds....which would affect the startup as well.

View 0 Replies

ActionScript 3.0 :: Starting And Stopping Video File That Is Attached To Augmented Reality?

Apr 17, 2009

I'm trying to do a little augmented reality. I'm using an action script to call a video and play it. The problem that I'm having is that the sound is starting the moment the window is open and the video plays with the marker is shown. I want the sound and video to only play when the marker is seen. I would like it to pause when the marker is removed and then resume where it left off when the marker is seen again. Here is a copy of my code if someone could look it over and tell me what I'm doing wrong. PLEASE PLEASE PLEASE just correct my mistake. I don't understand enough about coding for you to just say Netstream.pause() and netstream.resume. I don't know where to put that information in.

package { import flash.display.Sprite; import flash.events.Event; import flash.display.BitmapData; import flash.display.Loader; import flash.net.URLRequest; import flash.media.Video; import flash.net.NetConnection; import flash.net.NetStream;

[code]........

View 1 Replies

ActionScript 3.0 :: Starting And Stopping Multiple Movieclips On Different Keyframes Of Main Movie

Jun 17, 2009

I have multiple movie clips on 4 labeled frames of my movie. The keyframes are as follows : People, Place, Portfolio, Possibilities

The buttons to go to each of these keyframes work, although because I have a movie (different for each keyframe) I cannot get the previous movie's audio to stop when I click to another keyframe.

Also, I cannot get the other movie to work once I am on the next page.

The movieclips are named- Btn2 -which is the movieclip that plays once clicked on the homepage. Btn3- which is the movieclip that is supposed to play once clicked (on the people page).

To see what I'm talking about- visit: [URL]

give it some time to load- then click the doorbell- let the movie play for a little bit then click on people...the door closes, but the sound continues.

Here's the actionscript.

ActionScript Code:
stop();
import flash.events.MouseEvent;
//---people button timeline change---//

[Code].....

View 1 Replies

ActionScript 3.0 :: Stopping Audio On A FLV?

Nov 26, 2010

Im currently making a website but ive run into a problem. i imported a flv onto the stage, all was fine. i tested it and when i navigate onto the page it starts automatically. when i navigate away from the page the audio keeps playing. is there anyway i can stop it playing automatically and have it halt after i navigate away from the page.

View 1 Replies

ActionScript 2.0 :: One Swf Is Stopping Another Sfw's Audio

Nov 14, 2007

I have a game that has sounds for specific user actions. The second that the first sound is activated, sounds in all other flash movies stops. For example, mp3 streaming swf's or video streaming swf's from youtube, will halt, the very second the user clicks in my game. What's going on and how can I patch this?

View 2 Replies

Professional :: Stopping Audio On A New Scene?

Apr 8, 2011

I was wondering how do I stop my audio when I enter a new scene?

View 3 Replies

ActionScript 2.0 :: Stopping Loaded Audio?

Feb 20, 2004

I have scene that loops over and over if the user clicks on the wrong button. The audio is loaded at about half way through the scene.when the scene loops around again, and the user clicks the right button I want the audio to stop. BUT it doesn't and I'm using the same code as I've used before (it works normally)Is it becuase the second time round, at the time the user clicks the button the audio hasn't actually loaded and started playing. All you're listening to is what's left playing from the first loop?

View 3 Replies

ActionScript 3.0 :: Stopping Audio In An External Swf File?

Nov 18, 2008

I managed to use a loader to load an swf that has a video/audio track encapsulated within it. It starts and plays fine. Because of property rights considerations, I must use the provided swf with the video within it rather than converting it to an FLV.

And using the unload command I get the video portion to stop, but not the audio.

I know that I need some kind of audio stop to stop the audio, but haven't been able to figure out exactly how.

The parent swf is pretty simple, no buttons, it just plays 6 external swfs under control of another program that starts it and stops it with no other interaction.

View 6 Replies

ActionScript 3.0 :: Stopping Audio Streaming Inside A Layer?

Oct 8, 2009

Sometimes I get ahead of myself and have to stop and say how the hell did I do this before?'m referring to a simple stop button I need to put in a flash animation. I know how to code calling a sound from the library, starting and stopping. But how do I stop audio that is streaming inside a layer from a button ?

d(new URLRequest("yoursoundfile.mp3"));var my_channel:SoundChannel = new SoundChannel();//2.play_btn.addEventListener(MouseEvent.CLICK, playSound);stop_btn.addEventListener(MouseEvent.CLICK, stopSound);//3.function

[code].....

View 3 Replies

ActionScript 3.0 :: Stopping UILoader Loaded Audio Of A .swf Video?

Jan 21, 2010

I have 3 buttons (and 3 .swf videos).Each button makes the main timeline go to a specific frame and stop.Each Frame tells the UILoader to load a different assigned .swf video (source parameter).

Problem: when playing the project's .swf in the Flash Player, "VISUALLY" the videos properly switch,but the Audio continues, so the Audio for all 3 videos are playing simultaneously.How do I get the current video's Audio to stop when the new video is loaded ?I experimented with enabled = false;"(and other methods) between the changing videos .

switch(eventMLR.target.name) ...
case "myVideo1MLR_btn":
for (k= 0; k < sndArrayMLR.length; k++){[code]..........

View 1 Replies

Professional :: Playing - Pausing - Stopping Audio In A Timeline

Feb 23, 2010

I don't use Flash that much so the question may sound simple, but how do I pause audio in a timeline? I have added the audio, play and stop button. When I test it works fine, but I can't figure out how to add the pause button, or the play/pause button.

View 2 Replies

ActionScript 2.0 :: Stopping Flash Audio When Link Is Clicked?

Aug 20, 2010

This is really confusing (the title of this thread probably doesn't make any sense at this point), and I'm not actually quite sure what I'm trying to do is possible, but I figured I'd throw it out there.

Basically, I have created a speaker-looking button (speakerON_btn) that plays the audio in Flash. It works fine -- starts automatically and stops when it's at the end or when somebody clicks on it.

Then, I put this Flash file into an HTML... works good. However, on this HTML page, I also have a PDF link (that links to what the audio is discussing). I have been asked to stop the audio when the user clicks on the PDF to open it. I don't want the PDF to open in the same window, so I can't use that as a method to stop the audio.

Is there any ActionScript I can add to the Audio Flash file that will tell it to stop when a user clicks on a link outside of Flash?

Also, if the above is impossible, would it be possible to add ActionScript to stop the audio if I were to build the entire HTML page as a Flash file? If that's a possibility, what ActionScript would need to be added to the my speakerON_btn?

View 1 Replies

ActionScript 2.0 :: Stopping The Audio Loop Without Stop The Entire Animation

Mar 21, 2009

I have a problem with an animation because I want to stop the loop sound without stop the entire animation what can I do to make correctly this action please? I tried to make a movieclip to control individually of the center time line but i dont get good results.

View 4 Replies

ActionScript 3.0 :: Back Button Stopping Audio On A Video Component

May 16, 2010

I am putting together a basic video portfolio and have everything working except when I click the back button to get back to the thumbnail page (contained on frame 1) the audio from the video continues to play.[code]

View 4 Replies

ActionScript 3.0 :: Starting To Fill Up Game Folder With .as Class Files?

Oct 26, 2010

I'm working on my RPG combat engine, and everything is coming along nicely, except I'm starting to fill up my game folder with .as class files, and I was thinking it's probably smart to rearrange it so I have a folder for characters/enemies, and one for levels etc etc.I'm kinda learning as I go here so thats why I didnt start out with a planned folder structure.nyway, I can't seem to understand the correct way to go about doing it.Example: I have three classes which extend a "Character" class. They are added to the stage by the "Arena" class, when the Arena object is added to the stage by the "Game_Master" class. All of my classes at this point start with just "package {". How do I put the character files in a folder called, say, "characters"? I've tried a bit, but I can't get it to work. I moved them to the folder, made them start with "package characters {" and tried to "import characters.*;" in eventually just about every class, when just importing them to the Game_Master and Arena didn't work.

View 3 Replies

Starting/streaming/loading/playing Large SWF Video Files?

Jul 28, 2009

I have recently "inherited" several websites that feature 1 to 10 minute video animations in SWF formatOne of my challenges is to get these files to appear or play in a timely manner so that the viewer does not loss interest as it is loading. My questions will start with file size.reduce or minimize the size of published SWF files while still maintaining high quality video output? Second, how about this business of preloading.I don't really understand that term but my thinking is that if a large movie could be loading while another, shorter, movie is playing, or a graphic displaying, that this could be useful in my case. Lastly, how about streaming in general. Are there ways to optimally use a given download speed to efficiently stream SWF video?

View 5 Replies

ActionScript 2.0 :: Stopping Sound In All Active Flash Files?

Oct 13, 2009

created a simple MP3 audio player, not dissimilar to the popular wordpress audio player seen here (ie, the mp3 is loaded via url like mp3player.swf?filename=mysong.mp3)With this audio player, if it is used multiple times on the same page, only one can actively play a song, which avoids multiple songs playing simultaneously. If you attempt to open more than one, the last one will play and the previous one will automatically stop playing the song and revert to a "closed" state.With regards to automatically stopping previous instances from playing in the background, my question is how do I achieve this same effect with actionscript?

View 2 Replies







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