Preload FLV movie clip

My company has a bunch of 20 minute video DVDs that I am
moving to the web. The full movie is 75 megs, so I broke it up into
four chapters. I want flash to load in the second "chapter" while
the first one is playing, and so on up to the end. My goal is to
have these four clips play (mostly) seamless from the first clip to
the end of the 4th cip.
Here is the main code that makes the movie go from one
chapter to the next.
_root.chapter is determined by a URL string variable, so that
the user can jump right in at any chapter between 1-4 depending on
which part of the video they want to see first.
======================================================
vid.contentPath = "VTS_05_1_Chapter_"+_root.chapter+".flv";
vid.setBufferTime(3);
_global.moveNum = _root.chapter;
var vidList : Object = new Object();
vidList.complete = function() {
_global.moveNum++
if (_global.moveNum < 5) {
vid.contentPath = "VTS_05_1_Chapter_" + _global.moveNum +
".flv";
vid.setBufferTime(3);
_root.chapter++;
} else {
gotoAndStop("fin");
vid.addEventListener ("complete",vidList);
stop();
======================================================
The movie plays great, but there are load pauses between each
video. I added the 3 second buffer intentionally, but if I can get
the preloading to work I will remove it. Without the 3 second
buffer the video is choppy at first.
Any help is greatly appreciated!

*bump* - HELP!

Similar Messages

  • Preload a movie clip

    Hi,
    I built a flash photo gallery using flash and actionscript 3.
    But the galleries are loading very slow.
    I need help to make the pictures load faster
    or to get the first picture to show before the entire
    movieclip is loaded
    or a script that preload the movie clips before they are
    played.
    I'm a beginner in actionscript, so I have no idea which
    fonctions I should use and how I would use it.
    I've been looking for tutorials, components all over the
    week-end without success.
    So please, is there anybody who can help me with this?
    Here are 2 links.
    The first one is where the website is visible online and the
    second one is where all the files are available:
    http://www.sebthiroux.com/last_online_test/
    http://mmaraudeur.free.fr/liquit/
    This is a very urgent matter for me as I need to make this
    work for tomorrow
    Thanks in advance
    Sebastien

    this should do it:
    var snd:Sound = new Sound()
    snd.onLoad = function(){
    var pct:Number =
    Math.round(snd.getBytesLoaded()/snd.getBytesTotal()*100);
    wait = setInterval(loadingSnd, 100)
    function loadingSnd(){
    if(pct >= 100){
    snd.start();
    clearInterval(wait);
    btn1.onRelease = function(){
    snd.loadSound("audio/loop1.mp3", false);

  • Preload ALL movie clips?

    I am experiencing a delay or pause in the site when my first
    movie of content is played ... A frew frames before the initial
    animation is finished I add in :
    _root.conten.gotoAndPlay("start1");
    to start the home page (or the first page of my content
    movie, whatever you want to call it)....
    Is this a preloader problem? I just can't seem to iron it
    out.
    To See It:
    http://www.itamidesign.com/new.html
    The Code is also here:
    http://www.itamidesign.com/new.fla
    THANKS

    no no there's always a way, i was just pointing you in the
    direction of the easiest way.
    the first thing you need to do is check getBytesLoaded at
    regular intervals rather than in a loop on a frame. this can be
    achieved several ways - i've used setInterval in the example i
    prepared for you.
    the second thing you need to do is check that getBytesTotal
    has been received from the jpg okay - this can be checked by
    ensuring that getBytesTotal>4, which is the size of an empty
    movie clip.
    the code i have attached is independent of your xml code,
    which was really confusing things, as it is unrelated to your
    loader code (one problem at a time!). once you're happy with your
    loader code, then you can integrate it with your working xml code.
    good luck
    craig

  • Optimizing movie clips

    Hi
    I'm working with a few .flv movie clips in my timeline based flash file. I've imported and embedded the files into movieclip symbols. My file is now sluggish and close to 10mgb. What's the best way to optimize the videos so my .fla and final .swf are as small as possible?
    Thanks!

    yes, you'll upload all the videos to your server.
    the flvs will not slow play time.
    the size of the video files is irrelevant except to determine the duration of the videos.
    what is more import is the video's bitrate.  the greater the bitrate the higher the video's quality and the greater the user's download capacity required to prevent video stuttering while downloading.

  • Putting a preloader for a loaded .swf in a Movie Clip

    I am trying to use a preloader for a larger .swf file that loads inside of a movie clip. I was wondering what code might work and where to put it. (preloader is a .swf).  I am using CS4, ActionScript 1.0.  Thanks.

    it does nothing in that context.  so use:
    container._x =-258;
    container._y =-235;
    container.loadMovie("gallery.swf");
    this.onEnterFrame=function(){
    // if you have a textfield with instance name preloaderTF
    preloaderTF.text=Math.round(100*container.getBytesLoaded()/container.getBytesTotal())+"% Loaded";
    if(container.getBytesLoaded()>100&&container.getBytesLoaded()>=container.getBytesTotal()){
    delete this.onEnterFrame;

  • Copying movie clip with flv

    Hi, I am trying to copy a movie clip with an flv in it from
    one project to another. Everything works fine except the flv just
    keeps trying to load and never plays. I am not sure what to do. Any
    suggestions?

    It sounds like you are using the FLVPlayback component to
    display the FLV, in which case, the FLV is a separate file and
    likely needs to be in the folder next to the new project. Go back
    to the old project and copy the FLV from its location there to the
    new projects folder.

  • How do I start preloader later in movie clip?

    Hi,
    I want a preloader to start about 20 frames in, rather than at the very beginning of a movie clip, is this possible?
    The reason I dont want it to start at the beginning is because it's on an external swf which loads when a button is clicked. Becuase the swf has a transparent background at the very beginning, the preloader is showing above the main movie and it cant really be seen. The main slideshow actually starts 20 frames in so this is when I really need the preloader.
    any ideas?

    The way I have my preloader set is on another scene so i'm not sure 
    how to delay it by 20 frames in the main time line? When I move the 
    preloader frames along by 20 it doesn't work?
    This is the code I have on my preloader:
    loaded_bytes = _root.getBytesLoaded();
    total_bytes = _root.getBytesTotal();
    loadpercent = (loaded_bytes/total_bytes)*100;
    if (loadpercent != 100) {
         // OPTIONAL: Place the percentage on some textfield
         preloaderText.text = int(loadpercent) + '%';
         // Goto respected load percentage since not done
         bar.gotoAndStop(int(loadpercent));
    } else {
         gotoAndPlay("Main", 1);
    code on next frame:
    gotoAndPlay(57);

  • Preloader based on a single movie clip

    Is there a way to have a pre-loader based on a single movie clip, instead of on the entire SWF size? This movie clip may have a single graphic, but the entire movie has a slideshow with more images to display...but rather than making my visitor wait for the entire site to download before they see anything, I'd like to have it so when that graphic is loaded, it displays while the rest of the movie finishes loading.  And there would be a preloader that shows the progression of the single movie clip.
    How can I accomplish that? Thanks for your help!

    Thanks for the speedy reply, but I think I didn't explain myself well. I'm not sure your answer will help me. I have an FLA file that contains everything within it. The background image for the resulting SWF is a single JPG, contained within a movie clip with an instance name of "bg_mc". However, there are a lot of other images that also need to be loaded. So, I want the loader to show progress ONLY on the background JPG image, and when it's downloaded, the image is shown, the rest of the SWF continues to download, and when the SWF is completely loaded, the images appear. So the user is only waiting on the background image to load before they see something instead of having to wait for all images to load. Does that make sense?

  • FLV in a linked Movie Clip slow to show at runtime

    Hi All,
    I have a linked FLV in a FLVPlayback, inside a movie clip that is a child of my main timeline. Let's call it 'redBoxMovie'. I have bitmaps on the stage and the redBoxMovie. I would like the first frame of the redBoxMovie to be visible on the stage along with the bitmaps as soon as the flash movie shows in the web browser. However, when I open the swf in the browser I see the bitmaps for about a 1/2 second before the first frame of the redBoxMovie.
    Is that because it's a linked flv? Is there any way to assure everything shows on the stage at the same time (bitmaps and flv)?
    Thanks

    Ok so it looks like you're referring to the method of placing a screenshot of the flv on the stage in front of the flv so that users don't notice that the flv loads more slowly than the other bitmaps on the stage, right?
    yes
    Looks like I'll have to do this (since embedding the flv in the main swf, which avoids the slow-to-show problem, is not recommended).
    that's also correct (and it will make your entire swf load slower).
    Thanks Kglad.
    you're welcome.

  • How do I target a nested Movie Clip in an FLV component?

    Hello all!
    I have a video player that's control bar's x & y are over
    the top of the video. It is set to alpha 0, and when the user rolls
    over the video the control bar's alpha goes to 1 and becomes
    visible. I have a few even listeners and a function that makes this
    happen.
    My issue is that the buffer handle and the volume handle do
    not go to alpha 0, despite the fact that their parents do. The
    instance of "volumeHandle" is the child of "volumeSlider".
    "volumeSlider" does go to alpha 0, then to alpha 1 on rollover, but
    it's child "volumeHandle, is always visible. The same applies to
    the respective instances of the buffer bar.
    I have tried volumeHandle.volumeSlider.alpha = 0; ,but that
    doesn't work.
    My guess is that the conflict lies in the linkage of the
    controls for the buffer and volume handles.
    Any guidance would be greatly appreciated! Thanks in advance.
    Shawn

    Also, the AS I have for the volume bar movie clip, instance
    name "volumeSlider" is:
    stop();
    this.handleLinkageID = "VolumeBarHandle";
    this.handleLeftMargin = 3;
    this.handleRightMargin = 3;
    this.handleY = 11;
    this.fullness_mc.fill_mc.slideReveal = true;
    The VolumeBarHandle linkageID applies to the same MC as the
    "volumeHandle" instance.
    This is one of the two movie clips that will not go to alpha
    0.
    Thanks again.

  • Movie Clip as intro page...

    I have a movie clip that I uploaded as an .flv (so I could have the sound) as something on the timeline. I set up a button below the video to skip to the website (or welcomePage)
    However, I cannot get the button to work for some reason. Below is my script, am I missing something? Also, for whatever reason, now my movie clip does not autoload when it did before...
    I also do realize that I could probably condense the timeline, but I am just working teaching myself, so bare with me.
    stop();
    home_btn.addEventListener(MouseEvent.CLICK, welcomePage);
    resume_btn.addEventListener(MouseEvent.CLICK, resumePage);
    reel_btn.addEventListener(MouseEvent.CLICK, reelPage);
    photos_btn.addEventListener(MouseEvent.CLICK, photosPage);
    contact_btn.addEventListener(MouseEvent.CLICK, contactPage);
    homepg_btn.addEventListener(MouseEvent.CLICK, homePage);
    function welcomePage(e:MouseEvent):void
    gotoAndStop(3881);
    function resumePage(e:MouseEvent):void
    gotoAndStop(3890);
    function reelPage(e:MouseEvent):void
    gotoAndStop(3900);
    function photosPage(e:MouseEvent):void
    gotoAndStop(3910);
    function contactPage(e:MouseEvent):void
    gotoAndStop(3920);
    function homePage(e:MouseEvent):void
    gotoAndStop(3881);
    Any help is appreciated, thanks!

    1.  you're aware that home_btn and homepg_btn do the same thing, correct?
    2.  you're using preloader code to ensure those frames are loaded before enabling/clicking those buttons, correct?
    if yes to both, copy and paste the output panel results of the two trace functions:
    stop();
    home_btn.addEventListener(MouseEvent.CLICK, welcomePage);
    resume_btn.addEventListener(MouseEvent.CLICK, resumePage);
    reel_btn.addEventListener(MouseEvent.CLICK, reelPage);
    photos_btn.addEventListener(MouseEvent.CLICK, photosPage);
    contact_btn.addEventListener(MouseEvent.CLICK, contactPage);
    homepg_btn.addEventListener(MouseEvent.CLICK, homePage);
    function welcomePage(e:MouseEvent):void
    gotoAndStop(3881);
    function resumePage(e:MouseEvent):void
    gotoAndStop(3890);
    function reelPage(e:MouseEvent):void
    gotoAndStop(3900);
    function photosPage(e:MouseEvent):void
    gotoAndStop(3910);
    function contactPage(e:MouseEvent):void
    gotoAndStop(3920);
    function homePage(e:MouseEvent):void
    trace(e.currentTarget);
    gotoAndStop(3881);
    // and on frame 3881, place:
    trace(3881);

  • How to stop a slideshow and show another movie clip at the end?

    Currently my slideshow is in a loop. At the end of last slideshow, I want to show another movie clip (End_mv) that's on another layer. How do I do that? My current scripts are below:
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    //change scale on an image
    var fadeTween:Tween;
    //To slide in on X axis
    var slideXTween:Tween;
    //To slide in on Y axis
    var slideYTween:Tween;
    //To fade IN
    var alphaTween:Tween;
    //To get bigger on its X axis
    var scaleXTween:Tween;
    //To get bigger on its Y axis
    var scaleYTween:Tween;
    //var fadeTween:Tween;
    //description place holder
    var strDescrp:String;
    //source place holder
    var strSource:String;
    //x poistion
    var posX:Number;
    //y position
    var posY:Number;
    //degree rotation
    var degreeRot:Number;
    // delay between slides
    //const TIMER_DELAY:int = 5000;
    var TIMER_DELAY:int = 5000;
    // fade time between slides
    const FADE_TIME:int = 3;
    // reference to the current slider container
    var currentContainer:Sprite;
    // index of the current slide
    var intCurrentSlide:int = -1;
    // total slides
    var intSlideCount:int;
    // timer for switching slides
    var slideTimer:Timer;
    // slides holder
    var sprContainer1:Sprite;
    var sprContainer2:Sprite;
    // slides loader
    var slideLoader:Loader;
    // url to slideshow xml
    var strXMLPath:String = "lstHouse.xml";
    // slideshow xml loader
    var xmlLoader:URLLoader;
    // slideshow xml
    var xmlSlideshow:XML;
    var txtField:TextField = new TextField();
    var formatText:TextFormat = new TextFormat();
    //start of sound section is for sound
    var soundReq:URLRequest = new URLRequest("PaukenBrumfiel_AngelsOnHigh.mp3");
    var sound:Sound = new Sound();
    sound.load(soundReq);
    sound.addEventListener(Event.COMPLETE, onComplete);
    //end of sound section
    function onComplete(event:Event):void
        sound.play();
    function init():void
        // create new urlloader for xml file
        xmlLoader = new URLLoader();
        // add listener for complete event
        xmlLoader.addEventListener(Event.COMPLETE, onXMLLoadComplete);
        // load xml file
        xmlLoader.load(new URLRequest(strXMLPath));
        // create new timer with delay from constant
        slideTimer = new Timer(TIMER_DELAY);
        // add event listener for timer event
        slideTimer.addEventListener(TimerEvent.TIMER, switchSlide);
        // create 2 container sprite which will hold the slides and
        // add them to the masked movieclip
        sprContainer1 = new Sprite();
        sprContainer2 = new Sprite();   
        mcSlideHolder.addChild(sprContainer1);
        mcSlideHolder.addChild(sprContainer2);
        // keep a reference of the container which is currently
        // in the front
        currentContainer = sprContainer2;
    function onXMLLoadComplete(event:Event):void
        // create new xml with the received data
        xmlSlideshow = new XML(event.target.data);
        // get total slide count
        intSlideCount = xmlSlideshow..image.length();
        // switch the first slide without a delay
        switchSlide(null);
    function fadeSlideIn(e:Event):void {
        // add loaded slide from slide loader to the
        // current container
        currentContainer.addChild(slideLoader.content);
        // clear preloader text
        //mcInfo.lbl_loading.text = "";
        // fade the current container in and start the slide timer
        // when the tween is finished
        //Tweener.addTween(currentContainer, {alpha:1, time:FADE_TIME, onComplete:function() { slideTimer.start(); }});       
        //strSource = xmlSlideshow.image[intCurrentSlide].@src;
        fadeTween = new Tween(currentContainer, "alpha", Regular.easeInOut, 0, 1, 2, true)
        //scale = new Tween(currentContainer, "alpha", Regular.easeInOut, 0, 1, 2, true)
        slideTimer.start()
        onComplete:function();
    function switchSlide(e:Event):void
        // check, if the timer is running (needed for the
        // very first switch of the slide)
        if(slideTimer.running)
            slideTimer.stop();
        // check if we have any slides left and increment
        // current slide index
        if(intCurrentSlide + 1 < intSlideCount)
            intCurrentSlide++;
        // if not, start slideshow from beginning
        else
            intCurrentSlide = 0;
        // check which container is currently in the front and
        // assign currentContainer to the one that's in the back with
        // the old slide
        if(currentContainer == sprContainer2)
            currentContainer = sprContainer1;
        else
            currentContainer = sprContainer2;
        // hide the old slide
        currentContainer.alpha = 0;
        // bring the old slide to the front
        mcSlideHolder.swapChildren(sprContainer2, sprContainer1);
        strDescrp = xmlSlideshow.image[intCurrentSlide].@desc;
        //strSource = xmlSlideshow.image[intCurrentSlide].@src;
        //txtField.border = true;
        //txtField.x = 0;
        //txtField.y = 600;
        txtField.width = 855;
        txtField.height = 200;   
        //txtField.background = true;
        //txtField.backgroundColor = 0xEE9A00;
        txtField.alpha = 20;
        txtField.text = strDescrp;
        formatText.align = TextFormatAlign.CENTER;
        //txtField.autoSize = TextFieldAutoSize.LEFT;
        formatText.color = 0x000;
        formatText.size = 30;
        txtField.x = 0;
        txtField.y = 550;
        posX = 0;
        posY = 0;
        degreeRot = 0;
        // create a new loader for the slide
        slideLoader = new Loader();
        // add event listener when slide is loaded
        slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fadeSlideIn);
        // load the next slide
        slideLoader.load(new URLRequest(xmlSlideshow.image[intCurrentSlide].@src));   
        addChild(txtField);
        txtField.setTextFormat(formatText)
    // init slideshow
    init();

    I got this error:
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
        at flash.display::DisplayObjectContainer/swapChildren()
        at University_Advancement_Holiday_Greeting2012_fla::MainTimeline/switchSlide()
        at flash.utils::Timer/_timerDispatch()
        at flash.utils::Timer/tick()
    And here's the code:
    // import tweener
    //import caurina.transitions.Tweener;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import flash.display.MovieClip;
    //change scale on an image
    var fadeTween:Tween;
    //To slide in on X axis
    var slideXTween:Tween;
    //To slide in on Y axis
    var slideYTween:Tween;
    //To fade IN
    var alphaTween:Tween;
    //To get bigger on its X axis
    var scaleXTween:Tween;
    //To get bigger on its Y axis
    var scaleYTween:Tween;
    //var fadeTween:Tween;
    //description place holder
    var strDescrp:String;
    //source place holder
    var strSource:String;
    //x poistion
    var posX:Number;
    //y position
    var posY:Number;
    //degree rotation
    var degreeRot:Number;
    // delay between slides
    //const TIMER_DELAY:int = 5000;
    var TIMER_DELAY:int = 5000;
    // fade time between slides
    const FADE_TIME:int = 3;
    // reference to the current slider container
    var currentContainer:Sprite;
    // index of the current slide
    var intCurrentSlide:int = -1;
    // total slides
    var intSlideCount:int;
    // timer for switching slides
    var slideTimer:Timer;
    // slides holder
    var sprContainer1:Sprite;
    var sprContainer2:Sprite;
    // slides loader
    var slideLoader:Loader;
    // url to slideshow xml
    var strXMLPath:String = "lstHouse.xml";
    // slideshow xml loader
    var xmlLoader:URLLoader;
    // slideshow xml
    var xmlSlideshow:XML;
    var txtField:TextField = new TextField();
    var formatText:TextFormat = new TextFormat();
    //var myEnding:MovieClip = stage.getChildByName('End_mc') as MovieClip;
    //start of sound section is for sound
    var soundReq:URLRequest = new URLRequest("PaukenBrumfiel_AngelsOnHigh.mp3");
    var sound:Sound = new Sound();
    sound.load(soundReq);
    sound.addEventListener(Event.COMPLETE, onComplete);
    //end of sound section
    function onComplete(event:Event):void
        sound.play();
    function init():void
        //reference my movie clip "End_mc" oon the stage and turn its visibility off
        MovieClip(getChildByName('End_mc')).visible = false;
        // create new urlloader for xml file
        xmlLoader = new URLLoader();
        // add listener for complete event
        xmlLoader.addEventListener(Event.COMPLETE, onXMLLoadComplete);
        // load xml file
        xmlLoader.load(new URLRequest(strXMLPath));
        // create new timer with delay from constant
        slideTimer = new Timer(TIMER_DELAY);
        // add event listener for timer event
        slideTimer.addEventListener(TimerEvent.TIMER, switchSlide);
        // create 2 container sprite which will hold the slides and
        // add them to the masked movieclip
        sprContainer1 = new Sprite();
        sprContainer2 = new Sprite();   
        mcSlideHolder.addChild(sprContainer1);
        mcSlideHolder.addChild(sprContainer2);
        // keep a reference of the container which is currently
        // in the front
        currentContainer = sprContainer2;
    //function onXMLLoadComplete(e:Event):void
    function onXMLLoadComplete(event:Event):void
        // create new xml with the received data
        xmlSlideshow = new XML(event.target.data);
        // get total slide count
        intSlideCount = xmlSlideshow..image.length();
        // switch the first slide without a delay
        switchSlide(null);
    function fadeSlideIn(e:Event):void {
        // add loaded slide from slide loader to the
        // current container
        currentContainer.addChild(slideLoader.content);
        // clear preloader text
        //mcInfo.lbl_loading.text = "";
        // fade the current container in and start the slide timer
        // when the tween is finished
        //Tweener.addTween(currentContainer, {alpha:1, time:FADE_TIME, onComplete:function() { slideTimer.start(); }});       
        //strSource = xmlSlideshow.image[intCurrentSlide].@src;
        fadeTween = new Tween(currentContainer, "alpha", Regular.easeInOut, 0, 1, 2, true)
        //scale = new Tween(currentContainer, "alpha", Regular.easeInOut, 0, 1, 2, true)
        slideTimer.start()
        onComplete:function();
    function switchSlide(e:Event):void
        // check, if the timer is running (needed for the
        // very first switch of the slide)
        if(slideTimer.running)
            slideTimer.stop();
        // ADDED: Check if using sprContainer2 and at the last slide
        //if ((currentContainer == sprContainer2) && (intCurrentSlide == intSlideCount))
        trace("Current Slide: " + intCurrentSlide);
        trace("SlideCount: " + intSlideCount);
        if ((currentContainer == sprContainer2) && ((intCurrentSlide + 1) == intSlideCount))
            // hide the slideshow (and other related elements, or remove them if desired)
            //mcSlideHolder.visible = false;
            // remove any clips directly inside slideshow (any timers/etc need to be stopped too)
             while (mcSlideHolder.numChildren > 0)
                mcSlideHolder.removeChildAt(0);
            // I do see a var named 'sound' playing so you might want to:
             //sound.stop();
             //sound = null;
            // etc any other slideshow-only elements to hide/remove..
            // play your movie
            MovieClip(getChildByName('End_mc')).visible = true;
            MovieClip(getChildByName('End_mc')).play();       
        // check if we have any slides left and increment
        // current slide index
        if(intCurrentSlide + 1 < intSlideCount)
            intCurrentSlide++;
        // if not, start slideshow from beginning
        else
            intCurrentSlide = 0;
        // check which container is currently in the front and
        // assign currentContainer to the one that's in the back with
        // the old slide
        if(currentContainer == sprContainer2)
            currentContainer = sprContainer1;
        else
            currentContainer = sprContainer2;
        // hide the old slide
        currentContainer.alpha = 0;
        // bring the old slide to the front
        mcSlideHolder.swapChildren(sprContainer2, sprContainer1);
        strDescrp = xmlSlideshow.image[intCurrentSlide].@desc;
        //strSource = xmlSlideshow.image[intCurrentSlide].@src;
        //txtField.border = true;
        //txtField.x = 0;
        //txtField.y = 600;
        txtField.width = 855;
        txtField.height = 200;   
        //txtField.background = true;
        //txtField.backgroundColor = 0xEE9A00;
        txtField.alpha = 20;
        txtField.text = strDescrp;
        formatText.align = TextFormatAlign.CENTER;
        //txtField.autoSize = TextFieldAutoSize.LEFT;
        formatText.color = 0x000;
        formatText.size = 30;
        txtField.x = 0;
        txtField.y = 550;
        posX = 0;
        posY = 0;
        degreeRot = 0;
        // create a new loader for the slide
        slideLoader = new Loader();
        // add event listener when slide is loaded
        slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fadeSlideIn);
        // add event listener for the progress
        //slideLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
        // load the next slide
        slideLoader.load(new URLRequest(xmlSlideshow.image[intCurrentSlide].@src));   
        addChild(txtField);
        txtField.setTextFormat(formatText)   
    // init slideshow
    init();

  • Problem with non loading movie clips in CS3

    Hi.
    I am making an animation ( Trailer for an upcoming handheld
    game i am working on ).
    And i have encountered a problem when i play back the
    animation with Flash player.
    There is two movie clips in the animation ( Normal vector
    drawing but with effects applied on it ( color adjustment , and
    blur ) ) and when i play the published swf back with flash player
    the two movie clips are in their normal Vector mode ( without the
    filters ) until the middle of the animation when they finally
    "load" , the filters finally have an effect on the two vector
    drawings.
    i use a very high end computer so that couldn't be it.
    And when i am going to upload the flash film there's going to
    be a loading screen ... i have no clue if it's going to fix this.
    But for now this is really odd and looks really awkward.
    If this problem persist i will not make the deadline. please
    help fast.
    Thanks everybody.
    -Jimmy Gonzo
    EDIT: oh and i also noticed that when the stuff isn't loaded
    yet... the animation goes too fast.

    It seems to me that you need to put a preloader in the first
    frame of your whole .fla. It seems that all your assets are not
    being loaded before the .swf playhead moves forward.
    A simple preloader could be something like:
    frame 1 label this as "preloader"
    frame 2 (insert the following commands)
    if (this._framesloaded >= this._totalframes) {
    this.gotoAndPlay("init");
    }else{
    this.gotoAndPlay("preloader");
    }

  • Working with movie clips

    I'm making an animation with movie clips inside the stage but if i put action in the end of these for go to another frame in the stage, dosnt let me because AS3.0 does'nt alow script inside buttons and MC's.
    Wath can i do for this issue.
    The new code from AS3.0 is so diferent to AS2
    Thanks for your time.
    can you put some video to do things like this.????
    By the way, this forum is the best, congratulations for all.

    Thank you for the answer, i hope to understand AS3 more in the pass of days.
    For other hand, can you tell me how can i make the background of my exported video transparent??
    When export i mark the check box make alfa chanel on backgroud, but when i conver to FLV with Adobe Media Encoder, the background turns to black.
    what other way can i use to import video.
    Thank you any way

  • Navigating movie clips

    Hi. I've basically been copying code from a series of tutorials, and now I've hit a wall because the series doesn't cover this part, and I'm certainly no expert at ActionScript.
    Basically, I'm trying to handle all the navigation with movieclips instead of moving around on the timeline. What Im trying to achieve is to have a main 'page' with a couple navigation buttons. One of them (cartoonButton) would open a movieclip called cartoonBG, which is a 15 frame alpha fade-up that would end with a frame with buttons for opening cartoons (right now, there's only one cartoon, but eventually there will be more).
    The problem is, as soon as the file opens, it goes into a loop, playing the cartoonBG movie clip over and over. So, I guess I need to know how to make it so that the frame is still when the clip opens, and then I can do an onRelease for cartoonButton and have that open and play cartoonBG. That's sample 1.
    Sample 2 is what I have for frame 15 of cartoonBG. That would be where the alpha fade-up stops, and I want it to be set so you click episode1Button and that loads BnR1.flv into the NetStream (and, later on, when I have a second cartoon, episode2Button would load BnR2.flv and so on). That's sample 2.
    Thanks so much in advance if someone could help me out!
    SAMPLE 1:
    stop;
    cartoonButton.onRelease = cartoonBG.play;
    SAMPLE 2:
    stop;
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    theVideo.attachVideo(ns);
    ns.play("BnR1.flv");
    playButton.onRelease = function() {
        ns.pause();
    var videoInterval = setInterval(videoStatus,100);
    var amountLoaded:Number;
    var duration:Number;
    ns["onMetadata"] = function(obj) {
        duration = obj.duration;
    function videoStatus() {
        amountLoaded = ns.bytesLoaded / ns.bytesTotal;
        loader.loadbar._width = amountLoaded * 475;
        loader.scrub._x = ns.time / duration * 475;
    var scrubInterval;
    loader.scrub.onPress = function () {
        clearInterval(videoInterval);
        scrubInterval = setInterval(scrubit,10);
        this.startDrag(false,0,this._y,461,this._y);
    loader.scrub.onRelease = loader.scrub.onReleaseOutside = function() {
        clearInteral(scrubInterval);
        videoInterval = setInterval(videoStatus,100);
        this.stopDrag();
    function scrubit() {
        ns.seek(Math.floor((loader.scrub._x/461)*duration));

    That works, but I actually want it to be set up so I (or the user) could go back to cartoonBG again, as opposed to getting rid of it completely.
    The way I'm setting this up is that homeButton, cartoonButton, and a couple others (extrasButton, downloadsButton) are all navigation on a footer that will always be there, but they'll bring up these different movie clips (cartoonBG, extrasBG, etc.) instead of going to other frames on the main timeline. The tutorial I was working off of seemed to think that was the way to go, and for whatever reason, I took him at his word.
    Anyway, is there a different way I could code homeButton that wouldn't get rid of cartoonBG?
    I should also take this opportunity to say thanks for all this help! I really do appreciate it!

Maybe you are looking for