IDE :: RemoveChild - Videos Load But Audio Remains From Previous SWF
Jun 30, 2009I've got a SWF loading others SWFs with this code:
[Code]...
Videos load, but audio remains from previous SWF. I thought removeChild would take care of it.
I've got a SWF loading others SWFs with this code:
[Code]...
Videos load, but audio remains from previous SWF. I thought removeChild would take care of it.
I am using removeChild() to remove a MovieClip. And via tests, I can confirm that it's working fine ( stage.contains(mc) returns false ). But the MovieClip still does not seem to be removed, as if the stage is not updated correctly.
View 1 RepliesI have a button on screen which is removed with removeChild when a certain timer event fires. However, if my mouse is on top of this button when the timer goes off, the button is removed but the mouse remains active (it's still a little hand cursor) and as soon as you move the mouse at all, the button fires its MOUSE_OUT event.
What I would like to happen is for the button to disappear and if the mouse is above it the mouse will simply go back to an arrow cursor and most importantly the MOUSE_OUT event won't be fired (in my case the event triggers a sound effect).It seems to me that the way to make that happen would be to set my button to null. However I use this button every time the user completes a level so it seems wasteful to null it and rebuild it ever time when i can simply add/remove it.
I built a timeline based player with 2 menus and many videos that you can play.The buttons move the timeline to a frame label and the video plays. The back button has a stop function built in it so the video stops playing when its hit.It plays wonderfully locally but once on a server after a few clicks it boggs down and sometimes the audio from the last video remains playing even when prompted to stop. I was pointed to use the add and remove child functions to prevent this but being very new to Flash and 100% self taught i have zero idea on how to do this. The link to the player is[url]....Even if its a link to a tutorial or something.
View 3 RepliesI create myself a key like it shows in the video tutorial on youtube. I then turn my developer_identity into a .pem I then try to export it into a p12 and I get an error saying that my key doesn't have a password. Why does this keep happening and what can I do to solve it? I created a p12 on a mac, but it won't work when I try to use it on a PC.
View 1 RepliesI have as3 script that loads an external swf which contains flv video:
[Code]....
The movie clip is removed but the audio continues to play. Why is this? What can I do to make sure the audio is removed also?
I have a container swf which is used to load multiple external swfs into a blank movie clip. Done as follows:
blank_mc.addChild(externalSWF);
This works fine, however I've got a weird issue with audio. Some of my external swfs have audio clips in them and for some reason the audio doesn't go away when a new external swf is loaded. So say the user loads a swf with audio in it and the user switches to another page, the audio from the previous page keeps playing even though a new external swf has been loaded into the blank movie clip.
I tried using removeChild before the new external swf gets loaded, but that didn't seem to do the trick. Audio is loaded to the timeline like so:
var audio:Nasdaqbell = new Nasdaqbell();
audio.play();
also tried the audio on the timeline as "stream" and "event" and got the same results.
I have a test site on: [URL] with a problem that the sound doesn't stop when I removeChild... The playing movie with the music is to stay only on HOME.
My code on the first frame of the label "HOME":
var Xpos:Number=243;
var Ypos:Number=88;
[Code]....
I think I am supposed to add an EventListener but can't figure out where or how...
Im having serious issues making a video sync with audio inside an embedded flash video file.
View 2 RepliesI am looking for a tutorial or a walk through to make an interactive Storyboard withinteractive maps, videos, audio files, play/pause button. And should be able to convert in multiple languages
View 1 RepliesI want to play youtube videos and programmatically direct firefox's audio out to a particular sound card.
Playing raw data 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: set_params:1059: Sample format non available
Available formats:[code]....
The command-line suggests that it worked, but audio came out of hw:0,0 (the default).Do I need to make my own plugin? Or do I need to force alsa to take 44100Hz?I refuse to use pulse since the memory leak bug makes it crash often.
Okay so I am trying to load external swfs which load videos dynamically.
I can load the swfs into the parent fla fine (if I remove all the code and just place a circle or something on the stage of the swf), and the swfs are also loading their respective videos correctly. But when I try to load the external swfs, if they contain any casting related code in them, I'm getting an error
[AS]TypeError: Error #1009: Cannot access a property or method of a null object reference.
at swf1_fla::MainTimeline/frame1()[/AS]
Is there some specific method to casting within external swfs?
My code for loading the videos is this:
[AS]var vc:NetConnection = new NetConnection();
vc.connect(null);
var vs:NetStream = new NetStream(vc);
[Code].....
when the start button pressed I would like to add the 'start_mc' and remove the 'score_mc' if it is on the stage and when the score button pressed I would like to add the score_mc and remove the 'star_mc' if it is on the stage. I don't really know how to go about this without any error.
ActionScript Code:
package
{
import Classes.View.MenuButton;
import Classes.View.Score;
[code]...
I am making a flv player with playlist that has and English and Spanish section. The English is the default section and that works very well but when I click "Spanish" button I am trying to remove all the children that were added at start time and run two new functions that load my Spanish data.
The only thing is that removeChild is not working. I can hear my Spanish video load but the English one is still playing in the background.
I need to completely remove main_container.addChild (my_player);
here is the function that should do it all:
function playSpanish (evt:MouseEvent){
main_container.removeChild(my_player);
gotoAndStop(2);
trace("IN SPANISH");
}
Flash CS3 Pro. AS 2.0. Mac OS X. I am making an instruction film containing many different SWF:s that loads one at a time. The new swf unloads the previous swf. But with a Go back button you should be able to load the previous swf, but that one can be different depending on which one you came from.
So how do I write a script that means something like this:
If level 2 (film2.swf) was the previous swf , load that one again else try the next one on the list.
Flash CS3 Pro. AS 2.0. Mac OS X.
I am making an instruction film containing many different SWF:s that loads one at a time. The new swf unloads the previous swf. But with a Go back button you should be able to load the previous swf, but that one can be different depending on which one you came from.
This is probably a simple thing, that I just cannot find the answer to.Basically I have designed an HTML based website.I want to incorporate a SWF element on the homepage, and am having problems doing so.In order to keep the file size of the swf I will be placing on my homepage to a minimum, I broke it down into a series of shorter scenes, that I plan on dynamically loading into my main file (which will hold all the AS) that will be placed on my site.
This is where I run into the problem.I have no trouble getting the first swf to load into my main file, but what I need to do is get the next swf to load and play after the first is done playing. So I am assuming I will need to find a script to unload the first movie, then load the second, and so on.Im actually not even sure if this is the right way to go about doing this.
I'm loading external SWFs into a larger SWF/projector, and I need to load the next and remove the previous one. Because of some unforseen technical requirements, I need to do this in AS3, unfortunately, I'm only used to AS2. I need the simplest possible way. Here's the code I'm using:
On the main movie:
Code:
// LOAD FIRST CLIP
var loadit = new Loader();
loadit.load(new URLRequest("assets/01.swf"));
this.container.addChild(loadit);
Then on 01.swf:
Code:
stop();
// LOAD NEXT
var loadit = new Loader();
addChild(loadit);
loadit.load(new URLRequest("02.swf"));
And then load 03.swf, 04.swf and so on. When loading 02.swf, 01.swf needs to be unloaded. How can I do this?
I'm trying to build a conditional statement that will addChild and removeChild at different Timer Delays. Before I go any further, I thought, I should mention that I'm usinig TweenMax to ease the alpha of ease Child from 1 to 0 and back during the process to imitate a fade-in/out.
I'm getting issue with only one line - inside a conditional statement.It's running "OK". The movie runs as I want it, but the remove/addChild transitions are not at the speed I want it at. I am getting an error message in the output, but other than that, the movie runs fine.
stop();
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;
[code]....
I am delving into AS3 and need a little bit of help. I am building an application that allows users to view content by clicking "next" and "previous" with a visual cue telling the user what slide they have loaded (slide 1 of 15, slide 2 of 15 etc etc) but I am really struggling with it. I want to load each slide as an external SWF because they are heavy.
I found this code online which loads swfs when you hit a "next button" but I have no idea how to get it to work to load swfs when you click a "previous button" and how to add the slide reference:
[Code]...
I'm having a heck of a time trying to get a number of external SWFs loaded into one main SWF in successive order, the next one playing after the other has ended. To complicate matters, the external SWFs have FLV files in them.
using Flash CS3
Actionscript 3.0
So, here's essentially what I'm looking to do: - I have one main SWF file (call it main.swf)- load several SWF files into this file so they play in order (let's call them movie1.swf, movie2.swf, movie3.swf, and so on) - these external SWF files all have FLV progressive downloads (not embedded, becuase then my audio doesn't sync up) - I want movie1.swf to load and play in the main file, then detect when the movie is complete, and unload that audio/video then load in movie2.swf, and so on.
This script seemed promising, but loads all of my SWFs on top of each other, making for some ::interesting:: audio... (i have it pasted in actions on first frame in main.swf)
var a:Array = new Array("movie1.swf", "movie2.swf", "movie3.swf");var tl:MovieClip=this
var index:uint=0;
loadF(new Event("nada"));
[Code]....
Maybe there's some code that can be pasted in the individual SWFs?
I built a flash player that has many external flv videos. The player functions perfectly when played in flash with the test movie function. It also plays fine in deamweaver when the .html file is imported into it. The problem is once the player is uploaded onto a site with all the files in the same folder the .html loads and the flash file functions perfectly but the videos do not load.
The skin of the videos load, but the area where you would be able to seek through the video has a rotating green barber shop looking thing like it would be downloading the videos, and the videos never load. I have debugged it and it came up with no errors. So now I come to the people that have more experience than me with this. I would be happy to forward a link or swf file to anyone if it can help see where the error is. I'm thinking it is a few lines of code that I am unaware needs to be in my file. I will leave it to the experts.
watch this Flash file I've created that includes a video.
[URL]
When importing the .flv file of the video into the Flash project, I chose the imbedding method. I realize this increases the size of the overall .swf file when doing so. On the first watch (before the file is cached) it tends to pause while loading and/or jumps. I've tried other methods (like choosing the file has already been deployed to a web server, and play methods such as progressive download from a web server, stream from a Flash video streaming service, and stream from a Flash communication server). When choosing those other methods, the video loads nicely but the audio sounds a bit more distorted while playing. So, at present, I'm using the embed video in SWF and play in timeline option. Does anyone have any other suggestions to improve the video buffer speed, performance and the overall loading and quality of the Flash file? I'm still using Flash Professional 8.
having trouble loading videos that exist already at a URL on the web. Its a pretty straightforward loader, so I'm not sure what the problem is... I'm getting the error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2124: Loaded file is an unknown type.
Here's the code:
ActionScript Code:
var vidLoader:Loader = new Loader();
function loadVid(ref:String):void{
[Code]....
I Have about 10 images that will be loading into my home page using the code below. the problem that I am getting is that occasionaly the same image will load twice in a row. is these some code I can insert into my existing code so that the images will not load twice in a row?
var movieArray:Array = ['Simage/Simage0','Simage/Simage1','Simage/Simage2'];
var loader:Loader = new Loader(); var index:int = movieArray.length * Math.random();
var url:String = movieArray[index] + '.swf'; trace("Attempting to load", url);
[code].....
I have a function which adds movieclips dynamically into another movieclip. Inside the dynamic movieclip is a dynamic textbox (it gets it's content from a textfile via the function).However, if I add more than one movieclip, the previous added mc's gets the textbox value undefined (doesn't matter if it's an identical mc or a different one). And it hasn't got to do with levels, I've already checked that...
Here's the function:
[AS]
addTxt = function (src, objWidth, xpos, ypos, level) {
[code].....
I have a function which adds movieclips dynamically into another movieclip. Inside the dynamic movieclip is a dynamic textbox (it gets it's content from a textfile via the function).
However, if I add more than one movieclip, the previous added mc's gets the textbox value undefined (doesn't matter if it's an identical mc or a different one). And it hasn't got to do with levels, I've already checked that...
Here's the function:
[AS]
addTxt = function (src, objWidth, xpos, ypos, level) {
text_lv = new LoadVars();
text_lv.onLoad = function(success) {
[code]....
the function is called by an "XML-loop", and the level-var is changed for each mc that is to be created.
Following is my code for loading one video using FileReference class and it works fine [code]...
then after this, the file.name and file.size goes to mxml page and the video is displayed on stage with name and file size but the samething i want to do with FileReferenceList class, i am solving this problem from last 2 weeks but cant.
I have this youtube video code.. Works great.. Minus One big thing..When I go to the video page, the youtube videos load great, but they stay up, even over other pages... They never go away once you navigate to the Video Page...Here is the code, How can I make them go away when I click to a new page? I took out youtube links out cause I have fewer than 50 posts..
ActionScript Code:
stop();
Security.allowDomain("THIS WOULD BE WWW(YOUTUBE)COM");
var my_player:Object;[code]............
I have a swf file, which plays 6 videos one after the other in a loop. This file is very huge so it is taking more than a minute for it to start playing after the page finished loading. I have taken the original video file, and split it into 6 files. I plan to have 6 tiles in the flash file as soon as the page loads, and when some tile is clicked, the video is loaded dynamically only that video or swf file so that it saves the loading time and once this is done, i want it to revert back to the main page with tiles. I am just starting off with flash and I have no clue how this is possible in flash. I am not asking for code, i need some tips to get started.
View 1 Replies