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: 'Afro-Ninja'

We found 12,283 matches.


<< < > >>

Viewing 31-60 of 12,283 matches. 1 | 2 | 3 | 4 | 5 | 6 | 7208410

31.

None

Topic: Simple As2 To As3 Q

Posted: 08/19/09 03:19 AM

Forum: Flash

At 8/19/09 02:55 AM, Xoria7 wrote: The "fp" are is the background.

So I'm mainly wondering about the _root thing.

drop the underscores from _root, _x, and _y

that still doesn't guarantee anything though- it depends where that code is being executed from. I'm guessing it's inside another mc somewhere because you're using root in the first place. If so, then the 'root' property isn't accessible until the object it belongs to has been added to a display list.


32.

None

Topic: Classes...is there any point?

Posted: 08/11/09 05:31 PM

Forum: Flash

At 8/11/09 05:03 PM, Jereminion wrote: hello i have a question about this. you said that classes represent objects in the game. in as2, you could simply put all the code on an enemy object, duplicate it as many times as you want, and the code on the movieclip applied to all of the enemies.

when you use a class you would write all the code for that enemy in a separate file, link it to a movieclip in the library, and then create instances of it as needed. And yes, store them in an array and loop through them if need be.

i am not using classes, so i am just doing a for loop for the dynamic actions of the enemies (using the array's length and using an array to store the movie clip names). if i used classes for multiple enemies and their actions, would i have to use a for loop also? i want to know because the enemies will have a few thousand lines of code and having them in 1 or more for loops will slow my game down.

It doesn't really matter how many lines of code are 'on' the movieclip, it just depends what you're actually doing with those movieclips each time you loop. If you loop through them and call a 'checkCollision' function each time then the speed of that function will determine how efficiently the loop executes. It doesn't matter if you have another 800 lines of code that aren't being used.


33.

None

Topic: Classes...is there any point?

Posted: 08/11/09 04:17 PM

Forum: Flash

Classes offer organization and structure

What happens when your game is ten thousand lines of code long? do you want to have to sift through the same window for your code or would you rather open up a file that you know contains it?

A class is used to represent a logical object in the game. If you have a main character, make a class for it. All variables, methods, and general behavior relating to that character will be contained within. When you need to make adjustments to the character, open up MainCharacter.as, and it's all there for you.

When you code on the timeline you can have fragments of code laying around everywhere, even nested within layers upon layers of movieclips


34.

None

Topic: Portal Filtering

Posted: 08/10/09 02:29 PM

Forum: Flash

At 8/10/09 02:22 PM, SweetLiquidSnake wrote: Today was almost the final straw, I have seen spam flashes of drew pickles giving barney a facial, real gay men sucking dick, two 3D raptors getting it on, pictures of massacred Jews, and today a live action video of a man being beheaded. Now how come this shit manages to pass through and stay through? How come after the "under judgement" phase the whistle option dissappears? Dont kids use this site?

it passes through because of mass voting from the parties involved. there has been discussion though about keeping the whistle option even after something passes judgement.

Which brings me to my main problem. I dont know who moderates the flash portal, I dont know if its based completely on votes or its done by some Bot, but either way it obviously isnt enough, so i dont know why they dont appoint a user or 2 to do it.

that's a lot of power to have, right now only admins can do this and it should probably stay that way.

As for the members of these retarted groups, obviously blocking their current user account doesnt do shit because they just create a new one and change maybe 1 or 2 letters. I know its possible to block IP addresses, Chatango does it all the time, so why cant we just block their IP forever and never have to deal with them again?

It's not hard to change your IP address or mask it altogether

As for my previous point, I think the new motto for this site should be "Expert Flash by Expert Artists, and Screw Everyone Else". Why? because I love this site and adore users like Krinkels and Johnny Utah, and I dont think that amazing series's like Madness or Tankmen should be placed on the same webpage as shit like "Drew Pickles Gay XXX" or "Jinx Hentai Parody"

Changing the site's slogan isn't going to stop anyone from submitting anything. Your version is uh... kind of contrived and doesn't roll off the tongue very well.


35.

None

Topic: Actionscript is programming...

Posted: 08/08/09 04:18 AM

Forum: Programming

At 8/7/09 11:49 PM, JoeyCentral wrote: So why can't it be a legitimate discussion in the programming boards? So can somebody tell me why Actionscript is supposed to be in the flash forum except for the fact that it's a language solely for the purpose of flash?

because people who program in actionscript go to the flash forum. this is a general programming forum. where would you rather direct your actionscript question- to a forum of actionscript programmers or miscellaneous programmers?


36.

None

Topic: Question about the flash portal?

Posted: 08/07/09 08:34 PM

Forum: Flash

At 8/7/09 08:30 PM, toshema wrote: After I saw this piece, http://www.newgrounds.com/portal/view/23 6505 . it made me wonder if we can enter movies made in programs other then flash? I do plan to make movies in flash ( I have flash cs4), but I haven't got around to it because of other projects. And I've never made a flash before. but I do have movies made in after effects /photoshop, etc... Can I submit those?

you need to convert them to .flv and embed them into a .fla file.

you can submit anything to the portal as long as the final compiled form resides in a .swf


37.

None

Topic: Document Class with Frames

Posted: 08/07/09 08:33 PM

Forum: Flash

At 8/7/09 08:07 PM, InnerChild548 wrote:
At 8/7/09 08:04 PM, mulatto401 wrote: I don't get what exactly you mean.....you want to execute code when the swf loads from a frame? Isn't that what the Doc class is for?
I have this code written in the doc class for the first frame of my swf, (Which is the main game). But then I made the main timeline goto the next frame. How do I switch the code in my doc class for frame 2?

you made the main timeline goto the next frame in the document class right? so you can also specify more code there as well. as mentioned, use a function

gotoAndStop(2);
stuffForFrame2();

though you shouldn't try to envision this as 'frames' so much as it logical program divisions. For example after your initial code is done you call a function called 'setupGame();' which moves to frame 2 and then initializes a playing area.


38.

None

Topic: Automated backup downloading

Posted: 08/07/09 06:35 PM

Forum: Programming

I have a cron script on my server that creates a backup of the database every night. It works fine, but I still need to ftp in and download the backups every now and then. If someone managed to compromise the entire server in between downloads, I'd still lose all of that data.

Does anyone have any suggestions for automated retrieval of the backups from my server? I use smart ftp and it has a scheduler feature, but I can only specify a file name to download each time. I create chronological backups named with the date they were created, and I don't know of a way to say 'download the newest file in this folder'

I also don't want to download the entire folder because it's just going to grow exponentially bigger. I suppose I could have the cron filter out some of the older ones but I'm not sure if that's the behavior I want

Any other ideas on how to accomplish this?


39.

None

Topic: Moving an object diagonally in AS2

Posted: 08/07/09 06:13 PM

Forum: Flash

increment your x/y properties at the same time?

onClipEvent(enterFrame)
{
_x+=2;
_y+=2;
}

that will move a clip down to the right 2px each frame


40.

None

Topic: unloadMovie() problem, AS2

Posted: 08/07/09 01:58 PM

Forum: Flash

use removeMovieClip to fully remove the clip from the screen, not unloadMovie

http://www.adobe.com/support/flash/actio n_scripts/actionscript_dictionary/action script_dictionary578.html


41.

None

Topic: AS3 "event.target" question...

Posted: 08/06/09 05:03 PM

Forum: Flash

At 8/6/09 04:59 PM, Oldsage10 wrote: Well, I removed the with entirely and the code now works. I was using with to try and make this game more expandable.

I haven't done so in the past, but I wanted to start this off as a single player game, then, waaaaaay down the road, port it for online multiplayer.

I'm not sure how using 'with' in this case would help make the game more expandable- with is primarily used to just save yourself some typing. And in the case of an event listener like this, the reference to the event itself is going to remain the same whether the game is single or multi-player


42.

None

Topic: AS3 "event.target" question...

Posted: 08/06/09 04:58 PM

Forum: Flash

At 8/6/09 04:49 PM, zuperxtreme wrote: It seems a bit impractical to use "with", why not just:

Cursor.addEventListener(Event.ENTER_FRAM E, Follow);

function Follow(e:Event):void {
Mouse.hide();
e.target.x = mouseX;
e.target.y = mouseY;
}

also, the original error was caused by referring to the event in two different ways. When you passed it into the function you called it 'e:Event', but when referring to it in the function body you used 'event'.

You can use any name you want, as long as you bring it into the function typed as :Event and refer to it consistently


43.

None

Topic: onclipevent, removemovieclip & lag

Posted: 08/04/09 03:27 PM

Forum: Flash

to be safe just do

enemyObj.onEnterFrame=null;

before you remove them from the screen


44.

None

Topic: Turning textfield into MovieClip.

Posted: 08/04/09 04:14 AM

Forum: Flash

At 8/4/09 04:01 AM, SonOfChaos wrote: I wanna use some of the movieclip classes methods such as scaleX on some text I have, the text is dynamic and the exact text to be displayed is to be pulled out of an array. Is their a method or someway to code a text box to become a MC?

You can place the text field in a sprite and then control the sprite with scaleX or whatever else you need. Placing it in a movieclip is pointless because you wont need or be able to use the movieclip functionality.

If there is more to it than just needing the properties of a sprite/movieclip and this is something you'll need to use often, consider making a class for it that extends sprite. That way you can just make an instance of your custom class and have the class itself deal with setting up and manipulating the text field. Just depends on what you're doing.


45.

None

Topic: Nesting Functions in AS3

Posted: 08/04/09 03:34 AM

Forum: Flash

At 8/4/09 03:17 AM, SonOfChaos wrote: Thanks for the support Afro-Ninja.

I'm basically trying to force myself to do things in different ways to learn some of the nooks and crannies of flash with simple little programs, I did not know that the scope was so strict in AS3. Thanks for the help Mr. Ninja.

I've done the same plenty of times. Just keep in mind that different doesn't always mean better.


46.

None

Topic: Nesting Functions in AS3

Posted: 08/04/09 12:38 AM

Forum: Flash

At 8/4/09 12:35 AM, dogdgey5 wrote: i could help you

but you're just so stupid

stop trolling the forum


47.

None

Topic: Nesting Functions in AS3

Posted: 08/04/09 12:34 AM

Forum: Flash

At 8/4/09 12:11 AM, SonOfChaos wrote: Hello,

To teach myself AS3 I am doing a lot of small simple programs. In this one, I have two buttons, one creates an MC that is a box, the second is supposed to put text in the box. Now, I don't want to simply add text, I want to nest the function into the MC box. I know this could be done easier with public functions, but that is not what I want here.

you can't do that. 'PopText' will never exist until MainMenu is called, and it will cease to exist afterward. The only reason you should ever nest a function is if there is a very specific behavior you need to accomplish that relates to the main function and warrants being its own function. Even then I'd recommend just keeping them as two separate functions. Why slow one function down by having to create a brand new second function every time it's called?


48.

None

Topic: As3 Help!

Posted: 08/03/09 09:53 PM

Forum: Flash

syntactically I don't see any problems with that, are you sure that both dropMenus_mc and WebDesigns_btn are valid targets? no misspellings?


49.

None

Topic: how do i fix this

Posted: 08/03/09 05:51 PM

Forum: Flash

you need two equal signs for your if statement

if(_root.kills == 5)

one equal sign is for assignment, two is for comparison. if you use one sign you set kills equal to five immediately, and the result of that operation itself is just the number 5. Any number except 0 will equate to 'true,' triggering the statement.


50.

None

Topic: Wtf Why?!

Posted: 08/03/09 05:06 PM

Forum: Flash

At 8/3/09 04:54 PM, JoeyCentral wrote: Why do I have to learn what gravity is JUST TO MAKE A GUY FUCKING JUMP?! I never learned physics, so it's kind of fucking hard to do advance shit like that. Also, I can't make something move without a proper math formula, which is bull shit! I mean, I didn't even do Geomerty yet, and yet it's a necessity to know trigonometry? Yeah, please tell me there's an alternative to learning this crap cuz I wanna know how to code.

you don't have to know physics to understand the concept of gravity, you live in a world with it

what happens when you jump? you go up until the amount of energy used is no longer sufficient to escape the earth's gravitational pull, then you come back down.

Let's say in a game, when you jump, the character starts by moving upwards at 10px/frame. Obviously this will change over the course of the jump- if it didn't your character would just float up and away forever. So once the jump starts, just start subtracting an arbitrary amount each time to represent gravity pulling them back down. So for each frame let's say you subtract .1 px. Your speed will slowly work it's way down to 0 (the height of the jump) and into the negative, bringing you back down. When you detect touching the ground reset your speed var and have it ready for the next jump.

this is 'fake physics' because it doesn't use any real formulas and isn't based on the actual laws of gravity. It's just imitating them to look believable.

you'll need to know a little trig if you want to work with rotations, angles, arcs, curves, etc. you don't need to take a class in it though, you can just become familiar with some of the formulas to take care of the basics.


51.

None

Topic: RollOver help

Posted: 08/03/09 02:47 PM

Forum: Flash

someButton.useHandCursor=false;


52.

None

Topic: Platform problem

Posted: 08/02/09 03:44 PM

Forum: Flash

this line right here

if (_root.plat.hitTest(_x,_y+3, true)) {
this.gotoAndStop(1);
}

says "whenever the player is touching the platform, make him stop on frame 1"
while he's on the platform, he's continuously touching it as well, so he's never going to leave frame 1

you need to figure out a way to trigger a one-time touch down on platforms/floors so you can reset his frame and do whatever else and then go back to normal behavior

I'm not sure what the purpose of the hit Test is inside of your Key.RIGHT section. If you're moving right the only thing you need to make sure of is that you don't pass through a wall, you shouldn't normally have to change the frame state. Unless you're doing some kind of animation where the character pushes against the wall.


53.

None

Topic: Adobe Cs4 Design Premium

Posted: 08/02/09 02:49 PM

Forum: Flash

At 8/2/09 02:45 PM, Wiiplayah43 wrote: I'm interested in getting Flash so that I can make movies & games. Is Adobe CS4 Design Premium the best version to get? I'm not willing to spend the extra money on CS4 Master Collection, by the way.

"design premium" refers to a collection of programs from adobe based around design, such as flash and photoshop. much in the same way that "master collection" refers to all of them. You're just looking for flash, right?

Flash CS4 is the newest version and has the most features. I don't have any major issues with it but a lot of people still prefer CS3. You can download the trial from adobe's site and see what you think.


54.

None

Topic: EnterFrame

Posted: 08/02/09 02:28 PM

Forum: Flash

At 8/2/09 11:37 AM, JPGarcia wrote: AS3:

Lets say you have alot of MCs that need to be updated (by using an UPDATE function)... is it better to have only 1 onEnterFrame event listener with a for to update them all, or to have one onEnterFrame event listener for each? I mean, is there any FPS variation or what so ever?

it depends on an infinite number of factors- how many mcs are on the screen, what each one is doing, what each one needs to be doing, how much actual code is involved, etc etc.


55.

None

Topic: AS3 event handlers problem

Posted: 08/02/09 02:23 PM

Forum: Flash

At 8/2/09 02:15 PM, The-One-Banana wrote: This isn't a serious problem, really, just a bit of confusion.

I was reading a section on event handlers and listeners and looked upon the sample code.

hello_button.addEventListener(MouseEvent .CLICK, click_handler);

function click_handler (event:MouseEvent):void{

/* Do something with this event */

}

I already know that the first line refers to below function when "hello_button" is clicked.

My question is, can the "event" portion of "(event:MouseEvent):void" be a different name? My book lists it as evt:MouseEvent, so I assumed it could be changed freely, though I want to make sure before I mess up my .swfs with it.

It must be of type MouseEvent, because that is the event object that will be passed to your listener. You can, however, name it whatever you want

e:MouseEvent
evt:MouseEvent
event:MouseEvent
asdf:MouseEvent

are all valid. it's simply a name for you to refer to it while inside of the listener function.


56.

None

Topic: converting AS3 to AS2

Posted: 08/01/09 12:03 PM

Forum: Flash

file -> publish settings -> flash tab


57.

None

Topic: I promise

Posted: 08/01/09 03:00 AM

Forum: Flash

At 8/1/09 02:47 AM, lookan wrote:
At 8/1/09 02:38 AM, Afro-Ninja wrote: ok get reading

http://www.adobe.com/devnet/actionscript /getting_started.html
thanks but i just didn't get it i guess i can't make games

that's because you're not trying, and not asking the right questions. you can't jump straight into making games, and anyone who does doesn't know what they're doing

you need to learn how to program. which includes simple things like variables and loops. you can learn the basics in any language, including actionscript.

if you really have the drive and desire, you can learn a wealth of information from the link I posted

but you replied a mere nine minutes later and posted 'I give up I can't do it'


58.

None

Topic: I promise

Posted: 08/01/09 02:38 AM

Forum: Flash


59.

None

Topic: I don't have Flash anymore!

Posted: 08/01/09 02:33 AM

Forum: Flash

Adobe is interested in statistical data regarding the people who download flash. Is this really so extreme?


60.

None

Topic: help with function events

Posted: 07/31/09 08:41 PM

Forum: Flash

At 7/31/09 07:52 PM, TrippyWhale wrote: here is the code:

_root.createEmptyMovieClip("ammocount",-

6);

ammocount.onEnterFrame=function(onPress)

{

if(weapon=="pencil" && _root.pencil>=1){
_root.pencil-=1;
}
if(weapon=="npaper" && _root.npapers>=1){
_root.npapers-=1;
}
};

i want it so that when the mouse is pressed it subtracts one from the variable, but when i switch weapons it just subtracts one from the variable until it equals zero, whats up?

you're not writing that correctly- you're setting up an onEnterFrame handler and passing the argument 'onPress' to the function, which does nothing. it needs to be

ammocount.onPress=function()

though ammocount is just an empty movieclip so I'm not sure if the press is going to work right or not


All times are Eastern Standard Time (GMT -5) | Current Time: 03:36 AM

<< < > >>

Viewing 31-60 of 12,283 matches. 1 | 2 | 3 | 4 | 5 | 6 | 7208410