Results 1 to 6 of 6

Thread: will marquee do?

Threaded View

  1. #1

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    will marquee do?

    hi,
    the following script is an example of a "simple collision-detection"
    the line 8(..tar1.style.posLeft+=5) is for moving the object1 to the left...Is it possible to use
    <marquee behavior=alternate>object1</marquee> within the function ?
    I was just thinking of using ten or more "marquees" of different speed
    as "bullets" to shoot targets(tar2)



    <script>
    document.bgColor="pink";
    var a =setInterval('start()',100)
    function start()
    {
    tar1=document.all.im1;
    tar2=document.all.im2;
    tar1.style.posLeft+=5;
    if((tar1.style.posLeft <= tar2.style.posLeft+tar2.style.posWidth && tar1.style.posLeft >= tar2.style.posLeft)
    &&(tar1.style.posTop<=tar2.style.posTop+tar2.style.posHeight && tar1.style.posTop >= tar2.style.posTop))
    {

    tar2.style.visibility="hidden";
    document.all.ses.src='daha.wav'
    clearInterval(a)
    }
    }
    </script>
    <bgsound src="#" id=ses loop=1 autostart="false">
    <img src="kap.gif" name=im1 style="position:absolute;top:100;left:100;"><br><br>
    <img src="kizss.gif" name=im2 style="position:absolute;top:100;left:300;"><br><br>
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width