Actionscript 3.0 :: Removing A Video Stream From The Stage?
Dec 14, 2009
I have a an fla made with GoToframe, when a btn is clicked an .swf is loaded on to the stage. there are two buttons that load video galleries, but when any button is clicked after the video gallery the UI loaders work but the video stream remains playing.
So I have a 5 page website, on the home page when I opens you see a video and it automatically plays. When you click to a different page though you can still hear the sound in the background. The video has an instance name of video, I tried using video.stop(); in the code for each button and it works but then it doesn't allow me to navigate when it isn't away from the home page.Here is the code I have for one of my buttons (it's the same for the others with different names though):
home_btn.addEventListener(MouseEvent.CLICK, gotoFrame); function gotoFrame(e:MouseEvent):void {
So I have a 5 page website, on the home page when I opens you see a video and it automatically plays. When you click to a different page though you can still hear the sound in the background. The video has an instance name of video, I tried using video.stop(); in the code for each button and it works but then it doesn't allow me to navigate when it isn't away from the home page.Here is the code I have for one of my buttons (it's the same for the others with different names though):
I am using these settings for media server but there's too much noise when a mic is attached to stream. Code is as following, can you suggest changes to remove the noise for more crystal clear voice?
This will create an flv video file on flash media server:
var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); ns.publish("yourCamera", "record"); ns.attachVideo(Camera.get());
How can I generate an image for the current video frame every 2 seconds?
I have a main. fla with navigation btns activated by GoToFrame actions. Some btns load content and some use the UI loader component.
I have one btn that calls a UI loader "loaderVideoGallery" which loads an external .swf inside that .swf is an flv player "flvPlayer".
This also works fine except after that button is selected and that swf is on stage no matter what button you call next the video stream from the flv does not stop, it continues to play.
The UI loader removes itself as you can see the other loaders come up on button presses but the video's audio still plays.
the UI Loader instance is "loaderVideoGallery" and the .flv player inside the external .swf is flvPlayer
im making a game and it has enemies randomly spawning at the top of the screen going down to the bottom, so far it all works fine, except for when i try to remove the enemies I get this erro.[code]
I wanna remove everything from stage if i click on an image. Well it ain't that hard but there is one problem. I want to leave albumbg on stage but it's a child of bg and if i removeChild(bg) it will remove all the childs of bg so also albumbg. The problem now is, if i set the albumbg to addChild(albumbg) it won't show up.
I am making a little drag and drop game where you click on a movieclip, which acts as a button. When the moviclip/button is clicked a duplicate of that same movieclip, only larger, is added to the stage. You then drag and drop it in a designated area on the stage.
I have that part of the code working fine. What I need is a reset button that removes the larger movieclip that was dragged. I am not sure how to do this.Below is my code that is working fine. In the code I am the movieclip instance is named "myMC" and its class is "MyMC".
myMC.addEventListener(MouseEvent.MOUSE_DOWN, moveMC); function moveMC(e:MouseEvent){ var newMC:MyMC = new MyMC();
[code]....
I tried removeChild for (myMC); and that removed everything. I only want to remove the second larger duplicate movieclip "newMC".
I have a 100mb movie that my friend wants me to stream onto his website to the size of a youTube HD video.
He would prefer the movie to be loaded onto his host than youtube.
What are possible options?
What would you recommend in converting the 100mb to a smaller size whilst still have an acceptable quality like youTube videos. What size are we looking at for a 100mb downgraded for streaming?
I have a main timeline which loads swfs in certain frames. It all works great except when I select one of the swfs that has a flv video inside. When I try to select any other frame the swf unloads but the audio stream remains.
Here is what I have
var Xpos:Number = 0; var Ypos:Number = 0; var swf:MovieClip;
[Code].....
I will have 3 more swfs with videos inside which I did not add yet as I need to get this sorted first.
I am pretty new to actionscript 3. I want to remove the movieclip on the stage and add a new movieclip but the button is within the currently running movieclip that I want removed. I am trying this function
homeArtist_btn.addEventListener(MouseEvent.CLICK, newArtist); function newArtist(e:MouseEvent):void{ removeChild(homeAni_mc); addChild(artistAni_mc);} I get these errors
I have a problem with this code:[code]There are two overlapping objects on my stage: character_mc and vanish_mc. As soon as i start the scene [Ctrl+Enter] vanish_mc is VISUALLY removed. But the code still sees a collision somehow. How can i Entirely remove the object vanish_mc?
I have 5 GoToframe activated UI loaders that appear on stage when a btn is clicked. All work fine except when either video galleries are clicked (there are two) . After the video gallery appears on stage any button clicked after that adds the next UI loader but the video gallery remains playing.
Do I use a removeEventListener?
Do I use on all buttons?
Create separate functions?
here is the code to one of the galleries
this.stop(); btnGallImg.addEventListener(MouseEvent.CLICK, vgall2); function vgall2(evt:Event):void { gotoAndStop("gallery2"); }
I placed a movieclip on the stage, what functions are there to remove it? removeMovieClip(target); Only seems to work on MCs which have been attached to the stage E.g. attachMovieClip(); The _visible property keeps the movieclip there just keeps it invisible. What completely removes it? It is called tankCPU.
I made a game where you have a bunch of enemies coming at you from the top of the screen and you move your mouse to avoid them but now i am trying to add a shooting ability and I tried using the code
if (shipenimy.hitTestObject(bullet)){ removeChild(shipenimy); }else { }
but when this happens it removes the child from being displayed but even though it is not displayed if you go to where it would be it still counts it as a collision and will end the game even though the child has been removed and I need to find a way to completely remove it so that there is not a chance of running into it after you have shot it.
i created 5 pages, each of which contains several movie clips (text, graphics, forms, etc). There is one specific page however that contains autogenerated content via. sprites. If i happen to land on this page, the sprites will appear, but when i transition to another page, they are still there except for the non-sprite stuff (disappear). Im ripping my hair out on this one, i managed to get a few of the sprites to remove but some are still appearing. Below shows the layout of the one thats not being removed;
In my .fla file, I have a MovieClip (we'll call it Clip1) linked to a corresponding class defined in a separate .as file.There's a case where I want to create a new MovieClip (Clip2) where Clip1 is, then remove Clip1. This case is dealt with by a function in Clip1's class.So, when I get to removing I do:ActionScript Code:this.parent.removeChild(this)Now, if the DocumentClass created Clip1 and placed it on the screen, this goes fine. But if Clip1 was placed on the stage in the .fla file (by dragging and dropping), it looks like Clip1 is not removed. I think it does get removed, but for some reason it gets recreated. This is the problem.
i am having trouble with removing a movieclip off the stage, i am using removechild but i get an error:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display:isplayObjectContainer/removeChild() at agptest_fla::MainTimeline/removeArrow()
here is my script
ActionScript Code: var aLeft:MovieClip = new arrowLeft(); var n1:Number = 0;
i added a bunch off object to the stage. The objects were added through an array. Now i want to remove all of them but i dont really know how to do this. removeChild(array[i]) doesnt work.
I have a main timeline that has labels for different pages. On certain labels I have swfs loading using the UI loader with each swf removing itself while another appears. In some swfs I have .flvs called the same way and my problem is when an swf containing an flv is called the flv plays fine but soon as I select another frame the stream remains. How do I remove the stream so the next frame can play by itself?
I've got a project with a bunch of stuff floating around the screen (enter_frame moves them all around). I instantiate them with one function, and I want to have them removed in a separate function (all timeline code, no .as files). I want them to remove themselves after floating 500 px off screen. Here are the two I've tried:
for (var i:int = 0; i < this.numChildren - 1; i++) { if ((getChildAt(i).x < -500 ||
How can i stream video live by the help of PHP like live tv? I am willing not to use flash media server. If it is must to use it then which server is free and reliable?
When this video page loads, it displays a white stage background, even though I've tried every method I know to make the bg color black. What am I missing?
is there a way to remove a video instance from the stage with an 'if statement"? Kind of like :next1_btn.addEventListener(MouseEvent.CLICK, ongoPage2); function ongoPage2(Event:MouseEvent):void {
I have some code in the first frame of my movie. It loads a streaming video using netstream (fl_NS) and displays it in fl_Vid.I want the user to be able to click a button to make the video fullscreen then press a keyboard key to make the video back to the small view - which almost works. I can make the video fullscreen and make the video shrink back down. Unfortunately, the last frame of the enlarged video is stuck in the background (on top of the HUD).[code]