ActionScript 3.0 :: Add A Listener On An Flvplayer That Listens For A Certain Time To Pass
May 6, 2010
is there a way to add a listener on an flvplayer that listens for a certain time to pass - lets say 1 minute so that upon reaching that 1 minute I can call a funciton?
I have two components in my movie, I'm not sure how to write out the code for the listeners. Is it possible to write one listener that listens for changes in both components or do I have to write a separate listener for each? How would this look like written out?
On my main timeline I have an empty MC that my external swf's get loaded into once a user makes his selection from the menu.I would like to tween the load in and load out of these swfs.What is the best way to go about this?Should I add a Listener to the main timeline that listens for my MC to be called? I guess the real hangup here for me is understanding how to initiate the tween on load in and load out.
I have added a FLVPlayer component to my clip/class. On REMOVED_FROM_STAGE I call the unloadAndStop on the Loader object and null all references but the totalMemory increases every time. What can I do to remove it completly?
I headed some problem which can't solve. It's simple. I'm making slideshow, and wanna pictures to be dynamically loaded. List of images is stored in list.xml - a valid xml file. Now, here is piece of the code:
var imgno :Number ; //the var which tells the number of images listed in list.xml var myXML:XML; var myLoader:URLLoader = new URLLoader();
[Code]....
So, the triggered function processXML cannot change value of any variable which stands out of her. Is there a way to export (in this case) information about amount of images listed in list.xml to some of the variables that I can use later (for example imgno).
I searched the interweb for DAYS trying to find how to accomplish this via an event listener in AS3, but everything I found suggested creating a custom Event. The problem with this, is you have to decide the arguments you wish to pass in advance, and I wanted to create them dynamically on the fly ( for example: passing a string that a user entered into a textfield to some function for processing ).
So last night I spent hours scouring forums - and UREKA! I finally found something that I was able to tweak to send a variable number of arguments of any data type. I've never posted on a forum, but it was such a breakthru that I had to share it with the world.
Here is the code:
btn1.addEventListener( MouseEvent.CLICK, function onClick(e:Event ) { displayArgs(e, new Array("Larry", "Curly", "Moe") ) } ); btn2.addEventListener( MouseEvent.CLICK, function onClick(e:Event ) {
How do i pass a variable to a function from an event listener which is inside a function Below is a function that is called when after loading some variables
function dataOK(mydataevent:Event):void{ var j:int = 0; do { trace(j);
[Code]....
This is a simplified version of the original code. The above function generates an error because j is undefined in the function. I am wanting to get the variable j when the button is pressed.
How do I pass the variable j to the Button_Click function?
I have 3-4 swf those i want to load one after another like a slideshow.What i want to do is get the total frames of loaded swf and want to pass that value to Timer object's delay parameter. i have converted total frames to milliseconds so i can use it in timer constructor. But i am not getting the value of that variable outside of my Event.COMPLETE listener method. Here is my code what i have done
Since when using sql lite if you try and do a function at the same moment it throws an error, im just trying to make a function that will check if its executing, and if it is try again in 10 milliseconds, this exact function works fine if i dont have to pass any arguments to the function but im confused how I can pass the vars back into the function it'll be executing.[code]
How do you make an EventListener that listens for a object to hit an x value. So if lets say a movie clip hits x value, I want something to happen based on the event. How would you write this?
So Im trying to get the current time (play head time) for a video on the stage and am using Netstream. I have a timer with an event listener pinging a function every 1000ms. But it is not smooth and the numbers jump a bit.
Is there a way to attach an event listener to the netstream time itself?
I tried ns.addEventListener(NetStatusEvent.time, monitorTime); but as you probably know that Dog wont hunt.
I am trying to make an animation with three seperate buttons that when clicked on make one set of text disappear and new text appear in its place. My code so far looks like this:
I want to run a function when a certain movieclip enter a specific frame. The problem is it run the function repeatedly. I only want it to run once each time the movieclip change from one frame to another is there an event Listener that does it ? (can't put the code on each frame of the movieclip to sloppy and long)
I have a videos of 16:9 and 4:3 ratio.When I play them in flvplayer having dynamically loaded skin, in 4:3 ratio video the video and skin both get squeezed.I put scale mode to 'mainaspectratio'as desired.But I want skin not to squeeze.As the controls are disorted. How to achieve this?
Okay I'm struggling with my FLVPlayeback component. I have one on my stage, then when you click a button a movie loads in it, but as soon as i click on the home button to go back to frame 1 then the movieclip continues playing, (audio only) when i go back to the FLVPlayer, nothing is playing although you hear the audio and if you load another movie in the FLVplayer it plays over the other one.
I did try
Code: Select allMovieB.stop();
but its not working, it only gives me a
TypeError: Error #1009: Cannot access a property or method of a null object reference. at WorshipTeam_fla::MainTimeline/onPhotoClick2()
I am working on a little gallery to play FLV clips. I have gotten the following working:Frame 1 (labeled list) has a list of the videos with thumbnails that have the following variables assigned for onPress:
I have a flvplayer assigned to the id player and I am trying to set buffer times for videos I have embedded in an array, I understand how to pull the information from my array and have that value be set intoplayer.setBufferTime(value);but when ever I call that command it gives me the error1061: Call to a possibly undefined method setBufferTime through a reference with static type fl.video:FLVPlayback. player.setBufferTime(1);
One of the .mov video file doesn't play in my flvplayer component. While other play as desired. Any clue what may be the reason and how to play that .mov file without conversion to .flv
I want to put some control on play button of flvplayer component in AS2.0.How this can be done ??How I can call play button: I don't know how it to be referenced/its name.
I have my stage with the FLVPlayer and its easy enough to get it to play one video, but I have a series of buttons on the right hand side (day1, day2, day3.. etc).How can I go about getting a button click to change the FLV srouce and begin playback? And do I need to stop the loading of the previous video, or is that handled automatically?