Jump to content

Darkness

Members
  • Content Count

    81
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Darkness

  • Rank
    Newbie
  1. I have a bitmap loaded from an external source (a website). This bitmap is loaded in a class, and, when I use it in a frame, I can add it to the stage by using addChild(). This works if I just use this.addChild().However, for certain bitmaps, I've wanted to "group" them together so that I can delete that group all at once. I'd assume I'd need some sort of "container" to do this, though I'm not quite sure how to go about this.I've tried creating a blank movieclip, then using movieClip.addChild(bitmap), though this doesn't seem to work. I'm somewhat new to AS3, so ya. : PAnyway, to sum it up, I want to create some sort of container and use addChild() to add bitmaps to that container, so that later on in the code, I may delete all of the bitmaps that are inside of that container.Help would be much appreciated.
  2. In an applet, is there a way to use a truetype font without forcing the user to first install that font onto their system, then use the drawString method to display text using that truetype font?
  3. I'm relatively new to Java programming, to a certain extent. More specifically, new to programming applets. I used to do Java programming somewhat about three years ago, but not too regularly.Anyway, I had attempted to create an image and display it to the screen outside of the paint() function. It is in a manually created method called "update_text". m_letter1= getImage(getCodeBase(), ut_character);m_graphics1.drawImage(m_letter1, 21, 21, this); This executes at the end of the update_text method. However, I get a NullExceptionError when it runs, and therefore the image is not displayed. Here (before the above code is executed), apparently m_letter1 and m_graphics1 are null. ut_character is not. After executing the above code, only m_graphics1 is null.Outside of the update_text method, I defined the graphics and image variables (m_letter1 and m_graphics1): private Image m_letter1;private Graphics m_graphics1; This is the error I get: Exception in thread "Thread-5" java.lang.NullPointerExceptionat base.Main.update_text(Main.java:113)at base.Main.run(Main.java:156)at java.lang.Thread.run(Thread.java:619) Main.java:113: m_graphics1.drawImage(m_letter1, 21, 21, this);Main.java.156: update_text();Anyway, I was wondering if there was a way to fix this. I can't necessarily use the paint method, I'm pretty sure, since I don't want all of this displayed exactly at run time.Any help would be much appreciated.
  4. Thanks for the help.The spelling error you mentioned is not actually like that in the actual script, by the way. =PSo, anyway... by adding this instead of window.onclick= find_coordinates;, it worked: <body onmousedown='find_coordinates(event);'> Thanks.
  5. Thanks for replying.Anyway, the problem is that the function which finds the coordinates never seems to fire afterward - I have attempted to use an alert() in the coordinate-finding function, the alteration of a span, etc. Never seems to fire when the button is clicked (the form is never submitted by the way - it fires an AJAX function).
  6. This code finds the X and Y coordinates of a click: function find_coorddinates(e){FC_CurrentX= 0;FC_CurrentY= 0;if(!e){e= window.event;}if(e.pageX || e.pageY){FC_CurrentX= e.pageX;FC_CurrentY= e.pageY;}else if(e.clientX || e.clientY){FC_CurrentX= e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;FC_CurrentY= e.clientY + document.body.scrollTop + document.documentElement.scrollTop;}window.ReturnX= parseFloat(FC_CurrentX);window.ReturnY= parseFloat(FC_CurrentY);} On the page, I have this: window.onclick= find_coordinates; Normally it works.. however, if one clicks on a submit field, it does not appear to work: <input type='submit' value='Submit' class='submit' onclick=\"this.disabled= true; this.value='Loading...'; submit_field();\"> In other words, it does not change window.ReturnX and window.ReturnY which are the variables that hold the X/Y co-ordinates. However, if I click anywhere else randomly, it works.
  7. I have an AJAX script which appends the following to a span (well, it's similar): <select id='select_thing' onchange='functionhere();'><option value='1' selected>1</option><option value='2'>2</option></select> Whenever functionhere() is called, it repeats it (appends the above into that span again).If you select two, it will go back to 1, which it's supposed to do (since, when the AJAX is called, it just puts the above code into the innerHTML).However, if I say: alert(select_thing.value); after changing the value to 2, it always says 2, even though the selected value is 1.So, basically, it seems to be caching the first selected option or something.Any fix?Thanks
  8. I think Google now ignores meta tags quite a bit because of people attempting to use them to increase ad revenue... but I haven't tried the robots meta tag, so I have no idea if that would work.
  9. Java is very easy to use, but it can lag badly and be more error-prone. If you want a higher quality game, go with Flash, but it's quite complicated (usually). It can be hard to learn, since one of the only good ways to learn it is by taking classes.
  10. There should be some sort of password required in order to access that page. For example: <?phpif($_POST['submit']){if($_POST['field']=="passwordhere"){//allow access}}else{echo "<form method='POST'>Enter the password to proceed.<br /><br /><input type='text' name='field'><br /><br /><input type='submit' name='submit' value='Continue'></form>";}?> ...or something like that.
  11. Darkness

    Asp Or Php

    I prefer PHP. I've heard that ASP can only be used on Windows servers, which I despise.
  12. Darkness

    Tparpg

    Perhaps div layouts aren't good for beginning programmers/designers. I've been programming (mostly C++, Assembly and PHP, but still...) since I was 8~9 (so, it's been about 5 years), and I'm not fully fond of divs yet (for layouts) as they can be more complicated. Well, that's probably because I despise CSS/HTML and the likes, but yeah. >> PHP is funner. I'll shut up now.Anyway, it's kind of hard to give you any help. We can't really make you a new layout from scratch (okay, most of us can't), and you don't seem to know much about CSS and HTML yet. Maybe you should start reading some of the tutorials here, they are very helpful.Just a bit of advice: it's probably best to make your own layouts. You don't learn if you get others to do everything for you. Trust me, I've been through this kind of phase before. Rather, if you're a beginner, look at the source of some websites which have simple layouts, and learn from it. Don't steal it, you'll get in trouble. I mean, like, look at its source to get an idea of how things can be done. Additionally, the tutorials on this site are quite helpful, as I previously stated.
  13. Darkness

    Tparpg

    Um, http://www.eeveeshq.com/fansite/divlayout might help.
  14. Darkness

    Tparpg

    You would need to use divs rather than tables.
  15. Darkness

    Tparpg

    Um, well, first of all, you shouldn't be copying TPMRPG. Try not to, anyway. All the new Pokémon RPGs lately have been copying TPM. Dx
×
×
  • Create New...