Skinning my custom preloader

Here is my custom preloader:
/* Custom Preloader */
package com.preloader {
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.geom.Rectangle;
import mx.preloaders.DownloadProgressBar;
public class DBPSubclass extends DownloadProgressBar {
public function DBPSubclass() {
super();
// Minimum display time after download
MINIMUM_DISPLAY_TIME = 0;
// Set the default text during initialization
// Progress
initializingLabel = "Download Complete!\nInitializing...";
// Override label area to display custom text
override protected function get labelRect():Rectangle {
return new Rectangle(14, 5, 150, 30);
// Override download progress handler to display
// Custom Text
override protected function
progressHandler(event:ProgressEvent):void {
super.progressHandler(event);
label = Math.round(event.bytesLoaded / 1000).toString()
+ "k of " + Math.round(event.bytesTotal / 1000).toString()
+ "k";
// Override to ensure display of progress bar during init
and download
override protected function
showDisplayForDownloading(elapsedTime:int,
event:ProgressEvent):Boolean {
return true;
// EOF
How can I change that ugly rectangles 1. corners to be
straight edges, 2. color to black.?

Only 1000 lines?Well... It's just a small personal project... but then you can try loading your main movie into a container and monitor the load progressHm-m-m-m... There is actually NO main movie... There are several F4V files though, which are loaded on the start up and then playing (e.g. every button is a 'movie reel'...), and I already monitor their loading progress
I was simply trying to analise my website statistics and found out plenty rejects from Safari users in particular...
Although, there are many other reasons for leaving a website (not necessary my own Super Mega Flashy one) after less than 15 seconds, I did a timekeeping again - Safari does load the project twice slower...

Similar Messages

  • How to Create Custom Preloader

    Hai,
    I wnat to create custom Preloader with Progress bar and
    Percentage
    Can you help me
    Thanks

    on your application tab..  you can specify the preloader class..
    <mx:Application preloader="Your preloader class" />
    and make sure your preloader class extends DownloadProgressBar class.
    public class PreLoader extends DownloadProgressBar and also
    override public function set preloader(preloader:Sprite):void
    override this function ..
    BaBo,

  • Stateful skins with custom states

    Hi, i'm desperately trying to create a stateful skins with
    custom states defined in my component.
    However, all stateful skins examples i've found so far use
    built-in flex statex, mostly from buttons, to accomplish this.
    when i define my own states, the ProgrammaticSkin class
    doesn't seem to know about my custom states.
    Has anyone a hint how to do this ?
    thanks!

    "pulse00" <[email protected]> wrote in
    message
    news:gmaoou$bta$[email protected]..
    > Hi, i'm desperately trying to create a stateful skins
    with custom states
    > defined in my component.
    >
    > However, all stateful skins examples i've found so far
    use built-in flex
    > statex, mostly from buttons, to accomplish this.
    >
    > when i define my own states, the ProgrammaticSkin class
    doesn't seem to
    > know
    > about my custom states.
    >
    > Has anyone a hint how to do this ?
    What are you wanting to apply the skins to that knows how to
    get the state
    information into your skin?

  • Flex Custom Preloader

    Hi,
    I've read a lot of tutorial about custom Preloader. I made
    one, by extending the Sprite Class and implementing the
    IPreloaderDisplay interface.It works, I added a custom Image, a
    small progress bar with a percentage label. What I'm not able to do
    is CHANGING THE BACKGROUND. The goal is to have a repeated image as
    a backgroundImage. But I don't even succeed in changing the
    backgroundcolor.
    Can anybody help me?
    Thanks in advance.
    Davide

    Ok. I went and made a small example - cut'n paste stuff.
    Perhaps not the best way but works for me.

  • Custom Preloader

    I made a website in Flash Catalyst, and imported it to Flash Builder to ad some
    features, like key input, fullscren.
    The main thing I also wanted to do was to create a custom preloader. I made a SWC file in Flash, but can't make it work.
    Since I am a graphic designer and don't really know anything about Flash/Flex, but I desperatly need help finishing the project.
    Do  you guys have any advice /codes (I've read everything on the net...) that you can share.
    Or better yet, would you like to do the job (payed via paypal).
    Thanks in advance,
    phil
    SWEDEN

    You might try watching this tutorial by Adobe's Lee Brimelow at http://gotoandlearn.com/play.php?id=108. Another tutorial can be found here: http://www.leavethatthingalone.com/blog/index.cfm/2009/11/11/Flex4CustomPreloader
    Good luck!

  • Centering Custom Preloader

    Does anyone know how to center a custom preloader I don't
    know how to find the broswer width & height in my custom
    preloader class file.
    Thanks for your help

    Thanks for your reply.
    I tried couple of different ways to set both horizontalCenter
    and verticalCenter = 0 but, I was not able to get this to work.
    I'm using this example to create a preloader...
    http://livedocs.adobe.com/flex/201/html/app_container_064_19.html
    add in my main mxml file ....
    preloader="CUSTOM.PreloaderClass"
    Thanks for your help.

  • Skinning a custom List

    I'm trying to create a list with some custom functionality, and I want to be able to re-use it with different skins for different situations.  I made a simple list class, and started filling out it's functionality, then I realized I couldn't set the skinClass property from outside anymore!
    So, in a file called CustomList.mxml within an RSL library, I define the most basic sparks list:
    <s:List xmlns:fx="http://ns.adobe.com/mxml/2009"
                                                        xmlns:s="library://ns.adobe.com/flex/spark"
                                                        xmlns:mx="library://ns.adobe.com/flex/mx">
              <fx:Declarations>
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
              </fx:Declarations>
    </s:List>
    Then, in a module, I create one of these lists and try to assign it a skin class:
    <CustomList id="receiptList"  height="100%" width="100%" skinClass="skins.CustomListSkin" itemRenderer="renderers.CustomItemRenderer" />
    And I get a compiler error:  Cannot resolve attribute "SkinClass" for component type controls.CustomList.
    Why can I not do this?  I could set the skinclass directly in customlist.mxml in the tag at the top, but it is inaccessible from outside!  Also, if I changed the tag in the module to say just "s:List" instead of "CustomList", it works fine.  Can someone point me in the right direction?

    Nevermind!  Nevermind.  I had two classes named CustomList in two different libraries, and my module was all confused.  I spent hours on this problem.  This is the king of stupid mistakes.
    Sorry to trouble you all.

  • How to force updatedisplaylist in a skin when custom property changes

    Hi Folks,
    I have created a custom component based on a Spark Button.  In that custom component I have added a single, public, bindable property - let's call it Fred.
    I also have a custom skin, based on the Spark Button skin.  It's basically just like the delivered skin, just a bit different graphics stuff.  I have applied the custom skin to the custom button component.  So far, so good.  However...
    When a user action causes the Fred property to change on a custom button instance, I need my custom skin to re-draw something.  It appears that I need the skin's updateDisplayList function to fire.  Unfortunately, it appears that the only time that it fires is when "real" properties are changed, like 'left' or 'width'.  How can I get the custom skin to updateDisplayList when this fake, custom property changes?
    p.s. - the custom skin can 'read' the custom Fred property just fine.  And, if I set the Fred property and then 'mouse over' the custom button instance, the updateDisplayList fires...too late of course, but it does fire.
    I have read the docs, but there is not much written about updateDisplayList, or when it fires, or how to make it fire.
    Thanks,
    -David

    Good question...in my skin's 'creationComplete' event I call a function in the skin.  That function 'evaluates' the host component's Fred propertey, and based on what it finds, it draws some stuff:
    protected function doSpecialDrawing():void
         var hostFred:String = hostComponent.Fred;
         if (hostFred == "certain_value")
              //set some property in one of the path objects in my skin to a certain value
         else if (hostFred == "other_value")
              //set some property in one of the path objects in my skin to some other value
    When I created the skin, I did not anticipate the need to dynamically respond to setting the Fred property/value.
    I've placed a call to the 'doSpecialDrawing' function inside the skin's updateDisplayList, but unfortunately, the updateDisplayList does not seem to get called in real-time when I set the Fred property in a custom button instance.
    I'm all ears here... still a beginner/novice with Flex...
    Thanks,
    -David

  • Problem about custom preloader in Flex 1.5

    I read the article written by Eric Anderson and test his
    sample.But i met some problems.
    the codes is on
    http://weblogs.macromedia.com/eanderson/archives/2004/12/preloader_in_fl.cfm
    I can only see the "Loading Your Application View . . . ",
    but can not see "LOADED:" or "TOTAL:" in the function
    setProgress().It seems that the function is never called.
    What's wrong?
    thanks in advance.

    The setProgress() method is only called when downloading the
    SWF from a
    remote location. Is your SWF on a server? You also need to
    clear the cache
    before each download.
    Glenn

  • Custom text not appearing on stage if not preloaded.

    Hi,
    I've added text to the stage and if I test it out using ctrl+enter, it does not show up. If the swf "loads"/"simulate load" then the text shows up, but not in the correct font.
    This is the error when the swf is not preloaded:
    VerifyError: Error #1014: Class flashx.textLayout.container::ContainerController could not be found.
    at flash.display::MovieClip/nextFrame()
    at spot_fla::MainTimeline/l()
    I've also recently added an AS3(CS5) preloader which is when this started. The library mc items have been set to export in frame 2 but the font doesn't show up. The font has been embedded as well but linking/unlinking it does nothing. The AS3 preloader is a simple script that a lot of tutorials online use. Let me know if you want it posted.
    The "Advanced ActionScript 3.0 Settings" are default except:
    Export classes in frame: 2
    Preloader method: Custom preloader loop
    The textfield is located in frame 2 of the timeline and is not referenced in AS. However it is inside of a mc that has a mouse listener on it(mc).
    Any ideas what the problem is? Thanks.

    Oh wow. It's running so much better now. I didn't realise how much memory it took up, should have looked it up.
    Thanks
    Some basic info for anyone else reading this.
    http://forums.adobe.com/message/2913998
    http://pixelpaton.com/?p=2396

  • My preloader doesn't want to work

    I'm creating a website using Flash CS5 and AS3.
    For this website I've put a preloader on the 1st frame and the site on the 2nd.
    I've tested the site after having created a small animation which makes appear the main menu, a logo and an image.
    Everything did work good, so I went on building the site.
    Now that I have created some pages I've tested again the whole site and the preloader doesn't work anymore.
    Testing the site on the "ctrl+enter" window and simulating the download I have a white background (both the preloader and website background are yellow) then I see the preloader for a fraction of second and suddenly the site appears.
    Publishing the site on my web space the background is correctly yellow, but the preloader doesn't appear, the browser's loading bar stops at half then the preloader appears again for a fraction of seconds and suddenly the site appears (tested on Firefox, IE, Opera, Chrome and Safari, same behaviour with all of them).
    It looks that the preloader is become part of the site and that there is an invisibile preloader.
    The setting in: Publish settings -> Flash -> Script Settings -> Library Path -> Default Linkage
    is set to "Merged into code"
    the same happen if I set "Runtime Shared Library" and "Custom Preloader Loop".
    Instead if I set the default preloader (ActionScript 3.0/rsls/loader_animation.swf) it appears correctly.
    My preloader should be good since it did work and I haven't modified it.
    What could cause this problem?

    in your new fla that will load your main swf, you can start with:
    var tf:TextField=new TextField();
    addChild(tf):
    tf.multiline=false;
    tf.text="0% Loaded";
    tf.autoSize="left";
    tf.x=(stage.stageWidth-tf.width)/2;
    tf.y=(stage.stageHeight-tf.height)/2;
    var ldr:Loader=new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,completeF);
    ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,progressF);
    ldr.load(new URLRequest("main.swf"));  // assuming main.swf is the correct file name
    function complete(e:Event):void{
    ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE,completeF);
    ldr.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,progressF);
    removeChild(tf);
    addChild(ldr);
    function progressF(e:ProgressEvent):void{
    tf.text=Math.round(100*e.bytesLoaded/e.bytesTotal).toString()+"% Loaded";

  • How do I add a FullScreen button to Project Playback Skin?

    How do I add a fullscreen button to the project playback skin? I know how to load another skin (using Project -> Skin Editor) and how to add a custom playback skin (paste custom skin SWF into C:\Program Files\Adobe\Adobe Captivate 5\en_US\Gallery\Playbars) but I'm having a little trouble figuring out how to add a fullscreen button when editing the Flash AS3 so that it will show up in my custom playback skin when loaded into Captivate via Project->Skin Editor. Any ideas?

    Hi there
    I might assume that seeing as you were able to work the magick with the CC button it would be a simple task to pick apart the other elements and add the desired button without hijacking the CC button.
    I mean, if you are that deep in Flash territory and all, it doesn't seem like much of a stretch to figure out how the buttons are added, no?
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcererStone Blog
    Captivate eBooks

  • Nesting JSF components in a  custom component

    I'm creating a new JSF custom component. my component needs to include an input text and a list box. my question is : how do I add these components to my JSF component ? I want to use to JSF component to render them rather then encoding the HTML myself. how can I do it ?
    I was told I need to use encodeChildren method somehow but I don't know how ?

    I finally found how to set a default skin to a custom component so that users of my component will not have to set again the skinClass value of my component.
    You have to create a defaults.css file at the root of your library and tell the compiler to take it into account.
    The remaining problem is about the compiler. There are some steps before success and they are a bit mysterious/unclear....
    I found 2 or 3 blog articles explaining those steps but the compiler arguments to use are all differents in each article...
    Here are the links I found:
    http://www.unitedmindset.com/jonbcampos/2010/05/12/creating-custom-spark-components/
    http://www.betadesigns.co.uk/Blog/2010/05/14/default-skin-for-custom-flashbuilder-componen ts/
    http://flexdevtips.blogspot.com/2009/06/default-stylesheet-in-swc-flex-library.html
    Following the first article guidelines has been successful for me but I'm not marking this topic as Resolved because I'd like some answers about this whole thing...

  • Nest array in a custom component

    Hello and thanks in advance,
    I am building a custom datagrid component name custDG. It is a canvas containing the DG and some other visuals. So the actual component is based on canvas and has a DataGrid nested.
    I have also build a custom class name config based on Array to hold the DG column information
    AND a custom object class name col to hold each column information inside the config array class...
    My question is how to make it possible for user to nest the array and columns inside the custom component when adds it to an application. For example:
    <mike:custDG... >
         <mike:config>
              <mike:col.../>
              <mike:col.../>
              <mike:col.../>
         </mike:config>
    </mike:custDG... >
    Want to make something similar to the columns-datagridcolumn thingie but with custom classes in a custom component.
    Anyone plz?
    Thanks

    I finally found how to set a default skin to a custom component so that users of my component will not have to set again the skinClass value of my component.
    You have to create a defaults.css file at the root of your library and tell the compiler to take it into account.
    The remaining problem is about the compiler. There are some steps before success and they are a bit mysterious/unclear....
    I found 2 or 3 blog articles explaining those steps but the compiler arguments to use are all differents in each article...
    Here are the links I found:
    http://www.unitedmindset.com/jonbcampos/2010/05/12/creating-custom-spark-components/
    http://www.betadesigns.co.uk/Blog/2010/05/14/default-skin-for-custom-flashbuilder-componen ts/
    http://flexdevtips.blogspot.com/2009/06/default-stylesheet-in-swc-flex-library.html
    Following the first article guidelines has been successful for me but I'm not marking this topic as Resolved because I'd like some answers about this whole thing...

  • How Do I Fix This Runtime Shared Library Preloading Error?

    Hello,
    I just finished up my site, and this is the only thing holding me back from publishing it. Whenever I "Test" my site, I get this error: " Your content will not stream. Runtime Shared Library (RSL) preloading will require all of your content to download before the first frame will play.
    To prevent this you can change the Runtime Shared Library Library Settings, in the Advanced ActionScript 3.0 Settings dialog which can be raised from the Publish Settings dialog.
    The Runtime Shared Libraries being preloaded are:
    textlayout_1.0.0.595.swz for TLF Text"
    Does anyone know how to correct this error? If you do, could you please walk me through it step-by-step. I am still very new to "Flash Professional (CS5)" & "ActionScript (3.0)"

    Reference error is because the default linkage for textLayout.swc is Runtime Shared Library (RSL) with preload swf option so the reference will always be “RSLPreloader” if TLF is used.
    There are 2 options that we can avoid the reference error:
    1. Change default linkage to “Merged to code” which will add around 150KB to child swf file size.
    2. Change preloader method to “Custom preloader loop”, move all contents and scripts to frame 2. And finally, in the Advance ActionScript 3.0 Settings, export classes in frame to 2.

Maybe you are looking for