A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: [F8] dynamic function?

Threaded View

  1. #12
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    You can test it out if you like.. (you helped me complete it)

    documentation:
    Welcome to the simplePreloader component.

    Desc:
    This component will give you a visual representation (both through animation & percetange loaded text) on how much of your content is loaded into it's 'target clip'.

    Overview:
    it is very easy to use. You drag a component to the stage, and you 'assign' it a target clip (movie clip) to watch. Anything that gets loaded into this 'target clip' will trigger the simplepreloader to show and display how much left there is to load. When complete, the movieClip will disappear. Load another piece of content (image, swf or video clip) and the preloader will trigger again.

    Once you have your component instance on the stage, make sure to give it an INSTANCE NAME. By selecting the simplePreloader instance, you can then go the PARAMETERS panel in the PROPERTY INSPECTOR and assign the custom values for you component & movie.

    PARAMETERS:

    1.) loaderColor: choose a #color that you want the rotatingArrows to be.

    2.) percentVisible: choose to display the percentage textField or not.

    3.) percentColor: choose a #color that you want the percentage text to be.

    4.) rotateSpeed: number value that depicts the speed of the rotatation.

    5.) targetClip: 'path' (relative or absolute) to the movie clip you want the simplePreoader to 'watch' and give results on. (Note: the path is /home to whatever timeline the simplePreloader is in)

    6.) callbackFunction: lets you declare a function name that you want executed after the 'loading' is complete. (NOTE: do NOT include the () after the funciton name)

    7.) alwaysOn: lets you decide to have the 'check' (onEnterFrame) running continuously.

    (Note: it is recommended to run this default in FALSE (off) mode, and manually move the playHead to frame 2 on the simplePreloader component)

    TRUE MODE: Lets you ONLY do a simple 'loadMovie()' on your target..and the 'simplePreloader' will do the rest. (but leaves code running all the time and can eat up resources)

    Example: (alwaysOn set to TRUE)
    Code:
    button1_btn.onPress = function(){
        containerClip.imageHolder.loadMovie("image1.jpg");
    }
    FALSE MODE: (recommended) Means you have to manually advance the playhead to frame 2 in the 'simplePreloader' component, but does not leave messy or rampant code running.

    Example: (alwaysOn set to FALSE)
    Code:
    button1_btn.onPress =function(){
        containerClip.imageHolder.loadMovie("image1.jpg");
        simplePreloader.gotoAndStop(2);
    }
    I removed the .jpg's (so I could attach/file size) just put any images called image1.jpg, image2.jpg, image3.jpg in the folder of the TEST .swf (to test the component)

    I included the.swc so you can install it if you desire and have it in your components panel for a quick preloader.

    any suggestions would be great... not sure what else you can do I suppose..
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center