A Flash Developer Resource Site

Page 3 of 3 FirstFirst 123
Results 41 to 44 of 44

Thread: Need help: load movie clip from library without exporting on frame 1?

  1. #41
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    What do you know, English is also my third language and I also thank the internet

    angelhdz, I've noticed that your English has improved a lot since when you first came here, and it's really good now. I constantly get amazed by how fast you learn new things, and the same goes for your actionscript coding skills. They've improved so much since last time, good job

    btw, vacation is singular in English, unlike spanish

    I doubt that we will get back the old design, so we better get used to this one, lol. The main problem is that the Actionscript tags aren't working properly, and that's what's really bothering me. Hopefully, I've just finished programming a syntax highlighter for use in this forum. I just need to add keywords to be highlighted, and then I'll post it here for everyone to use until the AS tags have been fixed.
    Last edited by Nig 13; 10-09-2012 at 03:04 PM.
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  2. #42
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    Thanks for these words Nig!!!! Life is about learning and teaching. You can't keep all you have learned for yourself, you have to spread it out! And I realize that at the same time you teach, YOU LEARN! Good luck with that thing of the Highlighter, it will be very uselful arround here hehe
    Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries

  3. #43
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    at the same time you teach, YOU LEARN!
    that is the reason why I've learnt so much actionscript since when I joined this forum
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  4. #44
    Senior Member
    Join Date
    Mar 2010
    Posts
    157
    Quote Originally Posted by Nig 13 View Post
    However, there's an option which you can consider using instead. It's not exactly what you want, but better than nothing, right :P?

    There's an event handler which is called when a Movieclip is loaded, it's the onLoad handler. If you use it on the _root movieclip, you can check when the Flash file has fully loaded. I did an experiment myself, and it indeed works with the white screen, and is called once the first frame is visible (i.e. right after the white screen is gone). You can exploit this event handler to check when your Flash movie has been loaded, and then instantly redirect it to Frame 2, where supposedly the movieclip is. Then, you can use the movieclips' properties, getBytesLoaded() and getBytesTotal(), to check when your movieclip is fully loaded. I am not sure if this will work, because I haven't tried the method with having the movieclip on second frame, hence I don't know whether it will actually be shown at once there, or if it will appear once it has been loaded (once getBytesLoaded()/getBytesTotal() is equals to 1 [, or 100, if you're multiplying it with 100]). You'll just have to try that for yourself and see if it works. The reason this isn't what you want, is because you don't know when Flash will actually load that movieclip. Maybe it will load it in the end, or halfway through - you never know, but if this works, it's the closest you will get, I think. If you're trying this inside Flash using download stimulation, onLoad will be called instantly when the Test Movie flash player shows up, so don't get fooled by that, because when testing in your browser - according to my experiment - onLoad will be called when the white screen is gone, and the flash's first frame has been loaded and fully displayed.
    I tried this, but I don't think I've completely understood. Does this apply if I'm not using external swf's? Should I set all my clips to export on frame 3, place the preloader onstage on frame 1 and the character on frame 2?

    By the way, the two of you speak English very well. Especially you, Nig. I was convinced you were a native.
    Last edited by koenahn; 10-10-2012 at 08:39 AM. Reason: Added something, did not want to double-post

Tags for this Thread

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