You need a Grounds Gold Account to post on the NG BBS!If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!
At 6/13/09 04:15 AM, andy70707 wrote:
it resizes it to fit the window with a cool little animation of it resizing, but I want it to keep its aspect ratio so it keeps resizing the images down until they are either 550 width or 400 height, and still keeping their aspect ratios.
Because you're chaning it's scaleX and scaleY values, not it's actualy width so it's changing by a percentage of it's actual width/size each frame so it's likely to go past the 550/400 mark rather than stop more or less on it.
At 6/11/09 07:11 PM, Bezman wrote:
Just using another layer wouldn't work if the game is stopping on e single frame - which it presumably is since his levels are right there on the timeline and so need the timeline to stop.
My mistake. For some reason I thought that when you put it on steam it would keep playing; despite stop commands. I must have been thinking about movieclips as mentioned.
In your current example, the class Main will inherit all the variables, methods etc of the MovieClip class. That is, your Main class will now have an x and y value, rotation and all those sorts of things as well as functions like hitTestObject()
If you're going to make a thread like this then at least explain what's going on in your code for those who are learning. Besides, using an array to store the keys that are down is how I would have thought most people do it anyway. Delta also wrote this class that allows you to code key presses in a similar way/format to AS2.
You can have it how you had it before. Check 'Export for actionscript' but uncheck 'Export in first frame' as this will put the sound in before the preloader. Then on a frame that will not actually be played, ideally frame 2/after your preloader put a movieclip containing the sound otherwise flash will not compile it as it will not think it is needed.
Picture is self explanatory. Outline onion skin only shows the outlines (click it and you'll see what I mean) and normal shows the whole thing. The other button there is to edit multiple frames at once (Don't see how that would be useful; but I'm not an animator)
In my opinion, you're much better learning basic stuff and then building up from that. But this tutorial by Denvish explains how to do shooting. Although it is not in the context of a platformer in this example you can take the principles and use them in any situation. (This is if you're using AS2). If you're using AS3 it is still basically the same but you will probably find it easier to put the code in a bullet class and make a new instance of that on the stage. Basically, what you want to take away from that (again, if doing AS2) is the use of duplicateMovieClip() or alternatively attachMovie() (does a similar thing but takes it from the libary as opposed to an instance on the stage)
At 6/9/09 06:08 PM, DrClay wrote:
I haveA LOT of data in the flash file, like images, instead of drawing in flash. Not a sprite movie, I just made the graphics in photoshop
In that case, read through this. I only had a brief look through it myself but it appears there is a lot of mentions to graphics which are 'corrupt' causing the error which appears to be the problem.
You cannot do all of that in flash. You have to pass the variable from flash to PHP or another server side language and handle the request from there. You'll find plenty of tutorials if you search on google depending on whether you're using AS2 or AS3. AS2. AS3.
As far as I'm aware you don't need it, nor do you need it in AS2, except when loading a MovieClip. If you just put code on the timeline it will execute in the same manor as if it was in an onLoad function. If you want to use it when a MovieClip is loaded on to the stage you can give the class a constructor function.
At 6/9/09 05:01 PM, Saza wrote:
Nothing, why just give him the code :P
Not giving him the code doesn't mean you have to give him a post that makes no sense (in the fact that gravity does not increase to make an object fall as your code would imply). And anyway, just those few lines aren't really any help.
@OP, You basically need to have a variable that holds the velocity at which the object is moving in the y direction, increase that by a constant each frame and then move the object in the y direction by the velocity.
At 6/7/09 08:28 AM, rishabh005 wrote:
i don't have an array of newly generated enemies that's why I asked how to make an array of them.... Please help...
At 6/6/09 08:57 PM, MattMinisodes wrote:
yeah so 51lver, if you would be so kind to explain us what you did, that would be great!!! or even to post the code would be even greater!!!! :D
Just look up inverse kinematics and you're pretty much there. No one is going to want to work with another programmer who is clearly no where near to the standard they are as they could just do all you do by themselves.
At 6/3/09 05:31 PM, Apple-Juice wrote:
here i calculate my initial velocity, how would i determine the distance it travels and how much air time it gets?
You're creating 30 MCs in the same position as the mouse so it'll appear as one. More over, every frame you're trying to create new MCs with the same name and depth as ones that exist.
At 24FPS that's ~7200 frames. So at 20frames per 8 hours that's going to take.. forever. But remember that's talking FBF where you're redrawing every single frame. Actual frames you have to animate should be a lot less than 7200 due to tweening etc. You should also, once you'e done the backgrounds once, just be able to paste them in place. Similar things with the characters. Anyhow, 8 hours just to colour 20 frames seems like a very long time.
At 6/2/09 06:14 AM, JKAmovies wrote:
I'd suggest that Tom add this to the frontpage of NG. Under the flash movies/games top 5. And add awards for the top 5 (like the flash submissions)
I don't think seeing awards would make anyone want to go there any more. It would prehaps make a few more people want to make music, but it wouldn't bring in the hits. Not only that but awards wouldn't mean anything as things stand because 1 vote could knock a score down or up massively. The problem is that people come to play flash games, not listen to music.
Plus it's hard to find good music that's too your taste as you can't just go through the top 50 like you can in flash.
At 6/1/09 06:49 AM, Tygerman wrote:
And you don't have to tell me what it is you're doing. Anyone can do any of them. I would like to know whether or not people are doing one so I know this colab isn't dying. But not neccessarily what you're doing.
Isn't there a chance you'll end up with loads of people all doing the same couple of lines? :/
Trying to compete with Kayn, eh? Other than the obvious problem of the low FPS it looks quite nice other than the fact you can occasionally see lines between tiles. You really should try and boost the FPS though before anything.
Calm the hell down. No need to bump, at least whilst it's still on the first page. Maybe you should use the manuals or google a bit more before asking for help. Either set the x and y coordinates after you've created it or by using the optional initObject parameter, like so:
At 5/31/09 04:42 AM, 4urentertainment wrote:
You won't be able to sponsor it due to copyright issues, so no revenue to split.
So the first thing you thought of when looking at this was 'I want money, I want money, I want money'. Not, 'this might be quite fun to work on'? However, I do agree with the not using copyright thing just because I'd much rather work on an original game with a new idea as opposed to one that's based on a massive game such as MGS.