FALLING OBJECTS
This tut explains how to make objects or
words or both "rain" down you myspace page, just like the examples
on this page.
To acheive this look, you need an understanding of HTML
and in particular, the <marquee>
tag. You may have seen a similar style of page decoration on other
websites where images seem to fall in a random pattern, more like how
snow drifts down and across a page. Check this
example where the flowers drift down the page. Unfortunately, this
hot look requires the use of Javascript, which myspace does not allow.
This script we have for you though achieves a similar success and is pretty
rad anyway.
You also need to understand this: Each window
of your browser can be measured in dimension with pixels. You always start
from the top left hand
corner of the browser window. This top point is zero. From this point,
you can measure from left any number of pixels. Normally a computer screen
will only show 800 pixels across. From the point zero, you can also measure
from the top any number of pixels [in the same direction as scrolling
down.] Normally a computer screen will only show 600 pixels down at once.
However, your webpage design can be as many pixels as you want. You need
to know this stuff about the height and width of your design for this
falling objects script to work. When you are writing your script, you
will need to specify how far down the browser window the object will appear,
how far down the object will fall before dissapearing and how far from
the left side of the browser window the object will make this path.
whenever you count pixels
in a browser window, start here: |
|
this is what the code looks like: |
<marquee behavior="scroll"
direction="down" scrollamount="5" style="position:absolute;
left:10px; top:5px; width:150px; height:1600px;"> <img
src="http://www.somewebsite.com/somepicofsomething.gif"></marquee> |
|
this is what the code
means: |
marquee |
this is the HTML
tag for something that is gonna move or "scroll". |
behavior |
this is telling
the object that it will scroll continuously [no alternating
or sliding] |
direction |
this is telling
the object which direction it is going. in this case, it is
falling down |
scroll amount |
this determines
how fast your object will move. 1 is pretty slow, 12 starts
to get fast, 20 is pretty zoomy and so on. |
style |
so this is where
it gets mathematical: |
|
position:absolute |
this places the object relative to the top left corner of the browser |
|
left:10px |
the object will
appear 10 pixels from the left frame of the browser window |
|
top: 5px |
the object will
first appear 5 pixels from the top frame of the browser window |
|
width: 150px |
this determines
the width of the column you object has to appear in. if your
object is 200 pixels wide, you need to adjust the width to 200px
for example |
|
height: 1600px |
the object will
fall down the page 1600 pixels from the top frame of the browser
window, disappear and then start falling again. |
This next part is
where you put your object. If it is an image, you have to put
the complete URL in the <img src> tag. If you want to
write a word, you just write your word. For example: |
<marquee
behavior="scroll" direction="down"
scrollamount="5" style="position:absolute;
left:10px; top:5px; width:150px; height:1600px;">
YOUR WORDS HERE </marquee> |
|
You
can also specify the font size and colour. Read the script below
for an example of where to put the script and how it might look.
For more information about the <font> tag you can check
here. |
|
It is important to make sure that you put
all the < " / > etc in the right place or your code will not
work. You also have to make sure that your URL for any object that is
an image is correct. It is possible to change all of the numerical style
values. Any object can appear where ever you want, fall as far down the
page as you want and go as fast as you want. Just remember to specify
the px afterwards. And, if you want more than one object to fall, you
need to repeat the same code over for each item. The code for the
example page looks like this:
<marquee behavior="scroll"
direction="down" scrollamount="1" style="position:absolute;
left:100px; top:5px; width:150px; height:600px;">
<img src="http://projects.lektrolab.com/damyspacehustlerz/photobucket/10.gif">
</marquee>
<marquee behavior="scroll" direction="down"
scrollamount="4" style="position:absolute; left:200px;
top:5px; width:150px; height:500px;">
<img src="http://projects.lektrolab.com/damyspacehustlerz/photobucket/aniGif.gif">
</marquee>
<marquee behavior="scroll" direction="down"
scrollamount="9" style="position:absolute; left:300px;
top:5px; width:150px; height:400px;">
<font size="7" color="#FF0000">HEY!!!</font>
</marquee>
<marquee behavior="scroll" direction="down"
scrollamount="11" style="position:absolute; left:400px;
top:5px; width:150px; height:300px;">
<img src="http://projects.lektrolab.com/damyspacehustlerz/photobucket/photoalbum.gif">
</marquee>
<marquee behavior="scroll" direction="down"
scrollamount="7" style="position:absolute; left:500px;
top:5px; width:150px; height:500px;">
<img src="http://projects.lektrolab.com/damyspacehustlerz/photobucket/butterfly104.gif">
</marquee> |
Now, test out your script writing skills
on your myspace profile. To do this, it is best to use on of your fields
you didn't fill anything in yet that you can easily delete if it doesn't
work properly or you change your mind. You can experiment - COPY and PASTE
our example code from the green frame above to your profile. Once saved,
your profile should have the same objects as our example page scrolling
down your profile. You can then go back and edit the code, by replacing
the URL's to your own selection of objects and words in the right spots.
You can also adjust the positions and speed of the objects by tweaking
the numbers. And you can also add more images.
If everything goes smoothly, by adjusting these elements in the <marquee>
tag: direction, left, top see if you can get your objects to go from left
to right!!
And if nothing goes right, here are some
Falling Objects code generators to copy and paste into your profile. Be
aware that as with most generators, they also generate a free advertisement
for themselves on your myspace page.
Free
Web Layout - this one only lets you write words but it is really a
good one!
Nackvision.com
- this one lets you insert a URL for an image, but you can only use the
URL for one image. It is a bit ropey, but it works.
Myspace
Gens - another falling object generator.
|