Preloader and Document Class BIG question (yeap please help)

Hy,
I know that this its a question posted many, many times, but
after searching the net, reading a lot of books and searching this
forum too, I cant get out with a solution. If I'd say for sure
there is no possibility to create something like this, I just go
back to old methods but is not the scope of Adobe with AS3 to
encourage the use of OOP principle or not?
The problem:
I have a single fla file (AS3) with a single frame on
timeline, frame that its there when you will create the file with
flash. In the library I have different symbols, that for simplicity
are only jpg image, (BitmapData) checked for export for
ActionScript and exported on frame one. An external .as file called
DocumentClass its off course my Document Class
This its all that I want to do with the fla, the goal its to
create, animate etc. only with AS3 in external classes, no timeline
script. I don't want to load external files, XML, or else in this
movie. I just want a single swf after compilation, no additional
files.
Ok, how do I create a preloader that will take care of
starting the logic after the whole swf its loaded and in the same
time shows the user a percentage or a load bar or something that
its not the blank screen when the swf its downloading. I want to do
this without another swf that load this swf, or timeline scripts,
or place all the content on second frame and then gotoAndStop to
the third frame. All this are not solution but cheap tricks, that
are against all this OOP principle that I just continue to read in
books and here from guru programmers.
The big question is:
It is possible to create a preloader, when use a document
class with your fla? And if yes, how?
I know that the Document Class its not instantiated if its
not fully loaded, if that's true when the document class will be
fully loaded? maybe after the whole movie its loaded? And, if its
true, it will never show a percentage bar "while" the movie its
loaded. And if that's true WHY use a document class anyway?
Thank you for reading this and I really wait to get some
answer.

I am pretty sure you cannot do self preloader with one frame
and all the objects in the library. I guess the key here is
one-frame design. Screen refreshes (renders) only when all the
scripts in the frame are executed - this is a very important thing
to understand about how Flash works. Yes, you can force screen
refresh with updateAfterEvent() method but it is attached to a
handful of events only (MouseEvent and TimerEvent) but, again, all
this functionality is available only after first frame scripts are
executed. Thus, it seems like the only way to create preloader from
within SWF is to use multiple frames and set library objects to
load in later (not first) frame.
quote:
And if that's true WHY use a document class anyway?
Well, preloader is the last thing that would be on my mind in
terms of using AS3 ability to link DocumentClass to the top movie.
This feature allows for very sophisticated architectural
approaches. It has no connection to preloader as to any other
features developer wants to implement. Neither it depends on or
negates timeline. As a matter of fact, although I love one-frame
applications, I find on numerous occasions that my application
would be more efficient if I used several (at least two) frames.
gotoAndStop is not deprecated. It is a valid MovieClip class'
method. After all, having only one frame doesn't mean not having
frames at all - there is one already. Frames are fundament of
Flash. AS3 did introduce frameless entities like Sprite, etc. but
it doesn't mean that frames are going anywhere.
I would agree that timeline code is inferior to
classed/packaged (read: better organized) code but, still, how is
it not OOP? Frame is an Object, right? Why using timeline is cheap
and not a solution?
On a side note, I see too many times how some authors (and
managers) are pushing their agenda (or close mindedness) onto their
audience with no real substantiation. Claiming that timeline in
Flash is not valid architectural decision from OOP standpoint is
totally wrong. As wrong as strict adherence to design patterns. I
don't think there is sharply defined "right" or "wrong" in
programming. One finds the best optimal solution. The goal is to
create something that works fine. Unless, of course, the process is
the goal - but very few of us can afford focusing on the process.

