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


Similar Posts:


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

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

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

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

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

IDE :: Video Starting Too Fast

Jun 27, 2009

[URL]

You don't have to understand anything the problem is into the intro. It is quite simple but I don't really know how to fix it. The problem is the movie in the first page start before it totally loaded so depending of your connection and your cpu in doesn't start at the begin.

I want to fix that.

Here's my structure.

I have a swf which load the "template" which load another swf which load the movie

index.swf (preloader)--->base.swf--->preloader2.swf---->movie.swf

I think that the only thing you need is the code of the preloader

Code:
//code for the preloader and loader element
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);

[Code]....

View 1 Replies

ActionScript 3.0 :: Starting Video From Cue Point?

Oct 12, 2010

I have a video that I don't want the beginning of, I know how to set the Cue Points but I am not very familiar with ActionScript 3.0 and would like to learn some code to start my video out at a cue point so I can put this video inside another flash video.

View 0 Replies

Stop Swf Video From Starting When Page Is Openend

Oct 13, 2009

How can i stop an swf video file from starting when the page is opened in browser? Under the publish settings i click on (paused at start) . This doesn't seem to have any affect on whether the video starts when the page is opened.

View 3 Replies

Flash :: Slide Presentation - Auto-starting Flv Video

May 3, 2009

I'm trying out Flash CS4, and am using it to create a slide presentation. as I feel stuck at the moment. Here's what I need: An intro slide to act as a "front cover", giving the user of the presentation a chance to load it up before initiating the following content. The next slide to contain a video, which starts playing as soon as the slide is loaded. Also on this slide, a few pieces of text need to appear at certain times as defined by me.

Here's what I have so far: A blank 'slide1', ready for my content. Presenter presses the right arrow and it proceeds onto slide 2. A 'slide2', which has my flv video clip placed on it with optional play controls. So I need to know how to start the flv player automatically when slide 2 is opened. I think I need to place some ActionScript on frame 1 of slide2, but I don't know what. If I set the video to 'autoPlay' in the component inspector, it starts as soon as the swf presentation is opened, which is not what I want - it should only auto play when it's own slide is navigated to.

View 2 Replies

Media Server :: Video Stream Not Re-starting From First Frame

Oct 29, 2009

I have a problem with a project using the FLVPlayback component (the Flash CS4 version) and FMS 3.
 
Playing back a video works fine. When the video is finished, I hide the FLVPlayback component.
 
But if I have to play the same video again, the video does not immediately start from the beginning. I see a glitch with the frame the user last stopped on (whether it stopped at the end or wherever in the middle). It never re-starts from the beginning right away.
 
I have tried different approches to solving the issue:
 
- tried seekSeconds(0)    - tried autoRewind = "true"
- a combination of both
- nulling out the stream source (result in a Runtime error) then setting it again
 
To no avail.

View 2 Replies

Media Server :: Starting Point Of A Video Stream?

Feb 27, 2010

I have been trying to do this locally on my machine by using the download simulator but the simulator doesnt seem to work especially when I give the player a 2GB file to load over a 14kbps connection, the file seems to load within a split second and absolutely no buffering occurs.My problem below needs to be answered before I can persue and purchase and set up a web server to run FMS as a production server, but understandably I do not want to do this until I know it is possible to do what I want to do.

Let say I have put a 60min video on the server which I want to stream. But I only want to stream the last 20mins of it. Am I able to set the player to stream from the last 20mins and for there to be no progressive download required before? I need the stream to start almost immediately from the start of the last 20mins and for it to continue plaing until the remainder of the video completes  So essentially I only want to load a part of the movie into a stream and disgard the part of the movie I do not want to show.

View 1 Replies

ActionScript 2.0 :: Flash - Scrub Itself Video Starting Out In The Middle Of The Loadbar

Feb 14, 2011

I'm making a working scrubber on a video, but having problems. The scrub itself it starting out in the middle of the loadbar. I've looked everywhere, trying to find out what is wrong with it.

[Code]...

View 4 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 1/2 :: Video Playing From Starting Point When Play After Pause

Oct 7, 2011

if i click 'Play' Button video playing normally, after i click 'Pause' button video pause, next i click 'Play' Button video playing from starting point. what is the problem
solution pls...... Code:

[Code]...

View 2 Replies

ActionScript 2.0 :: Random Starting Frame Everytime The Video Is Loaded

Jan 24, 2009

Im looking to for my flash video to start at a random keyframe everytime the video is loaded.I have about 20 layers with images transitioning into each other.URL...Anyone have any actionscript that could generate such an effect?

View 6 Replies

ActionScript 3.0 :: Starting Video To Play From Beginning On Button Click

May 26, 2011

I have three buttons, which starts three separate videos...click on button starts video, that's ok, but then video is not over, if to click again,it's not starts video from beginning. I'm talking about one video. I must push on other button and then on that again to start it from beginning.

ActionScript Code:
import flash.events.MouseEvent;
import fl.video.FLVPlayback;
vidPlayer.stop();
Object(this).1btn.addEventListener(MouseEvent.CLICK, button1);
function button1 (e:MouseEvent):void{
[Code] .....

View 0 Replies

ActionScript 2.0 :: Stop Video From Starting Until User Clicks Play

Mar 28, 2009

Using the tutorials on the gotoandlearn main page I built a custom video player that loads the videos from an xml file and it works great. At present the video starts playing as soon as the video opens, I would like the video to only start playing after the user clicks the play button.

View 3 Replies

ActionScript 2.0 :: Default Random Starting Frame Everytime The Video Is Loaded?

Jan 24, 2009

Im looking to for my flash video to start at a random keyframe everytime the video is loaded.I have about 20 layers with images transitioning into each other.Anyone have any actionscript that could generate such an effect?

View 2 Replies

Swf In Flv Not Stopping, Video Keeps Playing?

Jun 4, 2010

I'm making a basic flash website, and have already created the site structure, but I'm having trouble adding FLV and SWF, as they aren't responding as I would like.

1) I have built a basic flash photo gallery, and it works great. I have exported the SWF, but when I add that to my main sites keyframe, it plays non stop, and the buttons on that embedded SWF don't work.

2) After adding a FLV video to a keyframe, it works as I would like. Except that when I click to another keyframe after starting the video, it keeps playing. How would I be able to pause/stop the video if a navigation button to other keyframes are clicked.

View 1 Replies







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