Jump to content

Fire Dragon

Members
  • Posts

    159
  • Joined

  • Last visited

Everything posted by Fire Dragon

  1. I want make game,where many many images moves around screen,and you can click one them.How I can make them moving?I want they move like randomly,not only vertical or horizontally.Clickable image can be link,so it isn't problem.Thank you if you can help!
  2. I understood first code clip,how it works,and what you can do with it(or so I think )but that second code was little strange for me.What it should do?I really don't know.I know what is getElementById,and such,but all last line is little strange for me
  3. Hi!I want know,is there code,what turns screen to example comletely black,and after some seconds,turns it back?It would be nice,if it can turn full screen to black (or any other color),but if it can be turn browser window completely black,it would be nice too I know that I can make this changing background color,but I don't know right code However,if there is code what fills screen completely black,I use that Thanks for help!
  4. I tried it,but I can't get it work.Here is my code:What is wrong about it? <html><head></head><body><script type="javascript">document.write("<img src="furret.gif">");</script></body></html>
  5. Phew,I now try learn object oriented programming,using w3schools and one JS book,but I'm little confused about methods,objects,classes etc.I understand that first must create class,what contains then objects.And objects have methods,right?Well,can somebody make some very little object code,what I can use learning object programming?Then I have one more question about objects:What makes them so useful?What kind advantage they offer?Thanks you if somebody can help me.
  6. I know how put JS to html document,but can I html clips to JS?I mean example,when you press button,it calls function,what creates image to page.So how I can put that <img src="image.gif"> code in javascript code?I need some this kind effects,so I need to know,how make it.Thanks!
  7. What is ecmascript?I borrowed JS book,and there reads some places little about it,but what it is,and is it popular or good?I want know...
  8. OK,I understand.And thank you veeeery much!That thing was near drive me crazy!Finally I can finalize my game...
  9. Hi!I now try learn variables with w3schools tutorial,and book,what I got from library.Okay,I tried make variable,what grows,when you press button.And when it is "52",message appears to screen.However,it won't work.Here is my code: <html><head><script type="text/javascript">var mutu = "50"if (mutu == "52"){document.write("Onnistui!")}</script><script type="text/javascript">function add()mutu++;</script><script type="text/javascript">document.write (mutu);</script><form><input type="button" onclick="add()" value="Lisää"></form> What is wrong? <script type="text/javascript">function add()mutu++;</script> In this function,I tried set variable increase using mutu++; andmutu = mutu + 1;but it won't work.Can anybody help me what is wrong,so I can learn this variable thing?Thanks.
  10. Snif,I'm only member from Finland...Snif!
  11. I made prompt box,and it works nicely,but I have little problem.I want so if user answers wrong,program redirectes you to new page.I tried else,and if,but I can't get it work.Please help!Here is my code: <html><head><meta http-equiv="Refresh"content="10;url=http://www.w3schools.com"><script type="text/javascript">function question()var answer=prompt("Who you are?","")if (answer == "Idiot"){window.location="http://www.w3schools.com"}</script><script type="text/javascript">function question(){var answer=prompt("Who you are?","")if (answer == "Idiot"){window.location="http://www.w3schools.com"}}</script></head><body><form><input type="button" onclick="question()" value="Click!"></form></body></html> I know how I can transfer user to new page,but I don't know how make it so that when user answers any other word,it transfers you to another page.
  12. Yes...My code is just like that,but unlike you,it redirects you to new page,when prompt bo is open.Hmm,what browser you use?I use Fire Fox,so it might have something with this.Well,I tested it with Opera,and it works like you said,so Fire Fox is the problem.Thanks anyway!
  13. I met new trouble.I set time limit to my html document,where that prompt box is.It redirectes you to another webpage,if you can't answer in right time.However,here is my proble:If you write to prompt box,and code redirectes you same time to another page,box remains on screen,and you can write your answer there.And if you answer is right,it's brings you to page,where you come if you answer right.Well.I want thatif time is up,and browser redirectes you to new site,you can't answer anymore.Is there code,what destroys that prompt box,or anything else way,how I can prevent anwering after URL is changed?Here is my redirection code: <meta http-equiv="Refresh"content="10;url=http://www.w3schools.com">
  14. Fire Dragon

    CD

    Do anyone know,how make samekind code what works with Fire Fox and Opera?
  15. Thank you!I can't get it work with my original code,but it works nice when I put it to different file.I should now start build my own code over it.Thanks again.It helped me very much!
  16. Hi!I need help with questionbox.Here is my code: <script type="text/javascript">function question(){var answer=prompt('What you are doing?',' ');var right='Writing';if (answer==right){URL HERE}}</script>´ Okay,how I can se so,that when user answers right,he transfers to new url.How I can set there,where now reads URL HERE,code what transfers you to new html page?Thank you very much!
  17. Ah!Now I understand why them won't work!I don't know that they need <script> tags.Thanks!
  18. Yes,I am really question machine,but here is my new problem:I want little game,where is one picture what has three frames.This is easy part.You don't even need JS,you can use gif,but what I need,needs JS animation,and little another coding.Well,I want that when animation shows frame "1",you can click it and you get message,and then you transfer to new html page,where is game's next level.If you click frame "2",you got different message,and you transfer to different html page.And same thing with third frame.Is that kind system possible?Thank you.
  19. Hi!I need help with music codes.I put background music to my game,and it works perfectly.However,I want that when you press one button,it changes to another music.How I can do this?My music code is <EMBED SRC="http://www.geocities.com/kyogreatlas/pc_btower_outside.mid" LOOP=TRUE AUTOSTART=TRUE HIDDEN=TRUE> Please help!
  20. I need code what destroys example buttons,when I don't need them anymore.Like I make now JS game,and I don't want make different places in other HTML-documents,because it gets messy easily.So I need code,what I can place destroy pictures,buttons,text etc.Please tell me how use it! Thanks very much!
  21. Sorry,but I tried them allready,and my comments appears to html document too.BTW,can I place it in head?It is there,and I only guess...
  22. Yeah,I have very stupid question,but I can't find this anywhere!OK,so how I can put comments in javascript?I tried // and some others,but it only writes them to browser window.HEEEEEEEEEEELP!
×
×
  • Create New...