[haXe] haxe + swfmill preloader

Marcus Bergstrom marcus at quickform.net
Fri Sep 15 17:38:43 CEST 2006


Get Charles from http://www.xk72.com/charles, an indispensable tool  
for stuff like this.
Specially useful if you are working with AMF. It also has a "No- 
Cache" mode and
"bandwidth throttle". Go get it and you will be happy.

Marcus



On Sep 15, 2006, at 4:31 PM, Agent Orange wrote:

> Thanks for your help. I was missing two key things, stopping the other
> frames from playing and I needed to setup a test webserver(apache)  
> and limit the bandwidth
> so it wouldn't load instantly like it does when I load from my HD.
>
> So now it works!
>
> Thanks for the other suggestions from the others as well.
>
> ----- Original Message ----- From: "Nicolas Cannasse"  
> <ncannasse at motion-twin.com>
> To: "The haXe compiler list" <haxe at lists.motion-twin.com>
> Sent: Friday, September 15, 2006 1:44 AM
> Subject: Re: [haXe] haxe + swfmill preloader
>
>
>>>> Actually, you should be able to write the preloader using haXe.  
>>>> Since
>>>> the size of the SWF is mostly comprised of Library symbols,  
>>>> loading the
>>>> compiled code before displaying the loading progress should not be
>>>> noticed by users. That would make things more easy.
>>>>
>>>
>>>
>>> I'm kind of interested in doing it this way, are there any  
>>> samples around?
>>> I'm really new to this and don't have a clue where to start with  
>>> it. Or can
>>> you recommend some reading I might do to bring me up to speed?
>>>
>>> Thanks
>>
>> This is similar to the Flash loader you posted, exect that you  
>> need to
>> use a Movieclip. For example (not tested) :
>>
>> class Loader {
>>
>>    static function displayLoading() {
>>        var mc = flash.Lib.current;
>> haxe.Log.clear();
>> var pct = Std.int(mc.getBytesLoaded()*100/mc.getBytesTotal());
>> trace(pct+"%");
>>    }
>>
>>    static function main() {
>> // set the main loop
>>        flash.Lib.current.onEnterFrame = displayLoading;
>> // prevent further frames from being displayed
>>        flash.Lib.current.stop();
>>    }
>> }
>>
>> Nicolas
>>
>> -- 
>> haXe - an open source web programming language
>> http://haxe.org
>
>
> -- 
> haXe - an open source web programming language
> http://haxe.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/haxe/attachments/20060915/db9f1505/attachment.htm


More information about the Haxe mailing list