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!

Author Search Results: 'korded'

We found 1,095 matches.


<< < > >>

Viewing 121-150 of 1,095 matches. 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 92337

121.

None

Topic: input text

Posted: 06/04/08 04:30 PM

Forum: Flash

..Of course, you need to have an Input text box placed on the stage with the variable name of "myTextBox" or whatever I used above for it to work. May be better ways of doing this, but this works.


122.

None

Topic: input text

Posted: 06/04/08 04:27 PM

Forum: Flash

myButton.onPress = function() {
if (myTextField == "rawr") {
trace("yep, says rawr");
}
}


123.

None

Topic: Help with random code

Posted: 06/04/08 03:37 PM

Forum: Flash

At 6/4/08 03:25 PM, suicidalnene wrote: Thx for telling me that, now I know the problem: minVal and maxVal both equal 0, how can I fix that?

Just wondering, do you really understand what your myRandom function does?

Your minVal and maxVal variables need to be declared a number value. Now I'm no function expert, but the line of code that declares the destinationFrame variable seems to equate minVal and maxVal to 2 and 5 respectively.. so if that's okay, and you aren't declaring the two variables elsewhere in your movie dynamically, at runtime, I would place these two lines of code above your myRandom function statement on the main timeline:

var minVal:Number = 2;
var maxVal:Number = 5;

Make sure it's placed above your other code though, as Flash will process everything in order at runtime.


124.

None

Topic: Help with random code

Posted: 06/04/08 12:14 PM

Forum: Flash

At 6/4/08 11:26 AM, suicidalnene wrote: 1.I did replace the name b/c that was the code I had at first
2. And the random function is crucial and i think that is the problem

Are you positive that values have been assigned to the minVal and maxVal variables used in the function, using strict datatyping? Try adding a trace function to make sure, placed after your myRandom function.. something like trace(minVal + " , " + maxVal);

Other than that, a problem I can see is in the code placed on your movieclip that is checking for the hitTest.. was your myRandom function code placed on the main timeline? If so, try changing this line of code on your movieclip...

gotoAndPlay(destinationFrame);

to...

this.gotoAndPlay(_root.destinationFrame)
;

Your movieclip may just not be "seeing" the variable.


125.

None

Topic: Help with random code

Posted: 06/04/08 01:36 AM

Forum: Flash

First off, the code that RiftMaster gave you is going to need the movieclip names swapped out for the ones in your movie, if you haven't already (assuming those aren't already the names as it is). The hitTest that code performs is between a movieclip named "b" on the main timeline and a movieclip named "player" on the main timeline. If one of the two doesn't exist, it won't work.

Secondly, is the function you're using to determine your random number absolutely necessary?


126.

None

Topic: my stick dude

Posted: 06/04/08 01:25 AM

Forum: Flash

I don't care much for stickmen, but you have an eye for motion. The character actually has personality. Definitely nicer than a lot of the stickman animations people do, and nice touch on the coin movement.


127.

None

Topic: Flowing Hair How to?

Posted: 06/04/08 01:21 AM

Forum: Flash

Whenever I see questions about how to draw or animate something, I can never think of a good answer to give - unlike actionscript, there isn't a set answer for such questions.. at least in most cases,

What I can say recommend though, and this goes for most "how do I animate/draw questions", is to go on youtube and look for reference videos. Sometimes you can luck out and there are even videos posted JUST for reference (there are a bunch up for walking, running, etc). If not, just look for a video that has someone's hair blowing in the wind.

At this point, if you're able to do so, you can animate based on the motion seen in the video. Otherwise, you can always save the video and import it right into flash, and basically trace some key frames of the hair blowing (or whatever motion you needed). If you're wondering how to download videos off Youtube, search for firefox plugins, there are a bunch that let you do that.


128.

None

Topic: As Help

Posted: 06/03/08 09:45 PM

Forum: Flash

trace(_root.myMovieclip._currentframe);

Use the _currentframe extension after a movieclip's name. For example, in an IF statement,

if (myMovieclip._currentframe >= 5) {
trace("My movieclip is at frame 5 or greater");
}


129.

None

Topic: noob script question

Posted: 06/03/08 08:35 PM

Forum: Flash

At 6/3/08 08:27 PM, NinjatasticNolan wrote: okay but besides that I still get the problem where it says actions can't be applied. Why am I getting that?

