View Full Version: Hosting / embedding the game.

lassie >>Technical support >>Hosting / embedding the game.


<< Prev | Next >>

PinkFrangipani- 01-11-2008
Hosting / embedding the game.
Hey peeps, me again :!: Making a game is fun - but then you have to display it! Haven't found much documentation on this subject so I thought I'd ask some questions here. First question: Which are your preferred methods to go on about publishing a game? I'm aware that the usual way to go about hosting the game on an online server (after submitting your game to a gameportal, of course) would be to embed the game.swf in a html object and upload that to your host. I've tried this and kept the library folder tree with all the .swfs that are in the libary. So far, this is working fine. So, my next question is: Do I really need all those .swfs or could I do with less? Then, I have another problem. One requirement of the project I'm working on is that we build a Flash website (on which I'll be showing the game). Since I have neglected to hone my Flash skills, I'm doing the "How to learn Actionscript in 3 days" exercise and it's almost killing me - but that's beside the point. Greg, you seem to be quite the AS 2 specialist. So my next question goes to you: What is the best way to attach the game.swf to my website.swf in Flash? I don't want to import the swf to the Flash library - I'm supposed to build a dynamic site. Besides, importing doesn't work since the .swf has protection on it. So this is how I'm doing it: _root.loadMovie("games/gamefolder/game.swf"); //where the game.swf is in relation to the website.swf This works, but only if the game library is in the rootfolder of the hosting server, aka in the same folder as the website.swf. If I put the library in the gamefolder (where game.swf is), I get an error message (which, on second thought, is completely logical). Which brings us to my fourth question: What must I do to leave the library in the gamefolder? I'm planning to upload more games in the future and can't have 17 libraries hanging around in the root folder. Well, that's about all for now (I had more questions but writing up my problems helped me answer some of them! :) ) Again, I thank you guys in advance for your responses. :D

bigmac- 01-13-2008

Hey, first... thanks for highlighting the succinct questions in red. I can guarantee that I would have put off this post and probably never gotten back to it if you hadn't. That should be a tip to all: Greg doesn't like overwhelming posts. bite-sized questions = good response time. 1) no method is preferred. Take your pick. There are standalone projectors floating around, or you can stick the SWF up on a website. Just be warned... the Internet buzz has historically caught onto our games. If you post it on your website, be prepared for a bandwidth hit. 2) You need all the .swfs. You do NOT need all the FLA's, project files (cst) or the _data.as file. Those should not be posted given that they are not directly consumed by the lassie player and are unsecured. Lassie only needs the compiled swf assets. 3) ...you're loading the Lassie application into a Flash website? That practice has never been -*test*-('")ed, however it should theoretically work using a MovieClipLoader object with "lockRoot=true" set to the container clip. Let us know how it works. Otherwise, pop the game in an HTML window. Oh, and as your code is right now: that won't work if there is other content (ie: a website shell) within that SWF movie. loading a movie into a movieClip (and yes, the main stage IS still a movieClip) will entirely replace the existing contents of the target clip with the loaded content. So, targeting _root as the load destination would dumb the rest of your content. 4) Lassie was never designed to have a variable library folder name. I know, I know... sucky. I didn't know how to do that at the time (I was a total flash noob when I programmed LassieAS). So, to get around this you've got to distribute the games into individual directories.

PinkFrangipani- 01-14-2008

Hey, thanks, Greg. Your answer is much appreciated, even though my post was overwhelming! Maybe this should be a new forum practice: "Please highlight all your questions to Greg in red!" ;) 1) the Internet buzz has historically caught onto our games. If you post it on your website, be prepared for a bandwidth hit. Whoops...haven't thought about that yet. I have a standard personal hosting package for like 5$ a month...bandwidth is supposed to be unlimited but you know how those things go...I'll see what happens. 2) Lassie only needs the compiled swf assets. Great, that's what I thought. 3) it should theoretically work using a MovieClipLoader object with "lockRoot=true" set to the container clip. Let us know how it works. Otherwise, pop the game in an HTML window. It worked with _lockroot = true! Yay! *dances for joy* BUT...I can't play. Seems we're having trouble with the following system swfs: speech.swf data.swf menu.swf They won't load so the character can only walk around and do nothing else. Well, I'll keep tinkering, I'll let you know if I can solve it.

SeanCyrusTowel- 01-14-2008

Hey, first... thanks for highlighting the succinct questions in red. I can guarantee that I would have put off this post and probably never gotten back to it if you hadn't. That should be a tip to all: Greg doesn't like overwhelming posts. bite-sized questions = good response time. I don't think anyone does.... I tend to skip posts too long (unless I'm interested in the topic already.

PinkFrangipani- 01-15-2008

Edit: Found the problem, don't know how to solve it. The rollover effects on the verb disc are misplaced: Note that the cursor registration point is in the center. Greg, any chance I can change the rollovers manually? P.S. I notice that 'long' posts are hard to read and look overwhelming because these phBB post windows are too wide! Any way to change that maybe? (Or maybe not. You'd only encourage me to write even longer posts :P )

bigmac- 01-15-2008

Greg, any chance I can change the rollovers manually? Sure, all that artwork is contained within the "_disc.fla" file. You're welcome to tinker around with updating graphics in there all you want, but you're responsible for making sure you keep the movie clip architecture intact so that it remains compatible with the Lassie engine. That basically just means that you have to retain instance names.

PinkFrangipani- 01-15-2008

Thanks, but that's not what I meant. I'm talking about where disc.element.onRollover = function(){change disc element from gray to orange} is scripted. I'm guessing that something is going wrong in there since the effect happens only when the cursor is way below the element. Haven't found where that script is, so I figure this must be in the player somewhere?

NigeC- 01-15-2008

Is it just doing strange stuff online? Its a nightmare -*test*-('")ing online, you need too clear the browser cache everytime you change something, have a link with and without www. better still other ways to get to the game.. Firefox is better than using IE for -*test*-('")ing I had 3 different sets of assets running in NOTH once :? Try the original verb disc and see if it fixes the problem

PinkFrangipani- 01-15-2008

Haha no Nige, I'm trying to embed the game player INTO a Flash website...which itself will be embedded in a html file. As of now, the game works fine online...it's just acting weird locally when I embed the player in another swf. Edit: Scratch that. Actually, when online, the "new game" thing doesn't work.

bigmac- 01-15-2008

Couple points: A) The lassie player was not designed to be stuck inside another SWF. You're on your own for getting that to work. B) You'll find no script that changed those button states. It's all being controlled within the engine. Lassie is hit--*test*-('")ing against those buttons then pushing them to frame-2 if the hit -*test*-('") is successful. You may be encountering a problem with hit--*test*-('") coordinates due to the nested Flash coordinate space.

PinkFrangipani- 01-15-2008

That's pretty much what I thought. So it's back to the old 'embed object in html file' solution. Thanks, though.

Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.