A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: How do GameJacket do version control?

  1. #1
    Member
    Join Date
    Mar 2004
    Posts
    45

    Question How do GameJacket do version control?

    The concept is easy. Build a container swf which loads in another SWF from a hard coded link.
    This allows you to distribute the container, which pulls in whatever is at the hard coded URL - thus allowing updates and version control.

    The problem is, I've found that most games don't work correctly when contained. For instance, when you load in an AVM1 game, it often loops through the timeline, or buttons fail to perform the desired action when clicked....

    How do gamejacket load in a game seamlessly and make it work as if it was native?

    I am able to do this locally with no issues....

    using this code:

    PHP Code:
    var mLoader:Loader = new Loader();

    loadGame();
            
    function 
    loadGame():void {
        var 
    mRequest:URLRequest = new URLRequest(_contentStoreURL+"/static/games/"+_gameID+"/"+_gameID+".swf");
        
    mLoader.contentLoaderInfo.addEventListener(Event.COMPLETEgameLoadCompleteHandler);
        
    mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESSgameProgressHandler);
        
    //var applicationDomain:ApplicationDomain = ApplicationDomain.currentDomain;
        //var securityDomain:SecurityDomain = SecurityDomain.currentDomain;
        //var loaderContext:LoaderContext = new LoaderContext(false, applicationDomain, securityDomain);
        
    mLoader.load(mRequest);//, loaderContext);
    }

    //on completion of loading sets the gameshell member variable
    function gameLoadCompleteHandler(loadEvent:Event):void {   
        
    trace("GAME LOAD COMPLETE");
        
    _theGame addChild(loadEvent.currentTarget.content);

    However, if i try and run this online (i.e. network sandbox). I get the weird issues with the main timeline mentioned earlier.

    Does anybody know why this might occur? Or how GameJacket manage to load in games and play seamlessly?

    Best Regards,

    David

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    I think the main problem is coding of the games themselves, since users often do not code the movie selfcontained, meaning that they use _root, stage etc, which when loaded into a parent movie screw the childmovie up. Was that what you meant?
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  3. #3
    Member
    Join Date
    Mar 2004
    Posts
    45

    Re

    Hmm, this is not exactly the problem I'm talking about.
    When loading an AVM1 movie into an AVM2 movie, the AVM1 movie's _root, refers to the AVM1 movie root and not AVM2 movie root, thus it is self contained already.
    (Also the _root is treated as if lock root has been set inside an AVM1 instance).

    the stage of the loaded movie also refers to the same Stage instance which the Loader references in its stage variable.

    I think the problem with _root and stage is more relevant to an AVM1 movie trying to load another AVM1 movie which access these properties.

    Cheers,

    David

  4. #4
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    I was not completely sure what you meant.
    However, there should not be any problem with AVM1 movie loaded in AVM2 unless there are components in the AVM1 movie. They screw up the movie. Otherwise the movie should behave as if it is playing alone.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  5. #5
    Member
    Join Date
    Mar 2004
    Posts
    45
    There are no components in the SWF I'm trying to load and play (the AVM1 movie)...but it still messes up and plays differently than when it is stand alone.
    I will try to create a small example to show what I'm talking about..

    Cheers,

    David

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