14,574 Forum Posts by "Denvish"
At 2/17/09 11:30 AM, Dragonberry wrote: Well, I need two things:
Random Enemy Occurences
Well, on the screen, I have like 3 or 4 little "bunkers", let's call them instances
bunker 1-4
. I want the enemy, let's call him instance
McCain
, to at random times, and from random bunkers, come out for let's say 5 seconds.
-and-
Ending The Game When Health Is 0
Well, basically, I need the game to end when the instance
Health
is 0. As for my health, I have it dropping at a base of 5 when the player gets shot.
Thank You in Advance
In terms of timing (5 seconds, random intervals):
AS: Timeout by Inglor
AS: Intervals by Inglor
Just set the interval until McCain appears using (eg) 5000+random(5000); (5-10 seconds) and the time until he disappears again as 5000 (5 seconds)
In terms of the bunker, create McCain at the entrance of _root["bunker"+(random(4)+1)];
In terms of health, if(Health<=0){GAMEOVER();}and create a function GAMEOVER to do whatever you want at endgame
Most likely scenario is that you have either a massive wav file or several huge bmps imported. Either way, they'll be compressed when you export the swf, see File>Publish Settings>Flash tab > JPEG Quality/Audio Stream/Audio Event to adjust that
If you want to keep the fla size down, import jpeg/gif/png rather than bmp (use Gimp or Paint.NET (free) to edit/export externally), or import mp3 rather than wav - although it'll never loop as well.
Using _root within a loaded swf will refer to the holder swf, you'll need to replace _root.var with this.var or _parent.var within the loaded file
Make sure it isn't hiding behind the original...? Otherwise, dunno without seeing the project file
At 2/12/09 11:58 PM, Johnny wrote: Denvish, Me... in that order, I think... are the old fogies. I'm going to be 30 this year, and Denvish will be 160 or so.
Indeed, my 161st birthday was last month and I now rely on L'Oreal anti-aging bullshit (with pore target technology, ceramide, dermatide, penta-peptides, botocillin, a-zone targetting and various other made-up words) to keep me looking as fresh as a daisy.
Yeah from what I read on Google, there's no way to do it once it's installed. Un- and re-install
AS: Rotate and Follow Mouse by UnknownFury
You'll have to change _xmouse, _ymouse to be mc._x, mc._y but it's the same principle
At 2/12/09 09:49 PM, DawnOfDusk wrote: How much of that did you actually code?
Much of it looks strangely familiar :)
@Topic starter: the problem you have is, if you look at the main timeline code, the bullets are actually named 'bullet1000' up to 'bullet1100'.
Now, I don't know where you're running your original hitTest, but it should be running on each bullet - as in the commented section of my code //if(hitTest(_root.enemy)){ blahh; }
Change that line to:
if(this.hitTest(_root.enemy1)){
_root.enemy1.removeMovieClip();
}
That'll work with AS2. Just paste it on a frame in a new fla, publish and click/release the mouse to see the traces.
The problem you have is not so much the random generator as the date/time issue, since the 'clock' will only run while a user is viewing the swf file. Since there's no guarantee they'll have it open every Sunday at 12 pm for your 'random' code to run, the only feasible way to do this is to do something with the Date & getTime() methods, and probably sharedObjects for saving/loading data to/from a user's PC.
I may be thinking with more complexity than is necessary, but what you want isn't as simple as it may seem. I'll have a think about it while I work for a bit and try to come up with a solution a bit later, assuming no-one else does so first.
I've used Swift for 3D models before. It's not anywhere near as advanced as Maya or 3DS Max, but it's designed to be compatible with Flash. For a basic chair, it should be fine, just read the help files for the program.
At 2/11/09 02:40 PM, robocopisback wrote: Have you ever had a problem when you want to submit a game or movie on Newgrounds.com? Your file is to big when Newgrounds.com can only take a 10mb. That is why you make a preloader for your game or movie so that the site doesn't have to download it. All the preloader does is downloads the movie or game for you to watch it.
Eh? This doesn't make sense. A preloader doesn't shrink the size of your swf, and if you're talking about loading a movie into a shell, that's a whole different bunch of AS. Besides, chances are that if the filesize is over 10mb, it means the game or movie hasn't been compressed or optimised well enough
if (pc == 100 && !isNAN(pc)){
if(pc>=100){ would do the job, not sure why you're bothering to check for isNAN
At 2/11/09 09:53 AM, ColdLogic wrote: for(a=1;a<10;a++) {
_root["enemy-2-"+a].removeMovieClip();
removeMovieClip(_root["enemy-2-"+a]);
}
Try
_root["enemy-2-"+a].removeMovieClip();
I'd recommend getting Flash. I've used Swish on occasion because it's great for quick cool text effects, but it doesn't have a fraction of Flash's capabilities. If you want to make games or animations, you're going to need something more powerful than Swish
Flash Newbie Help by -ArcticHigh-
Flash (noob) tutorial by -hellraiser-
Starting with Flash by Otacon
NG's best tutorial movies
Flash tuts list by AGH
Flashkit
actionscript.org
AS: Main
Kirupa
good-tutorials.com
NG Preloaders
Xenosteel's guide
NG Submission Tips
Get your Flash deleted
At 2/11/09 03:49 AM, kokonut10 wrote: I am trying to make a game where you can choose from eight different backgrounds, but I don't know how to make it work. I've got two buttons for next and back, and the backgrounds, but I'm not sure how to get it all to work. Can someone give me some help?
Put them on separate frames inside a movieclip. Put the movieclip on stage and give it the instance name 'BG'. On the forward button, use
on(press){BG.nextFrame();}
on the back button:
on(press){BG.prevFrame();}
At 2/10/09 07:34 PM, Loganmypwnmaster wrote: I have a maze game that I made from a tutorial, but if you click and hold the mouse you can go past all the obstacles so I am wondering how I would make it so that if the player holds the mouse button for 2+ seconds it sends them to a different frame.
You should code the game so that it will detect whether the mouse is held or not, by using onMouseDown and onMouseUp to set booleans (true or false). Then your enterFrame code should use this boolean when performing hitTests/collision detection.
If you really want to create such a timer, you're still going to have to trigger/stop it with onMouseDown/onMouseUp. The best bet on that would be to use setTimeout, which is documented in the Flash help or here (for AS2): AS: Timeout by Inglor
At 2/10/09 04:17 PM, zuperxtreme wrote: *puts on flame resilient coat*
I'm 90% sure I'll get flamed to hell, but whatever, I'm broke and need some cash:
Is anyone looking for a programmer?
I can code both in AS2 and 3. I don't have a portfolio and I haven't completed a game, so nothing to show. The only thing that is online that I did was the "portafolio" of this website: http://www.buddah.com.ar (XML's for MKT Interactivo/TV aren't there yet, hence why the links don't work).
Other than that, I'm just leaving myself to your will NG.
I'm obviously not going to waste my time, so serious replies... if that's possible here. I've tried looking around the freelance websites but those are always filled with Indians or Pakistanis and have 2000 bids the minute it's posted...
Anyways... Hit me up if you've got any work you're willing to pay for.
Ah, and since we're on topic, maybe we could make this a "hire a programmer" thread. I'm sure I'm not the only one looking for work.
*hides*
TBH, although you have no proof, I believe you do know coding. However, speaking from personal experience, you NEED a decent portfolio if you want to tempt employers, even if it's just a cool 45-line demonstration of API drawing (although a full-blown game or interactive/dynamic site would be better). Until you have something public to demonstrate your skills, you're unlikely to find anyone willing to pay for them.
At 2/10/09 04:43 PM, ReN0 wrote: I'm eighteen years old, I have plenty of time to learn and improve and I can't already give it up before I even try it out. Makes perfect sense to me and thanks guys for what you have to say.
And possibly, possibly, expect something from me in the future! Time to learn.
Well, that kind of attitude is a great start. I don't know too much about the artistic side myself, but there are plenty of people in here who do, and would most likely be happy to help. I supect that the coding side is not going to be your cup of tea, but if I'm wrong, check out the Basic and Useful Links section of AS: Main for some beginner tutorials.
At 2/10/09 06:34 PM, Joelasticot wrote:At 2/10/09 04:08 PM, zuperxtreme wrote:Congratulations, you just understood the fundamentals of internet forumsNote to self: Read threads before replying...
Wait, what, you're supposed to READ them? Damn, I was wondering what I was doing wrong.
Free graphics programs for external spritesheet editing:
Never used either, but I recommend exporting as gif/png with transparent background if you can
At 2/10/09 01:24 PM, ReN0 wrote: I just asked because as Flash Animations get larger and larger that it makes less sense for one person to do it all by himself. I guess I was just comparing it to TV shows, there is a creator of the show and let's just say he's the head writer too but he hires others along with him to contribute and take some of the slack off.
It's true for big companies, but the majority of Flash coders/artists are still working solo on their projects, or with a small group of friends, and they're not getting paid for it (maybe sponsorship, if they're good enough). If they're lucky enough to find employment using Flash, they work for a company that already has creative types on board (usually the graphic artists). You clearly feel you have a creative or inspirational streak, but you need to be able to offer something besides ideas - a practical skill of some kind... unless you're lucky enough to have the financial backing and people skills to start your own company.
If you really want to get involved, bite the bullet and start working to master either the graphics side or the coding one. Even a small amount of skill would be appreciated by potential co-authors, and people with ideas but no skills are not going to find many Flash users interested in working with them.
Sorry to put a downer, but I've seen to many 'idea people' shot down in flames because that's all they have to offer.
http://themushroomkingdom.net/wav.shtml
http://www.entertonement.com/collections /1893/clips?keywords=mario+kart
http://beemp3.com/index.php?q=mario+kart +64&Submit=Search&st=all
That's the best I can find I'm afraid
At 2/10/09 02:27 PM, prut97 wrote: LIES, I did it with AS2 b4.
Well I suggest you rack your memory and try and remember how then
You can't write directly to txt from Flash (although you CAN pull data in). To output data, you'll need to go through a PHP/ASP/CGI script first, which means basically running/having a server.
For AS2:
AS: Flash & PHP by shazwoogle
AS: Flash > ASP > Txt
AS: Load External Data/Cross-Domain
AS: Loading/Unloading Data by shazwoogle
If you want to simple save and load variables, you can use Flash cookies (sol files):
AS: Save and Load
The program used is Adobe/Macromedia Flash
All the information you'll ever need, better get reading :)
Flash Newbie Help by -ArcticHigh-
Flash (noob) tutorial by -hellraiser-
Starting with Flash by Otacon
NG's best tutorial movies
Flash tuts list by AGH
Flashkit
actionscript.org
AS: Main
Kirupa
good-tutorials.com
lol PMT much Gust?
At 2/10/09 10:19 AM, tcc85811 wrote: Is it possible to assign an instance name to every instance of an MC in the library, no matter how deeply nested?
Unfortunately I don't think so. You could use
for(var i in mc){
mc._name="blabla";
}
once they're on stage, but that would name things randomly. I think you're probably going to have to head in to each MC and do it manually :(
At 2/10/09 09:45 AM, liaaaam wrote: Fantastic coding style by the way, I guess doing it for a job it just comes natural.. commenting so meticulously.. unless you only did that for the guys benefit ^_^
Nah, they're both functions I re-use for quite a few of the games I make, I learnt the hard way that going back into old projects is a LOT harder without comments
Countdown clock (fla)
AS: Clock by Glaiel_Gamer

