ActionScript 1/2 :: Start Playback Of A Loading Swf When It Reaches 50%?
Jan 8, 2010
I have a website that loads external .swf files using XML. People viewing my website would have to wait a while for my .swf's to load as some are 5mb plus. Is there a bit of script I can use to say start playback of my .swf when it has loaded 50% of the file?
i have application that streams videos from fms .i try to play video of 240 seconds, but when playback reaches 180 seconds i got NetStream. play. stop . it happens regularly at the same time.why does it happen? is it encoding of the video??
I have been playing with this idea for a few hours and now I'm completely miserable,I have two movieclips, mc1 & mc2. mc1 is palying a simple animation.I want to write a script so that when you rollover mc2, it checks mc1's frame number. if mc1's frame number is for example "10", it should play its own animation. otherwise is should wait until mc1 reaches frame "10" then play mc2 animation.
Is it possible to alpha tween (or any tween) the end of an animation with the start?For example, here we have a simple animation that alpha tweens three images with looped playback (keyframes capitalized):
I'm currently recording and storing a ByteArray of sound and then playing it back. But for some reason the playback starting position of the ByteArray is 163840, not 0 as I need it to be.
var soundBA:ByteArray = new ByteArray(); var sound:Sound = new Sound(); var ch:SoundChannel = new SoundChannel(); var recordingsArray:Array = new Array();
I have a number of menu buttons (home, about, contact, etc). Each button loads a new/different movieclip onto the scene. Each movieclip when loaded plays up to frame 25 and stops. When I click on any of the menu buttons, I want the current/loaded movieclip to continue playing until it reaches the end of the clip before loading the next. I tried this actionscript with no luck!
I have a long mp3 file hosted on a standard apache server (30 minutes long so far, but I would like it to work with longer sounds too).I'd like to start playback of this audio within at a specified point. When attempting to use Flash Actionscript 3, my basic tests show that ALL the audio from the start to the position I choose is buffered before playback (Sound.bytesLoaded was my friend here). If I start one second in, it takes about 3 seconds to start playback, 30 seconds in, takes about 25 secondsObviously with a really long mp3, like skipping playback to the middle of a 3-hour audiobook, this isn't going to be practical.Here's the ActionScript 3.0 code I'm using:
button.addEventListener(MouseEvent.MOUSE_DOWN, function():void { var s:Sound = new Sound(); var req:URLRequest = new URLRequest("http://example.com/audio.mp3");
I have two xmls, xml1 and xml2. Both have same structure, only data are different. Button 1 loads xml1 and button2 loads xml2. Both calls same function to load XML. First i press button1, so xml1 starts loading, but if before xml1 is completely loaded, i press button2, xml2 also starts loading. If for some reason the xml2 loads first i get data from xml2. But when i look at the bandwidth profiler in flash , xml1 is still loading. When xml1 is loaded it will replace data from xml2. SInce i pressed button2 last, i would want data from xml2. So is it possible to stop loading the previous xml when i start loading another xml?
I'm trying to load an external flv to a flv playback component that is on the FLA timeline. I was able to load external flv and custom skin with AS3.0 but the client wants to have just one swf, not a swf calling another swf for the custom skin. The external flv has to be from the flash vars. AS code: root.loaderInfo.parameters.videoPath html code: var flashvars = { videoPath: "hhvideo.flv" }; Anyway to do this?
I'm building an .swf with video to play in the standalone Flash Player. It works perfectly fine when the swf is not full-screened. However, as soon as I test it as a published swf, the video does not load. I know the video is not loading because:1) I can't see it.2) Elements that are triggered by cuepoints in the video are not triggering.3) The movie clips and graphics that over lay this video still play, but only when the swf is not full-screened.I am adding the video directly onto the timeline. Here is the Action Script I am using at that frame:
Actionscript Code: import fl.video.VideoEvent;import fl.video.MetadataEvent;var curCue:Number = 1;//This is the current cue point.introVideo.fullScreenTakeOver =
I'm Loading an FLV in flash using FLV Playback component in as3. And simultaneously i'm running sound on Phone. It syncs properly in my machine. But it is giving me terrible delay in slower machines. So is there any way to control the framerate of the FLV so that it can sync properly with sound.
I am importing 4 videos flv with playback component. When a video is loading, I would like an mc to be visible (like a loading mc e.g.youtube) to be sure the users understands that it's working and loading. But when it starts to play, the mc needs to disappear.
So I imagine something like this code is a start (it doesnt work but it can maybe help to illustrate what I want to do);
import fl.video.VideoEvent; vid1.addEventListener(VideoEvent.LOADING.videoLoad ); function videoLoad(e:VideoEvent){
I'm trying to do a site with multiple videos, and I figured that instead of adding frames with new instances of the Playback component, it would be nice if I could get it working by just passing some actionscript to the component on the click of a button.
Here's what doesn't work:
Code: on (release) { _root.videoPlayer.loadMovie("Videos/theVideo.flv"); }
videoPlayer is the name of my Playback component. This does cause an interruption, as the video that's currently playing disappears, so it appears it's at least trying to load it, but it certainly won't play that video.
I am using the following code to load my video into the playback component, but the video is the wrong size, it's too small and isn't centered in the video player.
Code: import fl.video.*; var myVideo:FLVPlayback; myVideo = new FLVPlayback(); myVideo.source = "videos/Logo Animation WEB.mp4"; myVideo.addEventListener(VideoEvent.COMPLETE, completePlay); [Code] .....
I am importing 4 videos flv with playback component. When a video is loading, I would like an mc to be visible (like a loading mc e.g.youtube) to be sure the users understands that it's working and loading. But when it starts to play, the mc needs to disappear.So I imagine something like this code is a start
import fl.video.VideoEvent; vid1.addEventListener(VideoEvent.LOADING.videoLoad ); function videoLoad(e:VideoEvent){
1) I want a 60 seconds video to start playing after 40 seconds have been downloaded - to do that I set the NetStream.bufferTime to 40 seconds and retrieve "NetStream.Buffer.Full" event causing the video to really start playing. This step is OK.
2) However, the "NetStream.Buffer.Full" causes data to stop downloading. So the remainder of the video begins to download no sooner than after the 40 seconds have been played. This step is my issue. Can anyone tell me how to avoid this unintended effect? (i.e. playing a video and downloading data at the same time?)
I am a flash newbie, how can I get the flash to start playing before it is finished loading on a website? I embedded a FLV file into a flash and I'm going to export it as a SWF, I want it to start playing the movie before it's done loading so people don't think that it's not working.
Created a text move clip that I have added Motion Tween, It works when I Play. But when I test Movie clip it does not work. What is the action script code to have it start when the it is loded in test.SWF?
I need to load all image thumbnails and some other things ( which are loaded externally with xml) at same time, while displaying the percentage of them. The problem i am having is that flash cant get their totalBytes in start, the total bytes of all of these items is rising while the loading is in progress.So the percentage always goes up and down. To understand better what i am meaning here is the link to the preview ( note that it might have bugs as its still not finished ) : http:[url].....You can see last textfield under fps metter is TotalBytes , and the one above total is loadedBytes.
I tried using GreenSock's PreloadAssetManager ( http:[url].... ) but it takes to much time to START loading, it stays at 0% for more than 5-10 seconds.So i cant use it.The only thing i can think about is putting their size to xml and then istead of using getBytesTotal, ill use the data that i load from xml.. ?
I try to execute a code on my Stage, the problem is when I declare my own class on which they load the file (xml) the code start in the background.I tried to add a listener in the custom class for Event.COMPLETE but it doesn't work because it only affect the custom class, not the whole movie.I tried something like this:
Code: var xmlLoad: XMLLoadData = new XMLLoadData("navigation.xml"); var menuBox:MenuBox = new MenuBox();
I've got a configuration xml file that I need to parse for values before a flex application loads. I've created a static class that allows for the values in the xml config file to be retrieved. I'm initializing this class when the application first loads but as the xml file is loaded with a Loader class that loads a synchronously the class is being asked for values before the xml file is actually loaded - so it is throwing a error. Is there a way to load this xml file synchronously. We cannot embed the file as a class variable as we need to be able to change the values remotely.
I try to execute a code on my Stage, the problem is when I declare my own class on which they load the file (xml) the code start in the background.
I tried to add a listener in the custom class for Event.COMPLETE but it doesn't work because it only affect the custom class, not the whole movie.[code]...
I am making a website and am having a very hard time with the actionscripting and external loading involved. I have managed to auto load the background externally but the problem is that once the bgload movie(which is loading externally in main.swf) is loaded, it goes back to start. make the "bgload" movie stop right there after its played once....
I know this is probably a easy change but i can't seem to figure it out.I want the code below to start playing at 25% and continue loading as it plays, Frame 1 AS: bytestotal = getBytesTotal();
ON A MOVIE CLIP: onClipEvent(enterFrame){ _root.bytesloaded = _root.getBytesLoaded();[code].....
I am working on a tabular file that when you click on one of the tabs (there is 7) you view the content of that layer.
The code I am using works fine:
on (release) { land._visible = true; Tab1._visible = false;
[Code]....
but when you view the "land" layer, go back to another tab and go back to the "land" layer it doesn't reload and start at frame 1 but the last frame you were at.
I desperately need it to "reload" when you release on the action above and to GoToAndPlay frame 1 but whatever code I try it won't do it.