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))
{
This is what I've gathered, he's thought of having different speed marquees, each representing a bullet. He then has a target and some kind of collision detection system. Not sure why, but maybe it could actually be used to demostrate something. Either way, marquees will not do.
very true. and now that I've realised flash can read external files, it could even be made for easy editing, so you wouldn't even have to know or even have flash to edit the speeds of the bullets.