A good simple preloader.

I've asked some questions regarding this before on a project I had to put on the backburner.  But I'm back to that project now and am looking at it with new fresh eyes so I thought I'd bring it up again in a new discussion.  I'm working on a Flash website, using Actionscript 3 in Flash cs5.5.  I need a preloader...one that loads and opens a seperate swf.  I got some help putting some code together to make a preloader like this and it works but I'd like to make one more visually pleasing. 
Can anybody either give me advice or possibly point me towards a tutorial that will teach me to make a preloader with a some sort of loading graphic, like a status bar or something(doesn't have to be anything too crazy) that will load and open another swf?  I've found tutorials in the passed that show how to make status bars and stuff but they're all coded to load another frame within the same swf, which isn't what I want and I don't know my way around as3 well enough to modify it for what I need.
The key here really is I want it to be simple.  I'm not an actionscript whiz by any stretch. 
thanks guys!

If you look at the loop function in the code he provides, that is what you will use to control things like a loading bar... the key being to understand and make use of the perc value that is being calculated. 
You can use the perc value to control the scaleX of something, such as a status bar...
yourStatusBar.scaleX = 0;  // a starting value for your status bar
function loop(e:ProgressEvent):void
    var perc:Number = e.bytesLoaded / e.bytesTotal;
    percent.text = Math.ceil(perc*100).toString();
    yourstatusBar.scaleX = perc;

Similar Messages

  • Very simple preloader

    Hi!!
    I'm looking for a simple preloader with a % to load my movie.
    Does anybody have it?
    I'd like to copy the code and put on my movie, simply this.
    I try to use standard preloader in Cs5.5 but I can't understand how to use it...
    Thank you so much
    Ciao!

    Here is a link to a tutorial that explains the design and provides the code...
    http://www.gotoandlearn.com/play.php?id=85

  • Help with simple preloader- please

    hello,
    i'm trying to get a simple preloader and progress bar working
    for a swf file. The problem is the main swf. movie starts playing
    under preloader before the preloader is finished. So when the
    preloader has finished you are already well into the main movie.
    (After the movie loops you can see the first part that was missing
    during the preload.) This is the AS that i found from a web site
    (MonkeyFlash), it is AS 3. Below is the script.
    here is a link to the page with the movie:
    http://www.aquatichealings.com/new/
    Also is it not advisable to use AS3 because it will only work
    in Flash 9 and not below and most people may not have 9? Should i
    be starting over in AS2. I had built a AS2 in Flash CS3 but had the
    same problem.
    Please kindly advise on how to make it work correctly. I'd
    really appreciate some help, i've gotten books and scoured the web
    for different methods and i'm afraid i'm a bit of a numb skull with
    Flash and can not seem to get a simple preloader and progress bar
    working correctly. THANKS!
    gregory
    var myRequest:URLRequest = new URLRequest("aquatic-h.swf");
    var myLoader:Loader = new Loader();
    myLoader.load(myRequest);
    myLoader.contentLoaderInfo.addEventListener(Event.OPEN,showPreloader);
    myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,showProgress);
    myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,showContent);
    var myPreloader:Preloader = new Preloader();
    function showPreloader(event:Event):void {
    addChild(myPreloader);
    myPreloader.x = stage.stageWidth/2;
    myPreloader.y = stage.stageHeight/1.2;
    function showProgress(event:ProgressEvent):void {
    var percentLoaded:Number =
    event.bytesLoaded/event.bytesTotal;
    myPreloader.loading_txt.text = "Loading - " +
    Math.round(percentLoaded * 100) + "%";
    myPreloader.bar_mc.width = 198 * percentLoaded;
    function showContent(event:Event):void {
    removeChild(myPreloader);
    addChild(myLoader);
    }

    ... the pre-loader clip must be accompanied by a "stop"
    perhaps a "stop all sounds", too ActionScript on the action layer
    of the main timeline.
    I keep it simple and ask my prloader to not let the main
    timeline play until the final frame of the movie has loaded. The
    final frame is accompanied by a frame labeled "End" on a layer of
    the main timeline of just labels.

  • Simple preloader in AS3 - HELP

    Hi,
    Could anyone please point me in the direction or tell me how
    to build a simple preloader in AS3/PlashPlayer 9.
    I'd just like to have a movie clip in frame one which
    animates until the rest of the timeline has loaded, then once
    loaded go to frame 2.
    I've had a look in the doucumentation and around the web to
    find something but can't find anything that works and I'm finding
    it quite hard.
    Thanks in advance

    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.

  • Simple preloader problem

    hey, Im new to actionscript 3 and I am trying to make a a simple preloader for a game. the game is a SWF file located in the same directory as the preloader. the premise is very simple but I cant seem to understand my error problems. I have a MC called "preloader_mc" on stage (it says Instance of: preloader_mc in the properties panel, but theres also an empty field called '<instance name>'). Inside the preloader_mc is my dynamic text field which is named "txtLoad", and 1/4 circle line which is supposed to circle the percentage loaded in the text field. the circle is name "circle_mc" which an instance name of circle_mc.
    I have an external AS file called PreloaderAS and it contains:
    package {
    import flash.display.MovieClip;
    import flash.display.Loader;
    import flash.events.Event;     
    import flash.events.ProgressEvent;
    public class PreloaderAS extends MovieClip {
    public var loader:Loader = new Loader();
    public function PreloaderAS(){
    loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loading);
    public function loading(ev:ProgressEvent):void {
    var pct:Number = ev.bytesLoaded/ev.bytesTotal;
    trace( ev.bytesLoaded + " / " + ev.bytesTotal + " = " + pct);
    circle_mc._rotation += 7;
    var strPct:String = Math.round( pct * 100).toString();
    preloader_mc_txtLoad.text = strPct + "% Loaded";
    The errors are:
    1119: Access of possibly undefined property _rotation through a reference with static type Class. (2x)
    1120: Access of undefined property preloader_mc_txtLoad.

    my files (.fla, .as, and the swf) are located here:
    http://www.speedyshare.com/files/27178512/download/preloader.zip

  • A good simple form

    Does anyone have aa good, simple form format in Dreamweaver 8. I'm creating a web site that my client needs to get good and accurate information from visiters. The info needs to get to one location where it can be organized and stored. We're hoping for a rather large response so simple is key.

    Below is a simple CSS styled HTML form:
    http://alt-web.com/DEMOS/CSS-Form.shtml
    However, the Form itself does nothing.  You will need a form processing script to validate fields, filter spam, gather and send data to your email address or database. 
    Which server-side programming languages does your server support? 
    What do you want to do with the data when the form submit button is clicked?
    Nancy O.

  • Help with simple Preloader. Error#1009  :-(

    Hello !
    I have a very simple preloader file which loads a "main.swf" file. I put on stage
    a LogoCompany (MovieClip), a Mask (MovieClip) and a Text (Dynamic).
    As the percentage of bytes from the .swf file increases, the Mask.x position is increased so the LogoCompany appears.
    Here is the code:
    // Simple Preloader
    var maskStart:Number = 116;
    var maskEnd:Number = 377;
    var maskMove:Number = maskEnd - maskStart;
    var myLoader:Loader = new Loader();
    // URL to swf.
    myLoader.load( new URLRequest("main.swf") );
    // Create event
    myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, myLoop);
    function myLoop(e:ProgressEvent):void
        var perc:Number = Math.round( (e.bytesLoaded / e.bytesTotal) * 100);
        trace ("perc == " + perc);
        txtMessage.text = "Loading... " + perc.toString() + "%";
        trace ("txtMessage.text == " + txtMessage.text);
        maskLogo_mc.x = maskStart + maskMove * perc / 100;
        trace ("maskLogo_mc.x == " + maskLogo_mc.x);
        if(e.bytesLoaded == e.bytesTotal)
            removeChild(maskLogo_mc);
            removeChild(logoCompany_mc);
            removeChild(txtMessage);
            txtMessage = null;
            addChild(myLoader);
    The animation is actually going till the end (100%).  But in the middle I always get this error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at main_fla::MainTimeline/main_fla::frame13()
    I really don't know what is going on.
    Can anyone help me with this ?
    Thanks in Advance.
    H

    Hello Ned.
    Thank you for your prompt reply.
    Unfortunately I got the same error after I followed your suggestions:
    - Moving the .load() function after everything.
    - Marking "Permit Debugging" on Publish Settings under Flash tab. (CS3 version here)
    Any more suggestions?
    Thanks in advance.
    H

  • How do i activate the dreamweaver simple preload?

    The code i'm talking about is this:
    // Example:
    // simplePreload( '01.gif', '02.gif' );
    function simplePreload();
      var args = simplePreload.arguments;
      document.imageArray = new Array(args.length);
      for(var i=0; i<args.length; i++)
        document.imageArray[i] = new Image;
        document.imageArray[i].src = args[i];
    Do I add this: simplePreload(); to the body onload attribute
    like so:
    <body onload="simplePreload();">
    Or is that incorrect?
    And then where do I add the images to be preloaded,
    in the body tag or in the javascript?

    What am I doing wrong?
    Why isn't the slideshow working? The second slide displays as a question mark.
    http://www.sunarchdesign.com/projects.html
    I put a preload image script in before the slideshow script but it doesn't preload the image before it plays the slideshow.

  • Simple and fast Preloader ?

    I know there are preloaders on the web, and tutorials for
    them but most of them are pretty complex. Does someone know a
    website or can someone tell me how I can make a very simple
    preloader with minimal work.
    (I’m a beginner with flash)

    Liquid-86 wrote:
    > I know there are preloaders on the web, and tutorials
    for them but most of them
    > are pretty complex. Does someone know a website or can
    someone tell me how I
    > can make a very simple preloader with minimal work.
    The basic loader with some progress bar and % of the loaded
    movie.
    On first frame of your timeline place the following action :
    stop();
    this.onEnterFrame = function () {
    bl = this.getBytesLoaded();
    bt = this.getBytesTotal();
    if (bt <= 0) {bt = 99;}
    offPreloader.gotoAndStop(Math.floor((bl / bt) * 100));
    preload_txt.text = Math.round((bl / bt) * 100) + " %";
    if ((bl == bt) && (bt > 0)) {
    delete this.onEnterFrame;
    gotoAndPlay (3);
    Than on the very same frame make a movie clip with some shape
    tween from small to large, this will be your progress bar.
    Make it 100 frames long. Once done give it instance name
    "offPreloader"
    Last this is to place dynamic text field with instance name
    "preload_txt"
    Pretty much it.
    Just make sure that the progress bar is not too large, like
    made
    out of bitmap images, you want to keep the preloader frame
    as small as possible so flash can load it quickly.
    Than start your content from frame 3 and you all done ---- TA
    DAAA !!!!
    Regards
    Urami
    Happy New Year guys - all the best there is in the 2006 :)
    <urami>
    http://www.Flashfugitive.com
    </urami>
    <web junk free>
    http://www.firefox.com
    </web junk free>

  • I'm looking for a script that preloads a Splash Screen on Android

    I've read all threads here already about this subject. For most AdobeAir projects for Android, no matter what size, it could take up to 20 sec to load the app, and while it loads, all you see is a black screen. As there's no support for a Default.png like there is for iPhone, we have to use a preloader.
    I've only found one for Flex, which is no good to me as I'm using Flash Pro 5.5 (IDE). I've tried doing some simple preload-a-swf-preloader but it just loads it to 100% before showing anything anyway.
    Anyone here that can share a script of a simple preloader for Flash CS5.5?
    I know that to reduce the loading time and show a splash screen on android we need to make a very small swf that will contain the loading screen image, and that same swf will also preload the maingame.swf (but can that be done? Appstore don't like code in more than one swf) into it. My tries have failed.
    Here's some quotes in case someone who reads this might be knowledgable enough to help me out:
    Yes its possible to get a splash to appear straight away (well within one to 2 seconds which is close enough) but
    (a) You have to create a small splash .SWF which loads your main .SWF (OK so that's fairly obvious but a "Default.PNG" splash screen facility as per the iPhone packager and FLEX projects is what you might expect)
    (b) Your splash .SWF must embed the splash image. If you try to dynamically load an image nothing will appear until the whole of the APK file is loaded ( and presumably initialised). That was what I was doing wrong.
    It takes 20 sec to load, it's all black before it's done loading and the runtime takes up 25mb!
    (1) Yes that is a bit of a problem but seems to be the cost of compiling in the AIR runtime.  I am sure that most mobile projects only use a subset of the entire AIR library - its a shame you can't just compile in the bits that you need and drop the rest.
    (2) This is partly because of (1) and the fact it takes so long to get a big file up and running with AIR.  You need to create a preloader that is very small and all it does is display a splashscreen and then loads in the main 25mb file that you embed in the assets of your preloader.  The small preloader appears quickly and then gives you time to do your 'work' loading the main app with something onscreen.  This gives an example / explanation and there are others out there :
    http://www.mcbrearty.me.uk/index.php/2011/05/09/actionscript-mobile-pr oject-splash-screen/

    Hi Nick,
    Using the FileSystemObject object to delete a folder will delete the profile directory, but it won't delete its associated registry path:
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\user's SID
    There are also two other complications: 1. you can't delete a profile for a user that's logged on; and 2. the user might have logged off, but the profile might not be completely unloaded (see
    http://support.microsoft.com/kb/837115 ).
    In the meantime, I recommend 'uphclean' and the 'delprof.exe' found in the Resource Kit utilities.
    HTH,
    Bill
    Can we combine FileSystemObject and deleting Reg Keys?
    ¯\_(ツ)_/¯

  • Flash Preloader

    Hi all,
    I am currently trying to build a simple preloaded for my
    company's portfolio, and I cant get anything to work! Anybody have
    any good websites or know of any tutorials online?
    Thanks,
    -Peachy

    A: [flash] Preloader

    Bueno creo que eso es para ponerlo en el primer fotograma de
    un MC, pero mi
    preloader se carga en otro nivel, entonces uso un
    loadMovieNum().
    Enzo C.
    "Santiago" <[email protected]> escribió
    en el mensaje
    news:f1vtes$7vi$[email protected]..
    >A mi me paso lo mismo muchas veces, hace poco descubri
    que puede ser porque
    >en mis movies estaba usando Componentes, y estos se
    exportan siempre en el
    >primer fotograma o estaba realizando la programación
    de manera tal de que
    >algunas cosas se ejecutaran antes que nada :(
    > De todas maneras hay una manera de hacer que las lineas
    de codigo del load
    > sean leidas por el reproductor antes que cualquier otra
    sentencia, y es
    > usando la Directiva #initclip - el material descripto a
    continuación es de
    > la ayuda de flash, con todo permiso :) -
    >
    > Directiva #initclip
    > - Indica el principio de un bloque de acciones de
    inicialización. Cuando
    > se inicializan varios clips simultáneamente, se
    puede utilizar el
    > parámetro order para especificar la
    inicialización que se ejecuta en
    > primer lugar. Las acciones de inicialización se
    ejecutan cuando se define
    > un símbolo de clip de película. Si el clip de
    película es un símbolo
    > exportado, las acciones de inicialización se
    ejecutan antes que la
    > acciones en el fotograma 1 del archivo SWF. De lo
    contrario, se ejecutan
    > inmediatamente antes que las acciones del fotograma que
    contiene la
    > primera instancia del símbolo de clip de
    película asociado.
    > Las acciones de inicialización sólo se
    ejecutan una vez que se reproduce
    > un archivo SWF. Utilícelas para inicializaciones
    que se realizan una vez,
    > como definición de clases y registro.
    > No inserte un punto y coma (;) al final de la línea
    que contiene la
    > directiva #initclip.
    > Disponibilidad: Flash Player 6.0; ActionScript 1.0
    > Parámetros
    > order:Number [opcional] - Un entero no negativo que
    especifica el orden de
    > ejecución de bloques de código #initclip. Este
    parámetro es opc... [Show more]

    Read other 3 answers

  • Creating simple photo gallery

    Hi,
    I'm trying to create a simple photography portfolio in Flash
    8, whereby the user clicks on a thumbnail and the image fades up. I
    have 24 thumnails, so do I need to create 24 different 'fading
    image' movie clips, or is there an easier way to do this? Is it
    possible to create one movie clip and then just update the image
    within it?
    I'm quiet a newbie so i might be missing somehting here...
    Any help greatly appreciated. David.

    Ok,
    So many of you started using this that I had to look it over
    and figure out how to make things easier. The setup on the stage is
    exactly the same, except you should now create a simple preloader
    movieclip and place it on the stage - name it "loader". Remove all
    the actionscripts you had attached to your buttons and the holder
    movie clip and everywhere else. The script below should be the only
    script in the movie and should reside in the first frame. Simply
    copy and paste the following script into the first frame of your
    timeline:
    /* SCRIPT STARTS HERE - COPY FROM HERE DOWN */
    /* make sure your jpegs are named Image1.jpg, Image2.jpg,
    etc., etc... */
    var reset:Boolean = false;
    /* change numOfImages to the total number of images you have,
    and create this many buttons on the stage named button1,
    button2, etc., etc... */
    var numOfImages:Number = 3;
    /* ====================== */
    /* create a movie clip that will act as your preloader and
    place it on the stage,
    name it "loader" */
    this.loader._visible = false;
    /* ======================== */
    this.holder.createEmptyMovieClip("jpegTarget",0);
    for (i=1; i<numOfImages+1; i++) {
    this["button"+i].ID = i;
    this["button"+i].onRelease = function() {
    _root.loader._visible = true;
    var targetName:String = "Image"+this.ID+".jpg";
    reset = true;
    _root.holder.jpegTarget.loadMovie(targetName, 0);
    _root.holder._alpha = 0;
    this.holder.onEnterFrame = function() {
    fadeIn(this);
    function fadeIn(clip) {
    if (clip.jpegTarget._width>1) {
    _root.loader._visible = false;
    dif = 100-clip._alpha;
    if (Math.abs(dif)>1 && reset == true) {
    /* the .3 in the next line controls the speed of the fade
    change it and experiment */
    clip._alpha += dif*.3;
    /* ================= */
    } else {
    clip._alpha = 100;
    reset = false;
    /* END OF SCRIPT - DON'T COPY BELOW THIS LINE */
    The only things on the stage should be:
    1 blank movie clip named "holder" - position where you want
    picture to load
    1 movie clip named "loader" which is your preloading
    animation (or text or whatever)
    your buttons (thumbnails) which should be named button1,
    button2, etc.
    Make sure of the following:
    - Change the numOfImages variable in the script to match how
    many images and buttons you have. so if there are 5 buttons on
    stage loading 5 jpegs, change it to 5.
    - Target AS 2.0 in your publish settings
    - name your jpegs EXACTLY as follows: Image1.jpg, Image2.jpg,
    etc. If you move them to another folder, i.e., "images", make sure
    to put this in the script
    - name your button instances EXACTLY as follows: button1.jpg,
    button2.jpg, etc.
    The loader movie clip is up to you, and you may figure out a
    better way to handle this. This is pretty simple but should work if
    simple is what you're after. Please let me know if it doesn't work
    - good luck!

  • A simple question about Drag and Relate navigation

    Dear experts
    I have found SAP help or related manuals only good at talking difficult things such as how to customise the drag and relate targets, etc.  However, after I followed exactly and then how to test.
    Then I just see pieces of information, very unstructured.  Spending me a whole day, even I can't get a good simple example on how to really perform a drag and relate at least for the proof of concept at EP 6.0.   It spent a lot of time in describing what the navgiation panels about, what drag and relate targets.  Then how to do it in once transversal.  That is, with all customisation, how to drag and relate an object.
    My step is with iview A, shows a purchase order details showing a drag and relate enabled object like vendor no.
    Then I try to drag this vendor no. to a display vendor iview, iview B.
    I have known I have to put iview A and iview B to a Drag-and-relate targets.  I am sure I have done this.  Does it mean opening the portal, I will see both iview A and iview B appearing at the same time in the drag-and-relate target area?  However, in my case, it is not, iview A only appears in that area when I load it once, same to view B.  When I load iview B, iview A links from D&R target will be wiped off.  Then how I can drag an item from iview A to B while each one of them can only appear at any time.
    Can anyone give me a simple guide (don't give me an internet link from help.com) I have been tired of this.
    First, I would to make sure if my so called self-learnt drag-and-relate simple action is correct in the steps or really I have made something wrong in the customisation or even a bug there.
    Can anyone on the planet have this experience, pls. act as my teacher in this area?
    Rgds
    Stephen

    Thanks
    I have tried the 1st way already.  But I can see both iviews existing in the D & R targets.  Now I try to drag an item with business object BUS2002 from iview A to relate to LFA1 of iview B of the same back end system.
    But iview B shown up with that data of LFA1 shown up (in my case the vendor no.)
    I have used autocomplete relationship and I have checked it has been well-defined already.  Also check from metadata at backend they are both active.
    Do you have any clues to the pitfall in my case?
    Rgds

  • How to create a simple File structure for a large project?

    Hi to all,
    I've own and operated my own website design/development (a 1 woman office, plus many sub-contractors) over the period of 8 years. I started hand-coding HTML sites in 1997, before the creation DW (though I think the first ver was for Mac in '97). Over the recent years I've udated my skills to include CSS and enough Java/PHP to customize and/or troubleshoot current projects (learn as I go).
    The majority of my clients have been other 1-10 person entrepreneur companies. I've recently won a bid to redesign a government site which consist of 30 departments, including their main site.
    The purpose of this thread is to get some ideas on creating a file management/structure. Creating file management setup for smaller companies was a piece of cake, using a simple file mgmt structure within DW. Their current file structure is all over the place. I've read about a very good, simple file struture in a DW CS4 manual and wanted to get feedback on different methods that have worked, and have not worked, or your client:
    Here's my thinking:
    1. within the root dir place home.htm and perhaps a few .htm related only to home
        2. create the following folders off the root, "docs, imgs/global, CSS, FLA, Departments"
                - sub folders within docs for each dept
                - site wide css's placed into CSS
                - site wide FLAs into the FLA
                - sub-folders created within 'imgs' for each dept, including a 'global folder' for sitewide images and menu imgs (if needed)
    - OR -
    1. create same file structure for each dept folder, such as 'imgs/CSS/FLA/Docs'
    Open for suggestions....
    Ciao

    It is a problem I have thought over at length and still feel what I use could be better. You are doing it the right way around researching before you start, as moving files once things are underway can course real problems. One issue is the use of similar assets across site(s), and version control if you have multiple versions of the same asset.
    Can not say I have built a site(s) of that size but would recommend putting together a flow chart to help visualise the structure and find out better ways organising (works for me). Good luck, post back with your solution.

  • How can I get Preloader to work with my (Edge Animate) project?

    I have carefully followed the instructions to set up a simple preloader gif for my fairly large project. After hours of torturous examination, I still cannot find out why the preloader gif does not appear. Can anyone help?  The project is at:
    Coda -The Novel by AJ Levy
    To anyone that can see the problem, thanks in advance.

    Oooops -- it was working just fine. The gif just happened to be below the visible part of the page on the screen. Sorry.

Maybe you are looking for

  • Exporting Address Book to .csv file

    I am trying to export my contacts from Address Book to a ".csv" file. The only export options I am seeing are "Export vCard file..." and "Back-up Address Book". I find it very hard to believe that there isn't a way for me to extract my contacts and v

  • Need to send a mail from a specific From mail ID thorgh specific Mail serve

    Hi, If any errors occured in my interface validation program(plsql) I need to send mail to some mail ids, But I need to use specific from mail id and mail server. I have no idea of Shell scripting, I tried it with plsql itself but not worked. My Appl

  • My ipad will not appear in itunes and i have done all the troubleshooting

    I cannot get my itunes to accept my ipad. I am also having trouble with my ipad recognizing a camara kit sim card.

  • Reg SRM Scenarios

    I have no idea on what and how or anything abour SRM system and its components. But now I have to Integrate EBP & SUS (What are they & their purpose?) in SRM for exchange of some data like PO as attachments.I also have to send the same to R/3 also. I

  • JHS 10.1.3.1.26 - Using create mode as Default page

    Hi , I want to use create mode as default (while entering some page , user can insert new data immediately), any suggestions ? At present , I use javascript to call create button while page has been load. I think there must be some better way to do t