Swf game loading infinity?

i tried to create a swf game. It worked perfectly on my old host and domain. But when i moved my game to new host and domain, it doesn't show loading progress on firefox and with google chrome, it stops working with 'Loading Infinity%'.

Here is my game: http://afcvn.myarsenal.net/afcvn/swf_games/game_matching.swf

And this is my loading code and i export classes in frame 2:


this.addEventListener(Event.ENTER_FRAME, loading);

function loading(e:Event):void {

    var total:Number = this.stage.loaderInfo.bytesTotal;
    var loaded:Number = this.stage.loaderInfo.bytesLoaded;

    progressBar.scaleX = loaded/total;
    loader_info.text = "Loading "+Math.floor((loaded/total)*100)+ "%";

    if (total == loaded) {
        this.removeEventListener(Event.ENTER_FRAME, loading);


I added a crossdomain.xml: http://afcvn.myarsenal.net/crossdomain.xml

Can anybody help? Highly appreciate! :)


Look at my answer to this question. (turn off server compression on swf files)

And try to avoid division by zero (Flash allows it but the outcome is Infinity). If bytesLoaded==0 your loading code will stop immediately because bytesTotal==0 too then.

Need Your Help

How justify text using iTextSharp?

c# itextsharp

Have piece of code like below:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.