ActionScript 3.0 :: Stopping Media When Navigating Away
Jun 2, 2010
the video page on my site uses a uiLoader to display a separate vidPlayer.swf.I can't figure out how to stop the content of vidPlayer.swf when navigating away from it. I've figured out how to stop the audio, however when a visitor returns to the video page the content has continued to play and the audio will no return.
View 1 Replies
Similar Posts:
Oct 5, 2010
I'm trying to teach myself actionscript 3 and going insane over an issue with an .flv video that I can't stop.
The problem I'm having is that I can't make video (an .flv within the "FLVPlayback" component set as a movie clip) stop when navigating to another tab. Navigating away from and back to my video page/frame even results in 2 audio streams playing simultaneously. I think the problem lies with me not being able (or knowing how) to identify the video/movie clip with "(name)".stop();
Here's the source file (the first and last navigation tabs on the left are complete, video is on the last tab) SOURCE:
[URL]
and my code (all my references to the FLVPlayer/video were wrong so I've removed them to try again) -
[Code]....
View 7 Replies
Jan 27, 2009
I have several swf files which are completed screencasts with voice overs, which I need to integrate into a flash application to distribute on CD to new students.
To play the screencasts in my flash file, I'm navigating to a new frame for each one which has a movie clip on it (instance name myscu3 for example). The myscu3 movieclip has about 20 frames of animation to grey out the screen behind, and then a couple of frames with actionscript on them, which 1) first frame shows a loading screen while the screencast swf is loading via a Loader and then navigates to the 2) second frame where the screencast coords are set and addChild is used to show the screencast via the Loader.
All works fine EXCEPT ... if I navigate away from the parent timeline frame where the myscu3 clip is ... the screencast disappears (as it should, as the myscu3 clip isn't on other frames, but if the screencast hasn't finished playing before I navigate away, the sound keeps playing.
how to stop the sound playing, as the loader is in the child movieclip, and the navigation away from the frame containing it is accomplished by clicking on any of the tabs at the side (on the main timeline). Any ideas? Is there actionscript code which will just stop any current sound playing (without stopping the ability to play sound) which I could add into the tabs navigation code?
View 1 Replies
Jan 12, 2009
I have an intermittant problem with FLV playback. I am using FMS 3.0.1r123 and FLVPlayback component to play RTMP streams that have been recorded using a webcam via RTMP. Maybe 1 in 10 recordings will not play back the last couple of seconds of the movie. A day or two later they are fine and play completely! I have made some tests;
1. Using Video object instead makes no difference (it seems the Event.COMPLETE message arrives early)
2. Using HTTP playback fixes the problem (but I want to try and keep the RTMP playback if possible though but I guess this is one way out)
3. The duration before the movies plays back properly seems to vary but is always at least 24 hours later (is that weird or what?)
4. Seeking past the 'end' will play the last couple of seconds.
5. The metadata duration reported at the start is correct (but how can you force FLVPlayback to use this length?)
View 3 Replies
Jun 10, 2010
<running environment>
-windows 2003 server
-using linux based load balancer(two origin only FMIS)
-FMIS 3.5.3
-default settings of all XML, CONF
-origin only and 2 servers
-providing live and vod services(vod files are placed in NAS storage and FMLE is feeding live video)
-only alphabet charater file name (no * , no _, no other special character) of VOD files
-nomally 300 VOD clients and 200 LIVE clients are connected on live time.
-changed HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters MaxUserPort created and set value 65535 in registry)
[Code]....
View 5 Replies
Jan 27, 2010
It's possible to clean DVR record file without stopping broadcast to client?
View 7 Replies
Feb 18, 2009
I want it to while still easing into place like the iphone does. For example my stage is 550px. The drag and throw MC is 1650. That's 550x3. If the first image is showing starting at x axis 0 and you drag to the left it will ease into place stopping and showing the second image stopping the image at x axis 0. And the same thing scrolling to the next one and scrolling back. So the code is below and I've attached the movie that I'm working on.
[Code]....
View 8 Replies
Dec 25, 2011
flash pro. as 3.0.animation . almost no codes except ends of scenes having :
import flash.media.SoundMixer;
if(SoundMixer.areSoundsInaccessible() == false)
{
SoundMixer.stopAll();
}
[Code]...
i got this scene, with this specific bgm , individual frame layer. and the sounds at another layer. what i want is to stop the sound without stopping the bgm . (yes, i know the above code wouldn't work as it stops all sounds)
View 1 Replies
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
Feb 2, 2011
I'm a born-again newbie, as it's been awhile, so bear with me...I have a main movie, with the menus and some basic info. I would like each section of the portfolio to load as a separate swf (to save on file size)...we were hoping to have the back/next, copyright buttons on top of a full size image...but my question is how to navigate the home button to return to the main movie with the menus...the old site had separate sections loading into an mtClip with the following code:
loadMovie("vr4.swf", 1);
then when you click home:
on (release) {
gotoAndStop("home");
unloadMovieNum(1);
}
how to code the home button on the section swfs to unload the movie, but return to the main movie without reloading?
View 2 Replies
Nov 4, 2009
I made a 3d box using flash cs4 built in 3d tools and I'm trying to "walk around" in it. I do this by moving the box accordingly.
[Code]...
The Problem: When you go to close to the back wall and look around the whole perspective gets messy. I know I'm not supposed to move Z like that.. I think.. I have no clue what properties to change for this to work.
View 9 Replies
Aug 5, 2008
I have two .fla's i'm working with. The first is called index.fla. this file holds a button that when pressed loads a swf into a placeholder layer. the second .fla is the one being loaded in the form of a .swf. what i want to do is write a code on the second frame of the .swf that will send index.fla to the 5th frame.
View 2 Replies
Jun 29, 2009
Trying to make a link in flash and it brings up a new browser or browser tab every time instead of taking the page it is on and actually navigating.
View 1 Replies
Jul 7, 2009
Within my animation I have two movie clips, one movie clip "clipA" runs to a certain point then a series of buttons appear when you hit the button it loads another movie clip "clipB" into the first movie clip "clipA". Whith in the second movie clip "clipB" I would like to be able to, at a certain frame navigate to a different frame within "clipA" is this possible to do with actionscript 2.0
View 1 Replies
Mar 7, 2011
I am a real noob at AS3. Its so frustrating now to try to re-learn how to navigate to different movieclips on different levels in my flash demo... Or for that matter, how to navigate at all with buttons on the timeline. I have a movieclip called mc_Flyouts on my main timeline. Inside of it are a left and a right side arrow which when clicked trigger a tween and flyout buttons appear. I want it so when the user clicks any of these flyout buttons in this movie, they jump to a different keyframe back out on the main timeline. I got the following code to work, but its giving me errors:
[Code]...
View 3 Replies
Sep 24, 2011
I am using Flash CS3 and AS2 on a PC. I am making a CD in Flash, for a client. The CD has videos, images and text. What I need is be able to go to the next scene once an FLV has finished playing. Also if a new FLV can be loaded once the curent ends. The FLV is in the FLVPlayback component. I need to add Cue Points which I can use to navigate with. The client would prefer a minimum of buttons, and thus auto navigation once a point is reached.I would prefer to avoid the need for me to use third party software or add-ons unless absolutely necessary.
View 3 Replies
Mar 8, 2011
I have a swf file which requires a username and password to log in. When the user enters the values and clicks the submit button I validate it using asp.net. What I want is if the validation succeeds then I want to navigate to the home page of my application which is also a swf file. How can I do this? This is my mxml code
<?xml version="1.0" encoding="utf-8" ?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Style source="d:/style1.css"/> [code].....
View 1 Replies
Aug 18, 2009
I am making a site, this site is in a folder, inside of this folder I have the index.html file and a load of other html files. I then have a folder, flashheader. with a flash header that has 5 tabs on it. When I click a button, I want to navigate to another URL, this URL being in the parent.
PHP Code:
tab1.addEventListener(MouseEvent.CLICK, myBtnClicked1);
function myBtnClicked1(e1:MouseEvent):void {
var url:String = "../index.html";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, '_self');
} catch (e1:Error) {
trace("Error occurred!");
}}
There is my code, it listened for the tab to be clicked, and when it is, it loads the URL.
View 2 Replies
Jun 28, 2010
How would I go about using an XML file like the one below to control an mp3 in a player and show a jpg at the same time? Basically the mp3 is about a presentation, and the image is a slide of the presentation. If you click forward it needs to progress to the next chapter marking and display an image. If you click back it needs to go to the previous chapter marking and display the previous image.
[Code]...
View 2 Replies
Aug 6, 2009
I was wondering if there is an easy way of navigating through a website without the use of multiple pages and eliminate the use of a navigation bar. My idea, which I'm sure has been done before because people are always coming up with new inventive ways to browse the internet, is to be able to allow the user to free roam the entire website on one page. I wouldn't be asking if I found it so I figured I could put my mind at ease and ask someone.url...In this map, it allows the user to free roam this map and find different cities. My idea is to have the user to browse a map of a website to different parts of what would normally be links to other pages. The whole web map would be one page and the user could just move their cursor up or down or left to right to each section of the website. Once they get to a section, they can click on certain parts. There is one website that is similar to my idea, but I want to eliminate the use of a navigation bar.I am new to flash but I love web design. I want to come up with a new way to navigate.
View 5 Replies
Nov 18, 2009
Basically, what i want to do is have a home page with some images and things on it, and a menu. When the user clicks on a menu button, i want the images on the homepage to animate away, and be replaced with the chosen page (animated in). I understand how to animate things using Tweens in the timeline and also in As3 using the Tween Class, but for the animation i'd like to do it's so much easier to use the timeline (i don't think i'd be able to use as3 to do really complicated things yet).
I can figure out how to make the home page disappear, but i can't figure out how to then animate in the correct page. If anyone can point me in the direction of a good tutorial or just give me some hints i'd be sooo grateful!! I think i'm just struggling to get my head into it.
View 10 Replies
Feb 2, 2011
I've got to add a video (flv) to my videobtn (navigatiopanel). I made a flashfile in CS3 actionscript 3, placed the flvplaybackcomponent at the scene (layer 1, frame 1) and linked it to webserver for the streaming. So far so good, I made an swf of it an everything worked fine. Except for one major problem : de vid doesn't stop playing when I navigate to another button in the nav.panel. In fact when I click once more on the videobutton, there are two vid's playing at the same time
View 29 Replies
Mar 26, 2009
I am really new to actionscript 3 and am having some trouble wrapping my brain around this. I have what basically amounts to a slideshow with navigation. I have a menu frame that has buttons, that when clicked, move down the timeline to a specific frame and stops. From there the navigation has 3 buttons..."menu" (goes ck to menu) and "previous" and "next" which have actions associated with it to go to next frame or previous frame. I have an actions layers that has the code in it and it works fine from the menu (attached is the menu actionscript) as long as I click on the item that is on the keyframe directly under the keyframe containing the actionscript. How can I get the frames that aren't directly under the actionscript frame to use the actions?
View 1 Replies
Jan 23, 2012
I have created several scenes that all have the same navigation bar consisting of l buttons which take the user to the various scenes. The code for the buttons (listeners and handlers)is on frame one in the first scene. It works fine as long I am in the first scene, once I have navigated to another scene (scene 2) the buttons do not respond. I thought that the AS3 code on the first scene is available to other scenes as well? Could you suggest examples of code that will power up the same buttons placed on different scenes? (I am using CS4 Pro)
View 3 Replies
Jun 4, 2010
I have a component mxml in which i have a save button, on click of the save button i need to display another component which will be in a tab navigator, for this I am using the view stack. My problem is, on click of save I need to display the second tab instead of the first tab, but defaultly the first tab will be displayed.
View 1 Replies
Oct 19, 2011
The following is not navigating within the same window as defined by _self it is opening a new window. No clue as this has worked before for me.
this.addEventListener(MouseEvent.CLICK, function(){
navigateToURL(new URLRequest('./homepage.php'),'_self');
});
View 1 Replies
Aug 31, 2009
I've used the XML grid photo gallery on my website that was featured in a tutorial on this website: [URL]However, whenever I click on another area of my website (eg. the contact page, homepage etc) ... the XML photo gallery still remains on the screen. I've been told to use the code (below) but it still hasn't resolved the issue. Where exactly do I post the code? All of my code for my background music, navigation buttons etc for my website are on one frame in the timeline.
[Code]....
View 0 Replies
Oct 27, 2010
I am working on one very big presentation which is made by around 240 different external .swf in AS2. Although I do not work with AS2, only with AS3 and I didn't make this presentation, I need to make changes to it. So every .swf have navigational buttons which are using this method:
loadMovieNum ("example/example.swf", 0);
to navigate between different movies.
Every swf has also a very annoying music, which I can control by putting a on/off sound button in every .swf, but when the user navigate to another .swf the music start again and the user have to push the on/off button again. Is there a way the player to remember the user choice in previous .swf, so not to have to make this choice every time he navigate between the .swfs?
Until now I control the sound like this:
my_sound = new Sound();
my_sound.attachSound("mix1");
my_sound.start(0, 1000);
View 1 Replies
Nov 13, 2010
Have a movie clip that I've set up in my fla, but I can't seem to get it off frame 1 with actionscript: the relevant code from character.as follows.. (i've tried a few other setups but nothing seems to get it to actually go to the "walking" stage. Scaling and other manipulations are working fine. Any insights into what I might try?
[Code]...
View 4 Replies
Mar 31, 2009
I've got a movieclip containing 6 frames, and it's placed on the stage. The instance name is "shapes". All 6 frames have stop(); actions on them.I want to have 5 buttons on the stage to link to 5 of the frames in the movieclip (buttons 1-5 linking to frames 1-5, respectively.)I know you can just use a gotoAndPlay(1); sort of thing on the timeline, but how can Inavigate in a movieclip from the main timeline? (in this case, navigate it through onPress = functions.)
View 1 Replies