-snip-
It did work, but the bullets went backwards and I was at the edge of the screen so I coulnd't see them
[QUOTE=Chad Mobile;22690027][cpp] private void richTextBox1_TextChanged(object sender, EventArgs e)
{
richTextBox1.Text = richTextBox1.Text.Replace("If", "if");
}
[/cpp]
Doesn't work. :frown:
[editline]09:18PM[/editline]
For some reason it makes all the characters I enter backwards. If I type 'If' it types 'fI' like that annoying steam glitch.[/QUOTE]
[cpp]
richTextBox1.SelectionStart = richTextBox1.Text.Length;[/cpp]
Used this, it worked.
It's no stream error or anything, it just resets the pointer (or what ever that thing is called) to the beginning every time you type a letter.
This line puts it on the end again.
But the initial code I was working doesn't do anything other than the backwards text thing. :v:
[editline]10:06PM[/editline]
Nevermind, I missed something. :doh:
[editline]10:17PM[/editline]
Now I need to work on coloring certain phrases. :v:
Doesn't it say that length is not initialized? Because that variable is the one being used without being set to a value.
[code] zomb = _root.attachMovie("zombie", f+_root.numberOfMovieclips++, 0);[/code]
god damn as2 depth, I want it to be on the same layer as the player is when the zombie spawns, I'm just lost in how depth works in as2, it would be easier if i could just assign it to a layer, god damn.
[editline]05:15PM[/editline]
[code] for (i=0; i<_root.bulletArray.length; ++i) {
if (this.hitTest(_root.bulletArray[i])) {
trace("lol")
_root.bulletArray[i].dead=true
this.hp -= 2;
}
}[/code]
also this won't work either, after the loop the hitTest just doesn't fire.
The windows' Cambria Math font doesn't have a stylized 'h' and I have no idea why
[img]http://imgur.com/oWCMk.png[/img]
It works in Word but in my program it appears as a question mark, it's really bugging me.
[QUOTE=Vampired;22713552]-stuff-[/QUOTE]
How is this programming?
Anyhow,
How do I make a messagebox in Java? I googled it but nothing of use comes up D:
[QUOTE=ZeekyHBomb;22715805][url=http://www.google.com/search?q=java+messagebox]Really?[/url][/QUOTE]
Found one,
[code]JOptionPane.ShowMessageDialog(null, "This is a message!");[/code]
Hello!
I managed to calculate vertex normals using the method you showed (although I am not 100% sure if I did everything correctly, that is another matter), but the thing is I simply can't get lights to work. All I get is the ambient light everywhere I cannot figure out what I am doing wrong.
Example:
[IMG]http://i50.tinypic.com/2nuhpqe.jpg[/IMG]
I really cannot understand why this is happening. I even tried (instead of calculating normals) assigning arbitrary normals to every vertex, just to see whether I will get any lighting to work at all and the result is the same. I can post my code but it is quite ugly.
Thanks in advance!
[IMG]http://i50.tinypic.com/smr6nb.png[/IMG]
Okay, now, I have my first java program (yay)
But, the buttons don't look like the good old pretty Java buttons I see in other applications. How do I get that style?
[QUOTE=Poodle;22724738]good old pretty Java buttons[/QUOTE]
What are you on?
[QUOTE=Poodle;22724738][IMG]http://i50.tinypic.com/smr6nb.png[/IMG]
Okay, now, I have my first java program (yay)
But, the buttons don't look like the good old pretty Java buttons I see in other applications. How do I get that style?[/QUOTE]
[img]http://ohm.nuigalway.ie/0506/02omalley/fyp_0506/pics/gui_screenshot.jpg[/img]
Them?
[QUOTE=Poodle;22727283]Yes :D[/QUOTE]
But... Those buttons are ugly
Because beauty is not dependent on the viewer :eng101:
I like them and I am sick of the normal Windows buttons.
How do i return true if a normal button(q for example) is pressed, without having focus on my own program?
Post the programming language you are using and the platform/OS you are on.
Oops, sorry. Nevermind tho, i solved it using this site.
[url]http://www.kbdedit.com/manual/low_level_vk_list.html[/url]
[editline]01:09AM[/editline]
Another question.
Can i fix the "msvcp100.dll is missing" message? Everyone except me is getting it, i assume it's because i got all the dll's from the installation.
No you need to distribute the VC++ runtime
I'm using Java to make a simple Breakout clone. I can't seem to make this work, though.
[code] public void setUp()
{
int x = 0;
int y = 0;
GRect brick = new GRect(x,y,BRICK_WIDTH,BRICK_HEIGHT);
for (int i = 0; i < NBRICK_ROWS ; i++)
{
for (int j = 0; j < NBRICKS_PER_ROW; j++)
{
add (brick ((ROW_START) + (BRICK_SEP * j),
(BRICK_Y_OFFSET + (j *(BRICK_HEIGHT + BRICK_SEP))),
BRICK_WIDTH, BRICK_HEIGHT));
}
}
}[/code]
When I try to add (brick) it acts like I didn't declare brick in the first place. I tried moving the declaration to inside the for loop but it didn't help. What am I doing wrong?
Sorry, first thing I said was nonsense, hadn't read it properly. You are missing a comma after brick.
[QUOTE=Poodle;22728866]I like them and I am sick of the normal Windows buttons.[/QUOTE]
If you're going to release it, you should make it look like normal Windows buttons. You usually want an application to blend in.
[code]
for (i=0; i<_root.bulletArray.length; ++i) {
if (this.body.hitTest(_root.bulletArray[i])) {
this.body.blood.gotoAndStop(2);
this.attack = true
_root.bulletArray[i]._x = -1000;
_root.bulletArray[i].dead = true;
this.hp -= 2;
}
}[/code]Alright, I REALLY need help with this, what this is SUPPOSE to do is check everything in the bulletArray array, and see if it's touching "this" if it is, execute, the problem is, it only checks the first bullet, and once that bullet dies, THEN it checks the next one, which means spraying bullets while missing a few will render them all useless, and that isn't fun.
[code] bullet = _root.attachMovie("bullet", "bull", _root.getNextHighestDepth());
_root.bulletArray.push(_root["bull"]);[/code]this is where the bullet movieclips are attached to the array, hopefully someone can help me out.
What exactly fails? Is the loop incorrect (which you didn't post btw), or does the hitTest fail for all other bullets?
Whoops, added the loop ontop of the first codebox, the hittest fails, as if the first bullet isn't removed, the rest just fly over the movieclip they're suppose to hit.
The problem is that all your bullets are named "bull", and _root["bull"] just returns the first instance of that.
Couldn't you do _root.bulletArray.push(bullet); instead?