volkantr19 Posted December 6, 2011 Share Posted December 6, 2011 Merhaba Üstadlar; Aşağıdaki linkte bir oyun var.Ben bu oyunu siteme koymak istiyorum fakat oyunun arka plan rengi sitemin düzenini bozuyor.Ben sadece bu oyun penceresini siteme koymak istiyorum,bir türlü halledemedim. Yardımcı olabilir misiniz acaba? oyun linki: [url="http://www.javascriptindir.com/indir.asp?id=52&sIslem=İndir"]http://www.javascriptindir.com/indir.asp?id=52&sIslem=İndir[/url] Quote Link to comment Share on other sites More sharing options...
Lastman Posted December 7, 2011 Share Posted December 7, 2011 (edited) hocam tetris.html dosyasının içinde javascript kodları var.mesela: [code]body { background: #E1D4C0; }[/code] yazıyor.burdaki [color="#FF0000"]#E1D4C0[/color] renk kodudur. [color="#FF0000"]#FFFFFF[/color] yaparsan beyaz olur.Google'dan renk kodları diye ararsan istediğin rengi bulabilirsin. [code] #tetris { position: relative; width: 300px; height: 310px; top: 50px; left: 50px; border: 1px solid #BAA68E; background: #ffffff; }[/code] width: [color="#FF0000"]300[/color]px; genişlik, height: [color="#FF0000"]310[/color]px; yüksekliktir.top ve left satırını silersen yukarı ve sola yaslanır. buradaki kodları düzenledikten sonra iframe koduyla sitene entegre edebilirsin. <iframe width="300" height="310" src="http://www.site.com/Tetris.html"></iframe> gibi Edited December 7, 2011 by Lastman Quote Link to comment Share on other sites More sharing options...
volkantr19 Posted December 7, 2011 Author Share Posted December 7, 2011 Lastman hocam; Yine çok teşekkür ediyorum size... Quote Link to comment Share on other sites More sharing options...
volkantr19 Posted December 8, 2011 Author Share Posted December 8, 2011 (edited) Lastman hocam; Özel mesajdan sonra birşey denedim ve oldu.Oyun şimdi sitemde... Fakat oyun oynarken aşağı,sağa,sola tuşları ''yön tuşlarına'' atandığı için tüm sayfa hareket ediyor.Ben biraz js kodunu karıştırdım oyunun. [color="#ff0000"][b][u]OYUNUN JS KODUNUN BİR BÖLÜMÜ:[/u][/b][/color] /** * Assigning functions to keyboard events * When key is pressed, searching in a table if any function has been assigned to this key, execute the function. */ function Keyboard() { [color="#ff0000"] this.up = 38; this.down = 40; this.left = 37; this.right = 39; this.n = 78; this.r = 82; this.space = 32; this.f12 = 123; this.escape = 27;[/color] this.keys = []; this.funcs = []; var self = this; /** * @param int key * @param function func * @return void * @access public */ this.set = function(key, func) { this.keys.push(key); this.funcs.push(func); } /** * @param object e * @return void * @access event */ Gördüm ki,kırmızı ile işaretlediğim bölüm HEX tuşları kodları.Ben bu oyunun tuş takımlarını rakamlara atamak istiyorum. BEN bunu HEX kodlarını değiştirerek yaptım fakat klavyenin sağ tarafındaki rakamlardan çalışmadı.Klavyenin üst kısmında duran rakamlarla çalıştı oyun. Sizden ricam bu klavyenin sağındaki rakamları kullanabilmem için ne yapmalıyım.O rakamların ayrı bir HEX kodu var mı??? Bu sorunun cevabı beni çözüme götürecektir... Edited December 8, 2011 by volkantr19 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.