Similar Messages

  • My keynote seems to be misbehaving. Me, a teacher was preparing a ppt on keynote.all of a sudden, the navigator column to my left goes black and nothing seems to move. Please help! Only 12 hours before I take class.

    My keynote seems to be misbehaving. Me, a teacher was preparing a ppt on keynote.all of a sudden, the navigator column to my left goes black and nothing seems to move. Please help! Only 12 hours before I take class.

    Hi KRKabutoZero,
    Welcome to Apple Discussions
    You may want to look at Knowledge Base Document #58042 on A flashing question mark appears when you start your Mac.
    Do you have access to another Mac? You may want to backing up your files via Target Disk Mode (TDM) as well as running some utilities (Knowledge Base Document #58583 on How to use FireWire target disk mode.
    You may want to invest in a utility like DiskWarrior from Alsoft. It is great for troubleshooting drive malfunctions.
    As said before, you may also want to bring your iBook to your local Apple Store/Reseller.
    Jon
    Mac Mini 1.42Ghz, iPod (All), Airport (Graphite & Express), G4 1.33Ghz iBook, G4 iMac 1Ghz, G3 500Mhz, iBook iMac 233Mhz, eMate, Power Mac 5400 LC, PowerBook 540c, Macintosh 128K, Apple //e, Apple //, and some more...  Mac OS X (10.4.5) Moto Razr, iLife '06, SmartDisk 160Gb, Apple BT Mouse, Sight..

  • I know that how to convert any documents to pdf file, but don't know how to get barcode on it. I am using windows 8.1. and want to see barcode on my documents before the print. Please help.

    I know that how to convert any documents to pdf file, but don't know how to get barcode on it. I am using windows 8.1. and want to see barcode on my documents before the print. Please help.

    Hi Frank ,
    Please refer to the following link and see if this helps.
    https://helpx.adobe.com/acrobat/kb/error-organizer-database-damaged-reset-1.html
    Regards
    Sukrit Dhingra

  • I don't remember my security questions and I tried guessing them and now I can't buy anything for 8 hours please fix this so I can download stuff and I don't remember any of my security questions. Please help me out as soon as possible

    I don't remember my security questions and I tried guessing them and now I can't buy anything for 8 hours please fix this so I can download stuff and I don't remember any of my security questions. Please help me out as soon as possible

    Username188 wrote:
    I don't remember my security questions and I tried guessing them and now I can't buy anything for 8 hours please fix this so I can download stuff and I don't remember any of my security questions. Please help me out as soon as possible
    Go to https://getsupport.apple.com ; click 'See all products and services', then 'More Products and Services, then 'Apple ID', then 'Other Apple ID Topics' then 'Forgotten Apple ID security questions'.

  • TS2446 i cant change my sercurity question and answers :( i forgot it and now i cant verify it :( please help me

    i cant change my sercurity question and answers
    i forgot it and now i cant verify it
    please help me

    By can't change them do you mean that you don't have a rescue email address set up on your account : http://support.apple.com/kb/HT5312 ?
    If you don't (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 link above to add a rescue email address for potential future use

  • My screen is all messed up. Letters are big and don't fit correctly. Please help

    My screen is all messed up. Letters are big and doens't fit correctly. Please help!

    Is Zoom turned on?
    if so, press  command + option + 8.
    If that does not help, try resetting PRAM.
    Reset PRAM:   http://support.apple.com/kb/PH14222

  • I am now ina serious problem . i deleted my email id which i gave as apple id . And now i forgot the password of the apple id and the answer for the security question too. please help me :(

    i am now ina serious problem . i deleted my email id which i gave as apple id . And now i forgot the password of the apple id and the answer for the security question too. please help me

    Just go to this link:https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/         ...... In there,there will be written manage your account,click on that.There will be the option of sign in.At the bottom of the password box there will be written FORGOT YOUR PASSWORD? click on that and go through the information required and your password will be sent to your email account.

  • HT201363 i have two security questions but i don't have a rescue email address and i know my apple id and password, what should i do please help me!!:(

    i have two security questions but i don't have a rescue email address and i know my apple id and password, what should i do please help me!!:(

    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down this page to add a rescue email address for potential future use : http://support.apple.com/kb/HT5312

  • Why is my iPod Touch's memory 0 when i only have 249 mb of photos and camera and 23l mb of Music? Please help this is a big issue! what do i do? ps i dont want to loose 2 of my apps!!

    I have a 8GB Ipod Touch and i know its not a lot, but in the beginning it was working fine. For some time now it wont let me excede even 1GB of memory. i have no games, no apps, not many contacts, hardly anything! only 249 mb of photos and camera and 23l mb of Music. i have backed it up and restarted it and everything and i am getting annoyed! please help me!! i cant live without my ipod!!! This is urgent!
    P.S: i have 2 apps on my ipod that i would not like to loose! IF theres anyway to save them in the process of fixing my ipod that will be great!
    Thank you!

    An "other" that large usually indicates that the "other" includes corrupted files.  Usually restoring from backup eliminated the corrupted files. However, sometimes restoring to factory settings/new iPod is required.
    To restore from backup see:
    iOS: How to back up
    To restore to factory settings/new iPod see:
    iTunes: Backing up, updating, and restoring iOS software

  • When i try to change my screen saver on my Mac 10.7.2 Lion, i hear a clicking noise on my computer and then it gets hung. Please help

    When i try to change my screen saver on my Mac 10.7.2, i hear a clicking noise on my computer and then it gets hung. Please help. Off late my computer is taking too long to open documents etc.

    If you hear a clicking noise, as in mechanical I'd be thinking along the lines of failing hard drive. Especially as you mention other problems.
    Boot from another disk if you have one and do a verify disk or use somethinglike Disk Warrior or Tech Tool.

  • HT5622 i cant find where its says reset you security question? please help thanks

    i cant find where its says reset you security question? please help thanks

    The Three Best Alternatives for Security Questions and Rescue Mail
         1.  Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
         2.  Call Apple Support in your country: Customer Service: Contact Apple support.
         3.  Rescue email address and how to reset Apple ID security questions.
    A substitute for using the security questions is to use 2-step verification:
    Two-step verification FAQ Get answers to frequently asked questions about two-step verification for Apple ID.

  • HT5312 sorry! i can't reset Apple ID security question. Please help me

    sorry! i can't reset Apple ID security question. Please help me

    The Best Alternatives for Security Questions and Rescue Mail
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contact Apple support.
        c. Rescue email address and how to reset Apple ID security questions.

  • HT201303 I forget answer security questions. How to changer answer your security questions?.Please help me!

    I forget answer security questions.
    How to changer answer your security questions.
    Please help me!. Thankyou very much!

    Try going to https://appleid.apple.com/, click 'Manage your account' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and see if you can change your questions/answers, and then click Save at the bottom right.

  • Im forgot my questions security , please help me

    im forgot my questions security , please help me

    See Here > Apple ID: Contacting Apple for help with Apple ID account security
              Ask to speak with the Account Security Team...
    Or Email Here  >  Apple  Support  iTunes Store  Contact
    More Info >  Apple ID: All about Apple ID security questions
    Note:
    You can only set up and/or change a Rescue Email BEFORE you forget the questions/answers.

  • I can't create rescuse email to change security questions. Please helps me create rescuse email

    I cant create rescuse email to change security questions. Please helps me create rescuse email

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can try going to https://appleid.apple.com/and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then see if this user tip helps you get the questions reset :https://discussions.apple.com/docs/DOC-4551
    e.g. you can try contacting iTunes Support :http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then try Apple ID Account Security
    or try ringing the number for Apple  in your country and ask to talk to the Account Security Team : http://support.apple.com/kb/HE57

Maybe you are looking for