Either you have more than just the movieclip selected when you are opening the actions window, or more likely you're document is set up for AS3 which doesn't seem to allow the addition of actionscript directly to movieclips. Go to File > Publish Settings, then go to the Flash tab in the window that pops up and change Actionscript 3.0 to 2.0. Click OK, try again.


130.

None

Topic: Loop?

Posted: 06/02/08 01:55 AM

Forum: Flash

..just make the torch into a movieclip, have the frame by frame torch animation inside that movieclip. Then just move the torch movieclip around on the parent timeline.


131.

None

Topic: Should i keep going with this?

Posted: 06/02/08 01:39 AM

Forum: Flash

Already better than a lot of the crap the portal sees. Keep going with it, it could be cool.

Tips so far would be to increase walking speed, and give the ability to strafe left and right.


132.

None

Topic: Color selection problems.

Posted: 05/31/08 07:19 PM

Forum: Flash

My bad,

I'm assuming it's something to do with CKMY/RGB, dunno. Ah well.


133.

None

Topic: Color selection problems.

Posted: 05/31/08 07:09 PM

Forum: Flash

Jpeg and png are raster formats.. go to File > Export > Export image... and save your file as .ai, Illustrator. It should save your flash artwork in vector format, which is what you want. No rasterizing, no pixelation.


134.

None

Topic: engine question for platformers

Posted: 05/30/08 04:13 PM

Forum: Flash

Alright, update time.. wasn't sure if I should post all this, but at the very least it may provide insight for others down the road, though I can't say this is the best way of doing things at all. If anyone has advice, please chime in.

This is how I have things physically structured so far on the timeline:

Top layer contains my player mc, plus all objects that will appear at any point in the game that I want to be able to swap depths with the player mc. This includes non-interacting barrier objects as well as interactive ones.

Bottom layer contains all my "room" movieclips. Inside each room mc, they will generally consist of all room graphics, objects the player can interact with that will always be below the player in stacking order, and a "footprint" for that room (see the teal colored area in the pic at top of thread) that will perform the hitTest that controls where the character can and cannot walk. There will also be invisible dummy movieclips placed in any entryway that will perform hitTests as well on the player mc and send the parent timeline to the appropriate frame when touched.

The main timeline will consist of a number of keyframes, one for each room. There will be a keyframe for each room on both layers, for the room movieclip and the room content movieclips. I'm not too happy with having the player mc on a keyframed timeline along with all the object mcs , but once again, only doing it because I need the swapDepth functionality.


Movement

The arrow keys control the x/y position of the player. While moving, there are IF statements constantly checking if the player is in the middle of the screen, and if so, whether or not the current background movieclip extends past the edge of the player window; if so, the game will begin panning the background movieclip rather than the player until the end of the room is reached, at which point the player mc is affected by movement once again.

When the player reaches one of those invisible dummy movieclips found within the room movieclips, the player mc's x and y properties are set so he's entering the new room at the right position. The timeline then jumps to the new room's frame.

----------

Here's a problem though that I'm currently working on to find a solution, and I believe it may involve the arrays/classes/whatever that Woadraiders had mentioned.. when the background movieclip pans, I need all the current room's content movieclips to pan as well. Seeing as there will be so many, this poses a problem.

What I've worked out so far is a piece of code similar to this below: when the movieclips I've chosen load in, they assign their instance names to an array for the appropriate room, ie. room2Array. Unfortunately (as far as I know) it isn't possible to then control a group of movieclips at once (properties such as _x, _y, _alpha, etc) so I have to use a FOR loop to affect each mc in the array in one go. Code looks like this:


btn.onPress = function() {
for (i=0; i<3; i++) {
_root[circleArray[i]]._x += 5;
}
}

This works if there are 3 movieclips in that room's array. I could swap out those numbers in favor of variables and have everything run more dynamically, but this is just an example. Clicking the btn movieclip sets the x position of all movieclips in the circleArray ahead by 5 points; it does so one at a time, but the FOR loop runs so fast they appear to move at once.

Just for the hell of it, here's the code that's placed on each movieclip I want included in that array:

onClipEvent(load) {
_root.circleArray.push(this._name);
}

