Preloader percent

Hi Group,
I am creating a preloader that uses a mask to display part of
a logo during load. However, the tutorial I found doesn't include a
percentage text field. I would like to be able to add a dynamic
text field labled something like text_percent and then have it
dispaly the loading percentage along with mask. Below is the action
script I am using for the mask portion. Can anyone help?
stop();
rectMask_mc._height = 1;
this.onEnterFrame = function():Void {
var loadedData:Number = this.getBytesLoaded();
var allData:Number = this.getBytesTotal();
var percent:Number = Math.round(loadedData/allData*100);
rectMask_mc._yscale = percent;
if (loadedData >= allData) {
gotoAndPlay("Scene 2", 1);
delete this.onEnterFrame;
};

>>(getBytesTotal / BetBytesLoaded)*100
Just an FYI, but with operator precedence, / and * are the
same. So the
parenthesis is unnecessary, though still useful for a quick
visual of the
order you want. And those are functions:
getBytesTotal() / getBytesLoaded() * 100;
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

Similar Messages

  • Flvpayback preloader percent with VideoEvent.READY

    Hello,
    I'm trying to get a dynamic tex box to go from 0 to100%, 100% would be when videoEvent is ready. I cant think of a way to do this. Any suggestions? I guess I need to know how many bytes it takes for VideoEvent.READY to happen.
    heres my code as of right now..
    import fl.video.*;
    import fl.controls.ProgressBarMode;
    // Set Variables
    var flvControl = display;
    var flvSource = "main_vid.flv";
    // Create event handler functions to control the progressbar
    function progressHandler(event:VideoProgressEvent):void
       var bl = Math.round(event.bytesLoaded/1000);
       var bt = Math.round(event.bytesTotal/1000);
       // Update progress...
       pb.setProgress(bl,bt);
       loader_txt.text = Math.floor((loaded/total)*100)+ "%";
    function readyHandler(event:VideoEvent):void
       // Remove progressbar when we start playing...
         removeChild(pb);
         removeChild(loader_txt);
    // Set progress bar state
    pb.mode = ProgressBarMode.MANUAL;
    pb.indeterminate = false;
    // Add listeners and load the video
    flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
    flvControl.addEventListener(VideoEvent.READY, readyHandler);
    flvControl.source = flvSource;
    Thanks,
    Mark

    OK, so I think I was misunderstanding Video.Event.READY.. It just states that the video is ready and not downloaded(correct me if I'm wrong).
    So I need to use display.playWhenEnoughDownloaded();, but how would I get the bytes out of that method? Any suggestions?
    Thanks,
    Mark

  • HELP - preloader not working

    Using CS4 Actionscript 2.0
    Frame 1 of preloader:
    percent = Math.floor(getBytesLoaded()/getBytesTotal()*100);
    myOutput.text = percent+ "%";
    Frame 2 of preloader:
    if(percent== 100){
    nextScene();
    }else{
    gotoAndPlay(1);
    Check out what happens after percentage loaded. It just goes to Frame 1 of next scene but doesn't play it....  although if you right click and click PLAY it will indeed play it..
    How to get it to start upon 100% loaded??
    THANK you
    I SHOULD NOTE that the scene that won't play has an embedded FLV in timeline

    Hi Ned, and thanks
    I tried moving FLV to frame 3, and changed actionscript accordingly, but now the preloader only flashes quickly and the movie starts... so there is no counting of bytes any longer, just a quick flash of the preloader text and the movie starts

  • Broken Preloader

    The Preloader doesn't seem to work in Captivate 6. I'm using the default loading.gif with a Preloader Percent setting of 2% (we've used with perfect success for months in Captivate 5.5). When the file is published, it can take several minutes depending on the connection speed for the file to start. It seems like it's loading the entire file regardless of the Preloader settings. This is very different than files published in Captivate 5.5 that would start right up within seconds.
    We are doing pretty standard courses with graphics, slides, and audio.
    What has changed with the preloader to cause this type of behavior?

    If you upgraded the course to Captivate 6 from version 5.5 the project may still be looking for the preloader in the old location under the Cp 5.5 install directory.
    Open your project and look at the path that is currently set for the preloader in the Preferences > Project > Start and End section.  If it is still pointing to the Cp 5.5 location, change it to point to the preloaders in Cp 6.

  • Error #1009 Help!

    Dear All,
    I hope you can help me with what is probably a very simple problem yet seems to affect most people! However, I've spent all day researching it and trying all sorts of codes to resolve the error!
    I am in the process of building a new website using Flash CS5 and I am very new to whole scripting business (as3).  Having finished the main content of the website, I created an external preloader so it can load the main SWF file. However, when I debug or test the scene I get this error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
       at Index_fla::MainTimeline/frame1()[Index_fla.MainTimeline::frame1:11]
    After many hours, I find the publish settings, publish debugging which actually tells me what line/frame is causing the problem! If I go to my main file (labelled as Index.Fla) and look at Frame 1, Line 11 it indicates:
    var buttonsArray:Array = [works_btn,about_btn,contact_btn];
    ... which sounds about right, considering when the preloader has finished the main flash file navigation buttons (work/about/contact) appear to not work quite right. They still function taking you to the right pages (or frames) but the mouse over, mouse click functions do not work.
    Now I'm not really sure how to deal with this, because All the buttons (which are Movie clips) are located on Frame one and have the right instance names and PLUS when I debug the Index.Fla file, everything works as normal.
    Should I assume there is something wrong with my preloader file?
    Below is the script for the preloader and frame one fo the index file. Hope you can help me! Thanks!
    PRELOADER:
    var l:Loader = new Loader();
    l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
    l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
    l.load(new URLRequest("Index.swf"));
    function loop(e:ProgressEvent):void
       var perc:Number = e.bytesLoaded / e.bytesTotal;
       percent.text = Math.ceil(perc*100).toString() + "% Complete";
    function done(e:Event):void
       removeChildAt(0);
       removeChild(preloader)
       percent = null;
       addChild(l);
       l.contentLoaderInfo.removeEventListener( ProgressEvent.PROGRESS, loop);
       l.contentLoaderInfo.removeEventListener(Event.COMPLETE, done);
    INDEX (MAIN FILE - FRAME ONE)
    stop();
    works_btn.addEventListener(MouseEvent.CLICK, navigationClicked);
    about_btn.addEventListener(MouseEvent.CLICK, navigationClicked);
    contact_btn.addEventListener(MouseEvent.CLICK, navigationClicked);
    stage.frameRate = 30;
    var buttonsArray:Array = [works_btn,about_btn,contact_btn];
       function setButtons():void
       { for (var i:int=0; i<buttonsArray.length; i++)
          {   buttonsArray[i].id = i;  
             buttonsArray[i].buttonMode = true;  
             buttonsArray[i].mouseChildren = false;  
             buttonsArray[i].mouseEnabled = true;  
             buttonsArray[i].addEventListener(MouseEvent.ROLL_OVER,playOver);  
             buttonsArray[i].addEventListener(MouseEvent.ROLL_OUT,playOut);  
             buttonsArray[i].addEventListener(MouseEvent.CLICK,doClick);  
    function playOver(event:MouseEvent):void
       {   event.currentTarget.gotoAndPlay("over");
    function playOut(event:MouseEvent):void
       {   event.currentTarget.gotoAndPlay("out");
    function doClick(event:MouseEvent):void{
       var currentBtn:int = event.currentTarget.id;  
       setSelectedBtn(currentBtn);
    function setSelectedBtn(id:int):void{  
       for (var i:int=0; i< buttonsArray.length; i++) {  
          if (id == i) {  
             buttonsArray[i].gotoAndStop("down");  
             buttonsArray[i].buttonMode = false;  
             buttonsArray[i].mouseEnabled = false; 
             buttonsArray[i].removeEventListener(MouseEvent.ROLL_OVER,playOver);  
             buttonsArray[i].removeEventListener(MouseEvent.ROLL_OUT,playOut); 
             buttonsArray[i].removeEventListener(MouseEvent.CLICK,doClick);
             } else {  
                if(buttonsArray[i].currentLabel =="down"){
                   buttonsArray[i].gotoAndPlay("out");  
                   buttonsArray[i].buttonMode = true;  
                   buttonsArray[i].mouseEnabled = true;  
                   buttonsArray[i].addEventListener(MouseEvent.ROLL_OVER,playOver);  
                   buttonsArray[i].addEventListener(MouseEvent.ROLL_OUT,playOut);  
                   buttonsArray[i].addEventListener(MouseEvent.CLICK,doClick);
    setButtons();
    function navigationClicked(Event:MouseEvent):void
       var frmLabel:String = '';
        switch (Event.target)
          case works_btn :
                frmLabel = "Portfolio_frm";
                break;
            case about_btn :
                frmLabel = "About_frm";
                break;
            case contact_btn :
                frmLabel = "Contact_frm";
                break;
       if (currentFrame != frmGoto)
          var frmPortfolio:Number = this.getFrame("Portfolio_frm");
          gotoAndPlay(frmGoto);
    function getFrame(frameName:String):Number
        var frame:Number = 1;
           for (var i = 0; i < currentLabels.length; i++)
            if (currentLabels[i].name == frameName)
                frame = currentLabels[i].frame;
                break;
        return frame;

    Ok, so you're saying Flash has indicated the wrong Line Number that is causing the problem? It's funny because if I hadn't ticked publish debugging in the properties, the error would just say:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
       at Index_fla::MainTimeline/frame1()
    with no indication as to which line or frame is causing the problem.
    Anyway, I've inputted a code that deliberately causes an error and the line numbers match up (correct). I did this until Line 10 and the preloader error still indicates Frame 1, Line 11 (which is the var buttonsArray function). I did it after line 11 (line 12) and the error was identified as Line 12.
    any ideas?

  • Preloader starts at 80 Percent ??

    Hi guys,
    I'm running this script from the first action frame in order
    to load two scenes. Nevertheless, once I insert any large FLV file,
    the loader starts displaying only at 80 percent. Is there any
    alteration that anyone can suggest that will make sure this code
    captures from at least 10 percent? Your help would be much
    appreciated.

    FLV files are not streamed unless they are served from a
    Flash Media Server.
    The preloader issue is probably because the OP is using the
    FLV Playback
    Component. All components are by default set to load on Frame
    1, i.e.
    before your preloader has a chance to show up.
    To solve the issue, right click on the component in the
    library, choose
    "Linkage" and uncheck "Export on first frame". Then set the
    "Export
    Frame for Classes" to something other than Frame 1. Do this
    by going to
    File>Publish Settings and under the Flash tab, and click
    the
    "Settings..." button next to ActionScript version.

  • Preloader with percent loading

    I think will be nice have a possibility to make a custom loader pager or maybe only have percents counting in the loader page of the Project ROME.
    Thanks;

    If you upgraded the course to Captivate 6 from version 5.5 the project may still be looking for the preloader in the old location under the Cp 5.5 install directory.
    Open your project and look at the path that is currently set for the preloader in the Preferences > Project > Start and End section.  If it is still pointing to the Cp 5.5 location, change it to point to the preloaders in Cp 6.

  • Percent preloader for video flv's?

    How do you code a preloader for an flv video that has a play
    head that starts as the preloader is running then the video starts
    playing? like on the following site in their work section:
    http://www.natl.tv/
    thx

    CAn someone help? I can't figure out what code to add so it
    shows the video buffering for 10-15 seconds, shows loading video
    text then starts playing the video.
    ANyone please?

  • Help with a preloader in AS3

    Hi,
    I upload a website and I have problems with the preloader did it in AS3. It starts after two or three minutes. I have a MC with an animation of 100 frames and the dynamic text of the percent. The preloader is located in the 1 frame to the 10, I mean, first frame with the actions and the other three layers (text, MC and background) with a lenght of 10. The movie has 525 frames. Here is the code:
    stop();
    addEventListener(Event.ENTER_FRAME, lodeando);
    function lodeando(event:Event):void
              var bytesTotales = stage.loaderInfo.bytesTotal;
              var bytesCargados = stage.loaderInfo.bytesLoaded;
              var porcentaje = Math.round(bytesCargados * 100 / bytesTotales);
              textoPorcentaje.text = porcentaje + "% Cargados";
              cargaAnimada_mc.gotoAndStop(porcentaje);
              if (bytesCargados == bytesTotales)
                        removeEventListener(Event.ENTER_FRAME, lodeando);
                        gotoAndPlay(2);
                        textoPorcentaje.text = "";
                        removeChild(textoPorcentaje);
                        removeChild(cargaAnimada_mc);
    Please, Could you help me?.

    These screen captures show the library of the movie. As you can see I export the most of them. However I have doubts about if I must convert to symbol the graphics. I have the preloader in the "presentación" folder without any exportation.
    Please, Could you correct the website?. Please, tell me an e-mail address and I send you the website via WeTransfer.

  • Problem with preloader not passing over nextFrame();

    The preloader I created doesn't transistion to the next frame, it just hangs on the preloader frame at 0%.  Here is my code:
    stop();
    loaderInfo.addEventListener(ProgressEvent.PROGRESS, updatePreloader);
    function updatePreloader (evtObj:ProgressEvent):void{
      var percent:Number = Math.floor((evtObj.bytesLoaded*100)/evtObj.bytesTotal);
      preloader_bar.width = (percent/100) * 600;
      preloader_txt.text = "Loading " + percent + " %";
      if (percent == 100) {
       nextFrame();
       this.removeEventListener(ProgressEvent.PROGRESS, updatePreloader);
    The problem is when the swf is called online it stops on the 1st frame and shows the preloader at 0% and does nothing.  I can right-click on the non-functional embedded flash swf and select play and it runs fine; but this doesnt make any sense for my users to be doing the same...  However, when the file is recalled after the first attempt it works fine.  Any ideas what could be going on?

    Thanks, I think it’s working!  I can't recreate the problem...
    Code:
    stop();
    if (this.framesLoaded == this.totalFrames){
    nextFrame();
    else{
    loaderInfo.addEventListener(ProgressEvent.PROGRESS, updatePreloader);
    function updatePreloader (evtObj:ProgressEvent):void{
       var percent:Number = Math.floor((evtObj.bytesLoaded*100)/evtObj.bytesTotal);
       preloader_bar.width = (percent/100) * 600;
       preloader_txt.text = "Loading " + percent + " %";
       if (percent == 100) {
        nextFrame();
        this.removeEventListener(ProgressEvent.PROGRESS, updatePreloader);

  • Add An Enter Button To a Preloader

    On my site I have 2 scenes and I'd like to add an 'Enter' button for moving from the preloader to the main site. How would I do that in this code?
    stop();
    preloader._width = 0;
    preloader._visible = preloader_bg._visible = true;
    preloader.onEnterFrame = function()
        filesize_total = _root.getBytesTotal();
        if( filesize_total == 0 ) filesize_total = 1;
        percent = Math.round( _root.getBytesLoaded() / filesize_total * 100 );
        txt = percent + "%";
        preloader._width = percent * 3;
        if( percent == 99 )
            delete this.onEnterFrame;}
    enter_btn.onPress
         gotoAndPlay("flashmo_dream", "start");

    I don't know where you are getting these tutorials, but they sound like they are very, very old. Along with not using AS2, you shouldn't be using scenes. Scenes are a left over method from the very earliest versions of Flash.
    The objective in preloading content is that you are loading in new content before the user needs it. If you are doing this loading well, the user will not know that the operation went on. Any sort of loading screen should only be seen if the user calls for content that has not loaded yet. Your design objective should be to show something to the user as quickly as possible when the user hits your site. Load in your additional content and then let the user experience your site.
    If you create a button on the stage in the same frame as your preloader object and name that button "enter_btn", then the code that you've shown above should do what you want.
    I haven't used AS2 in many years. I don't remember a lot about its syntax, but from what I read of your code, it looks like you are measuring the loading of the file that contains the preloader object. This methodology can lead to a problem. When Flash begins working, a certain amount of the movie has to load before anything is seen on the screen. This means that the loading telltale that you have set up in your code will never show "0%", and probably not even "50%".
    Here's a good tutorial that uses AS3 and fully explains the code and how the loader operates: http://flashexplained.com/preloaders/basic-loading-bar-preloader/
    Here's another: http://www.republicofcode.com/tutorials/flash/as3preloader/
    And here's a third: http://flashexplained.com/preloaders/making-the-complete-internal-preloader-in-flash-8-wit h-a-loading-bar-and-mathematical-preloaders/
    Take a look at those examples and compare and contrast their methods.

  • I have a preloader, but...

    I have an mp3 file in a Flash movie using Flash MX.
    The movie purely consists of the mp3 file and a stop and play
    button.
    I would like the music (or movie) to play when 50% loaded and
    I am searching the net to find a way.
    I already have a preloader which works perfectly using the
    following actionscript...but I'd like to know what to tweak in
    order to make the music (movie) play when 50% loaded. My current
    action script is as follows...
    lBytes = _root.getBytesLoaded();
    tBytes = _root.getBytesTotal();
    percentLoaded = Math.floor((lBytes/tBytes)*100);
    loader.bar._xscale = percentLoaded;
    loader.percent.text = percentLoaded + "% of " +
    Math.floor(tBytes/1024) + "K loaded.";
    if (lBytes>=tBytes && tBytes>0) {
    if (count>=12) {
    gotoAndStop("main");
    } else {
    count++;
    gotoAndPlay("preload");
    } else {
    gotoAndPlay("preload");
    ....I know that there are other ways of playing mp3 on Flash
    (ie. Media Playback Component and a multitude of templates on the
    net) however I find that the Flash players that load the mp3
    externally play at different speeds in different browers, so
    becuase of this I choose to have the mp3 located within the flash
    movie to avoid any inconsistancies amongst browsers. All I require
    is actionscript that makes the music (or movie) play when 50%
    loaded.
    I'm gonna continue to search for an answer, and if I find a
    solution I will update my post.
    Thanks!
    You can see the swf file in the following htm page...
    http://www.plobs.com/theme_song.htm

    Thanks for the info.
    I tried the action script provided, but it didn't
    work...maybe I inserted it in the wrong place.
    Anyhow, I am currently trying out your other suggestion. I'm
    in the process of creating the mp3 with 44HZ.
    If that doesn't work (fingers crossed it will), I will have
    another play around with the action script.

  • Looking for a preloader that would work with my fullscreen (liquid) flash

    Hi!
    I'm building my own Flash website using a fullscreen (liquid
    layout) Flash tutorial that I found somewhere (can't remember
    where)...
    I was having problems with a preloader that I've been using
    (modifying) for my Flash jobs... I decided to keep working on my
    website anyway and get back to that later... But now it's just
    annoying me and I'd really love to figure out how to get a
    preloader to work with my site.
    My site is not complete yet, and it's probably not built the
    best way it should (my first full-flash website!.. plus I'm a
    designer, I really suck with code) but here's a link to download my
    zipped .fla file (Flash CS3) + fonts (don't know if you need that
    but anyway):
    http://www.studioorangedesign.com/SOD_site.zip
    Hopefully, you guys can tell me how I could get a preloader
    to work with my site.
    All I really need is to have a really simple clean font that
    shows a percentage going up or a bar filling up... nothing fancy
    needed here...
    Thanks!

    Hi there,
    The following code is what I use for preloading. You have to
    put it on the first frame. I think you will be able to attach it to
    your own code.
    //Actionscript 3
    stop();
    this.addEventListener(Event.ENTER_FRAME,testInterval);
    function testInterval(e:Event):void{
    var nLoadedBytes:Number = loaderInfo.bytesLoaded;
    var nTotalBytes:Number = loaderInfo.bytesTotal;
    //trace (nLoadedBytes / nTotalBytes * 100)
    percent.text = Math.round(nLoadedBytes / nTotalBytes * 100)+
    “% complete”;
    //trace (nLoadedBytes / nTotalBytes * 100)
    if (nLoadedBytes >= nTotalBytes) {
    trace(”load complete”);
    this.removeEventListener(Event.ENTER_FRAME,testInterval);
    play();
    //End
    Creation site internet |
    Radins
    |
    Jeux Concours |
    Programme TV

  • Need help with image gallery and preloader

    Here is my  portfolio site currently. WWW.PALMEI.COM. When you go into the the galleries you can view the images; the images load and it's all working fine. But if I was to go back on the page before the image was to load the image loads later which is then in the way of everything and cannot be deleted or removed. What would a solution be for solving this problem. Also, my preloader is not working at all as you can tell.
    Here is my code in frame 1 for the perloader:
    [AS]
    stop();
    loaderInfo.addEventListener(ProgressEvent.PROGRESS, updatePreLoader);
    function updatePreLoader(evtObj:ProgressEvent):void
                        var percent:Number = Math.floor((evtObj.bytesLoaded*100)/evtObj.bytesTotal);
                        preloader_txt.text = percent+"%";
                                  if (percent==100) {
                                            nextFrame ();
    [/AS]
    Thank you very much for your help. Have developed headache and need some new eyes on it.

    Thank you again Ned for your reponse as you helped me solve the image array problem last week or so ago.
    Here is the code:
    [AS]
    stop();
    import fl.transitions.Tween;
    import fl.transitions.easing.*
    import fl.transitions.TweenEvent;
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    var sep3Tween4:Tween = new Tween(Sep2_mc, "y", Regular.easeOut,338 , 655, 1, true);
    var sepTween4:Tween = new Tween(Sep_mc, "y", Regular.easeOut,0 , -320, 1, true);
    BoyBack.addEventListener(MouseEvent.CLICK, Portfolioclick);
    function Portfolioclick(evtObj :MouseEvent) {
              gotoAndStop("Portfolio");
               removeChild(B);
    var BoyBackTween:Tween = new Tween(BoyBack, "y", Regular.easeOut,510,487,2, true);
    BoyBackTween.addEventListener(TweenEvent.MOTION_FINISH, onfinis);
    function onfinis(e:TweenEvent):void {
    BoyBackTween.yoyo();
    var arrayB:Array = [ B1, B2, B3, B4, B5, B6, B7, B8,B9, B10, B11, B12];
    var arrayImages:Array = ["ill_1.jpg","ill_2.jpg","ill_3.jpg","ill_4.jpg","ill_5.jpg","ill_6.jpg","ill_7.jpg","ill _8.jpg", "ill_9.jpg","ill_10.jpg","ill_11.jpg","ill_12.jpg"];
    var imgLoader:Loader = new Loader;
    var B:BlackBox = new BlackBox();
    B.addChild(imgLoader);
    for (var i:uint=0; i<arrayB.length; i++){
         arrayB[i].mouseChildren = false;
         arrayB[i].addEventListener( MouseEvent.MOUSE_OVER, onButtonOver);
         arrayB[i].addEventListener( MouseEvent.MOUSE_OUT, onButtonOut);
         arrayB[i].addEventListener( MouseEvent.CLICK, onButtonRemoveB);
               arrayB[i].addEventListener( MouseEvent.CLICK, onButtonClick);
               arrayB[i].imgNum = i;
                     imgLoader.y  = 100;
                          imgLoader.x =275;
                          B.y = -55;
                     B.x =-100;
    function onButtonOver( e:MouseEvent ):void {
         var B:MovieClip = MovieClip(e.target);
         if(B.tween){
           B.tween.stop();
         B.tween = new Tween( B, "y", Regular.easeOut,600, 591, .5, true );
    function onButtonOut( e:MouseEvent ):void {
         var B:MovieClip = MovieClip(e.target);
         if( B.tween ){
           B.tween.stop();
         B.tween = new Tween( B, "y", Regular.easeOut, 591, 600, 1, true );
    function onButtonRemoveB( e:MouseEvent ):void {
    removeChild(TwoDtxt);
    function onButtonClick( e:MouseEvent ):void {
       if(this.contains(B)){
           removeChild(B);
       imgLoader.load(new URLRequest(arrayImages[e.currentTarget.imgNum]));
       imgLoader.contentLoaderInfo.addEventListener( Event.COMPLETE , loaded);
    function loaded(event:Event):void {
         addChild(B);
          var targetLoader:Loader = Loader(event.target.loader);
    var AlphaTween1:Tween = new Tween(T1, "alpha", Strong.easeOut, 1, .20, 2.5, true);
    var AlphaTween2:Tween = new Tween(Bottom1, "alpha", Strong.easeOut, 1, .20, 2.5, true);
    [/AS]
    Before the image loads if you were to click on the boy with the balloon"the back button" the image would than load later on say the"portfolio" part of the site.

  • Flash MX Preloader for external JPGs

    Hey all! Any help would be greatly appreciated. In all
    honesty, I have searched and studied and worked to get this myself,
    which I do alot with code, etc. BUT I am going to admit I'm a "make
    it pretty on the outside" kind of guy, and coding makes my eyeballs
    fall out and well, honestly, I just don't get it. My brain can not
    wrap itself around this. Sigh! So I could use your help a little.
    This is what I'm wanting to do. I have a website,
    www.luxeillustrato.com, and if you go to the portfolio area, and
    click on any of the sections (take fine art for example); it will
    showcase my works by loading external jpg files each time you click
    the forward arrow button.
    You can see I have preloaders on the site, that work fine. My
    main page has a movie target with the instance name of photoM. You
    click "artist", and it loads a new swf file into the photoM target.
    IF you click on "portfolio", "fine art", it loads the fine art swf
    file into photoM, using a preloader. THEN, if you click on the
    forward arrow button, a new jpg image of my work is loaded into the
    fine art movie target with the instance name of just
    photo. As you can see, you have to wait until the jpg image
    loads (and you start to wonder if it's doing anything.)
    The problem is, it is not preloading the external jpgs, it's
    just preloading the fine art swf. My preload code is currently:
    stop();
    onEnterFrame = function () {
    totalBytes = _parent.getBytesTotal();
    loadedBytes = _parent.getBytesLoaded();
    percent = Math.ceil((loadedBytes/totalBytes)*100);
    gotoAndStop(percent);
    info_txt.text = percent+" %";
    if (percent>=100) {
    _parent.gotoAndPlay("inter");
    I already have the preload animation bar created (as you can
    see on the site.) What do I need to do to alter the code above (or
    replace it) in order to have the external jpgs be preloaded as
    well? For example's sake, let's just say I have four jpgs, titled
    "door.jpg", "orange.jpg", "boyfriend.jpg", and "untitled.jpg" (in
    case these are needed for the code. They may not be.)
    I hope this is easy to understand. If NOT, just tell me. I'll
    simplify. And seriously, thanks!

    put a stop() on the first frame of your external swf in an otherwise empty first frame.  when preloading is complete apply a play() to your loader's content cast as a movieclip:
    function contentLoaded(evt:Event):void {
        //Optionally change to a clip holder and set progressbar visibility.
        addChild(contentLoader);
    MovieClip(contentLoader.content).play();

Maybe you are looking for

  • Could not find stored procedure

    Dear gurus, I am working, for the first time, on a SAP BPC ( MS ) demo. I have created a new input schedule based on a dynamic template, with some modifications. However when I try to submit data, it gives an error: "Could not find stored procedure '

  • Airport express and apple tv, airport express and apple tv

    Hi     Just wandering if this is possible. I was wandering if I could set up a wireless network with an airport express and then connect the apple tv to it so I could show movies etc via my MAC while travelling. Note there would be no internet connec

  • Displaying images in dynamic text fields

    Hi, I am having some difficulty getting my images to display in a dynamic text field. The images are linked from a txt file with the <img src=""> tag however they are not showing up in the text area. The rest of the html are rendering fine except the

  • Data replication and synchronization in Oracle 10g XE.

    We are trying to do data replication and synchronization sort of thing for all our servers. We are using Oracle 10g. XE. I guess there are some features in oracle already for replication but I am not very sure about them. To explain it more clearly -

  • Reasons for not clearing GR/IR

    Hi Gurus, There are certain transactions, which have not been cleared by executing t.code:f.13 Can any one specify why is this? What are the reasons? plz.