A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Multiple swf's or a single complicated fla?

  1. #1
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378

    Multiple swf's or a single complicated fla?

    I'm sure the most common answer will be "it depends on the project" but I've been thinking of about playing around with some PGC and I really wanted to poll everyone what they thought about how to set up the project. I have so many different parts I thought it might be easier to run the game itself, which would just be a container, and then load different swf's into the container depending on what is going on. This would be similar to how they do it at Jayisgames? (How do they actually do it though?) The alternative would be a single fla that would have to house all the individual parts into a single file and would make micromanagement a hellish nightmare. What would you do?
    Last edited by ImprisonedPride; 03-20-2009 at 01:47 AM.
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

  2. #2
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    The main reason why most games use single container these days is because you normally want to spread it around into many portals. This basically means single swf is copied around the web,portals usually avoid all multi-swf files because they cant be bothered setting them all up correctly.

    If you however want to host the game just on your own page, having multiple swfs is probably better idea.

  3. #3
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    imo. loading raw material like *.jpg, *.mp3 ,... is the way to go with bigger projects. SWF always binds you to the IDE so if you dont develop in that mainly its only a hassle- besides that often these days sprites and textures are directly edited and created trhough Photoshop not FLash - so it makes the workflow easier if you can already process spritesheets or at least single image files.

  4. #4
    Senior Member
    Join Date
    Jan 2008
    Location
    UK
    Posts
    269
    I'm sure the most common answer will be "it depends on the project"
    Absolutely, it does. Firstly, as Tonypa has already stated, it depends if you are hosting it exclusively by yourself, or if it's for distribution. If it's for distribution, then it really needs to be self contained. Secondly, do the separate elements, which you would split into separate swf's, affect each other to any great extent? If they need to communicate with each other a lot, having them as part of the same fla is going to be a lot easier.

  5. #5
    Senior Member
    Join Date
    Sep 2004
    Posts
    633
    I'd go with multiple complicated files. More fun.

  6. #6
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,793
    The thing about 1-file to spread it around... you COULD in theoy make it all external but hard code the content URLs... spread the main container SWF around, and then the external stuff would all load off your own server. Could cost you a lot in bandwidth fees if its a popular game.

  7. #7
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378
    I've decided to go with a single container and load all of the swf's into an array of invisible mcs. When I "switch screens" I just cycle through the 1/2 dozen or so screens and shut all of them off except the one I want to see. (It's slightly more complicated and uses tweens, but that's it in a nutshell.) As far as communication is concerned, all data is stored in the "wrapper" so each swf is literally loaded for visuals only. Anything added in after the fact would be performed by a function called "startup" in each swf or something that performs some actions to display itself right when I want to see it.
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

  8. #8
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Quote Originally Posted by Ray Beez View Post
    The thing about 1-file to spread it around... you COULD in theoy make it all external but hard code the content URLs... spread the main container SWF around, and then the external stuff would all load off your own server. Could cost you a lot in bandwidth fees if its a popular game.
    Some portals (for reasons I am not going to dig into) wont accept those because you can change the content later to something else without them knowing. They only accept files they are hosting and you are not allowed to load content from external urls.

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