The other thing I haven't decided on yet is whether I want to place EVERY object mc in the game on the first frame of the main timeline along with the player mc, and assign all object mc's to their respective arrays right off the bat, and then use the visibility property to only show the array of objects respective to the room the player is currently in.. so simply put, everything is made invisible once the games starts except the movieclips in the current room; you switch a room, the new set of movieclips is made visible.

Picking up and carrying objects
I think the way I'm going to manage this is by throwing any objects I want the player to be able to pick up into the arrays of room objects. When the player picks something up, the object isn't then "locked" onto the player, but rather it's visibility is turned off and the player mc will go to a frame where he's holding that object - the object will also be removed from it's current array. When the player sets their current object down, it simply makes the object visible again, sets it's x and y properties to math that of the player, and adds it's instance name to the array of whatever room the player is currently in.

----------

That's all I have to add for now, apologies if it's hard to read, I was mostly just spilling my thoughts out in hopes any procedural errors will be caught by those more experienced, as well as provide as provide ideas for those who want to take on games such as these, as I haven't really seen much of this covered before.

Once again, all input is encouraged!


135.

None

Topic: platform BG scrolling speeds

Posted: 05/30/08 12:11 AM

Forum: Flash

Whoops, here's the corrected code - left out the _x properties.

onEnterFrame = function() {
if (Key.isDown(Key.RIGHT)) {
backgroundMC._x -= speed1;
foregroundMC._x -= speed2;
}
}

136.

None

Topic: platform BG scrolling speeds

Posted: 05/30/08 12:09 AM

Forum: Flash

Just assign two variables, speed1 and speed2 for instance, and give one a slightly higher value than the other.. ie, 4 and 5. Then when the player walks, have the background and foreground movieclips pan using their respective variables. It's be something like:

var speed1:Number = 4;
var speed2:Number = 5;

onEnterFrame = function() {
if (Key.isDown(Key.RIGHT)) {
backgroundMC -= speed1;
foregroundMC -= speed2;
}
}


137.

None

Topic: engine question for platformers

Posted: 05/29/08 02:02 AM

Forum: Flash

Hm, sounds like the best way to do this then, I'm definitely going to read more into it all tomorrow and try and whip up a working example Thanks for the input!


138.

None

Topic: engine question for platformers

Posted: 05/29/08 12:59 AM

Forum: Flash

oops, Woadraiders - you're recommending AS3 as it can handle arrays and other large amounts of data more efficiently I take it?

Unfortunately I'm going to be sticking with AS2, I think I'm going to wait until I'm forced to take the plunge into AS3 ;)


139.

None

Topic: engine question for platformers

Posted: 05/29/08 12:56 AM

Forum: Flash

Yeah, one thing I've never gotten into but will have to is arrays, seems like an invaluable tool when handling large groups of objects with similar properties. I mentioned I want the player to be able to pick objects up, walk into other rooms with them, then place them down again. The player should then be able to leave the room, come back, whatever, and the object will always be there until picked up again. I'm hoping arrays could help make that possible.

My next step is going to be creating a few more rooms, so I'll see which method works best for me when it comes to organizing the "room" movieclips - one frame with visibility toggling for the rooms, multiple frames with room variables, or multiple scenes with room AND player variables.

Once I have something roughed out I'll definitely post it.

Gankro, I thought the "floor method" may of been something to do with the arrangement of values within an array, but all I can find is Math.floor for rounding down numbers. Can you elaborate, or am I missing the joke?


140.

None

Topic: engine question for platformers

Posted: 05/28/08 09:24 PM

Forum: Flash

I'm working on creating an "engine" for a platformer-type game; not 2d, more like Double Dragon where the player can travel left and right, as well as up and down to some extent. My engine will hopefully cover:

-player movement (walking, crouching)
-semi-complex collision detection to keep the player within the confines of the current environment
-collision detection between the player and obstacles, including depth swapping
-possibly a basic inventory system
-HEAVY interaction between the player and the environment
-ability to pick up/use items, as well as carry them around and put them down anywhere
-NO jumping or climbing

More things features will likely come up.

What I'd like to know is how other people structure things in games like these. I'm not interested in the actual coding, but moreso your concepts and ideas.

For instance, I've just started, so I've only really gotten into the character movement and room collision detection. So far, I'm using Key.isDown checks to move my character around (though I may switch to key listeners later on if need be). For my collision detection, I plan on creating a "floor" for each room, and checking for collision between it and the player using shapeFlag and a number of x/y point variables I've set around the base of the player movieclip.

To create a multitude of "rooms", I was going to keep everything within one scene, and either a) keep only one room movieclip visible at a time or, b) place each room movieclip on a keyframe in the timeline, using variables to keep track of changes made to the terrain. Not positive yet.

Anyway, interested in seeing what anyone has to say, and willing to provide any advice I can as well.

engine question for platformers


141.

None

Topic: File size...

Posted: 05/28/08 08:43 PM

Forum: Flash

At 5/28/08 08:40 PM, zrb wrote: Useless post much ?
So is this actually, but I had to say it !

it's alright, you're speaking on behalf of pretty much everyone else here i'd say.


142.

None

Topic: Backwards?

Posted: 05/28/08 08:30 PM

Forum: Flash

At 5/28/08 07:57 PM, zrb wrote:
onClipEvent(enterFrame) {
this.prevFrame();
}
That stops the playback though, so no it woudl'nt work in his case.

ahh, you mean it would stop the movieclip dead in it's tracks before it even had a chance to play through..?

if you meant that, then yea, sorry, it wouldn't work.. you'd have to use something like this on the movieclip you wanted to have reversed:

onClipEvent(enterFrame) {
if (reverse == true) {
prevFrame();
}
}

then when you want the clip to reverse, set the variable "reverse" to true. tested, works.

if you meant something else, sorry for not following


143.

None

Topic: Flash Help

Posted: 05/28/08 08:15 PM

Forum: Flash

i apologize about the above post, you CAN use variables within the lineStyle code. listen to what they said,

to stop the user from drawing within a lower portion of the screen, try placing an if statement within the drawing code, something along the lines of..

this.onMouseDown = function(){
drawing_mc.lineStyle(3,0x000000);
drawing_mc.moveTo(_xmouse,_ymouse);
onMouseMove = function(){
if (_ymouse <= 320) {
drawing_mc.lineTo(_xmouse,_ymouse);
}
}
}

assuming your screen is 400 pixels tall, that should make the bottom 80 pixels un-drawable.


144.

None

Topic: Flash Help

Posted: 05/28/08 08:02 PM

Forum: Flash

At 5/28/08 07:58 PM, apocalypsefu wrote: Ok thanks and what kind of code would i use to make the bottom non-drawable?

do you mean you want the lower section of the screen unable to be drawn on?


145.

None

Topic: Flash Help

Posted: 05/28/08 08:00 PM

Forum: Flash

i could be wrong, but i don't believe you can use a variable to specify the color code.

instead, make some movieclips (or buttons) and have them change the lineStyle when clicked, like..

color.onPress = function() {
drawing_mc.lineStyle(3,0x990000);
}

..and as stated above, remove that line of code from the onMouseMove function so it doesn't run constantly, or your line will always remain that color. you know how to get color codes, right?


146.

None

Topic: Backwards?

Posted: 05/28/08 07:48 PM

Forum: Flash

i think that..

onClipEvent(enterFrame) {
this.prevFrame();
}

..should also work


147.

None

Topic: Bullet Hole Problem

Posted: 05/27/08 10:59 PM

Forum: Flash

sorry i can't help, but wanted to say that's looking really cool so far.. it'd be even cooler if it was done without stick men though.

actually, i think i may have read that movieclips created during authoring (while you're working in flash) need to have a depth value set manually, with code - if you're having a problem like this that is. movieclips created at runtime (when you play the movie, using duplicateMovieClip for instance) are given a depth value when created.

so, i think you need to throw a line of code in there somewhere that assigns a depth value to your scope that puts it at the top of the stacking order.


148.

None

Topic: xscale help...

Posted: 05/27/08 07:06 PM

Forum: Flash

the code will work, you just need to place it with an onEnterFrame function so it's constantly being checked for.


149.

None

Topic: Drinking Games

Posted: 05/26/08 03:26 AM

Forum: General

i like the one where you see how drunk you have to get before you start blowing all your money on lapdances


150.

None

Topic: DirtySyko is my friend!

Posted: 05/26/08 03:11 AM

Forum: General

she's pretty hot


All times are Eastern Standard Time (GMT -5) | Current Time: 04:58 PM

<< < > >>

Viewing 121-150 of 1,095 matches. 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 92337