Design By Renee

 Lesson Ten Part Two The Script
Please Note***These pages will be graphic intense, they will take a while to fully download. Use your refresh button to reload the page to check for updates on this page.  ...Renee

Well, here you are! You made it to Lesson Ten Part Two!!
I would like to Thank You for all your hard work and making it this far! 
Now there is nothing you can't do as far a stationery design and scripting!
Thank you for choosing my site to help you learn. I hope it has gave you a good start and I wish you well on your continued journey into more advanced stationery design and scripting. 
You can now officially say "I'm a stationery designer"! 

The Script

FirstStepper's   Download Script Here

Lesson Ten  is a Bounce Multi-Object Script. Which means that we will have a background with a ten bouncing images that move over the background.

There will be no screen captures. You should know by now how to save your scripts and enter your images.
I am only going to show you where to make your changes.

<HTML><HEAD>
<STYLE TYPE="text/css">
<!--
body {
font-family: "Comic Sans MS";
font-size: 14pt;
margin-left: 10;
margin-right: 10;
background-color: #FFFFFF;
color: #000000;}-->
</STYLE></HEAD>

<BODY background="file://C:\Program Files\Common Files\Microsoft Shared\Stationery\Your Background Image Here.jpg" bgColor=#000000>

<BODY>

<IMG id=pic1 src="file://C:\Program Files\Common Files\Microsoft Shared\Stationery\pic1.gif" style="POSITION: absolute; TOP: 0; LEFT: -200">
<IMG id=pic2 src="file://C:\Program Files\Common Files\Microsoft Shared\Stationery\pic2.gif" style="POSITION: absolute; TOP: 0; LEFT: -200">
<IMG id=pic3 src="file://C:\Program Files\Common Files\Microsoft Shared\Stationery\pic3.gif" style="POSITION: absolute; TOP: 0; LEFT: -200">
<IMG id=pic4 src="file://C:\Program Files\Common Files\Microsoft Shared\Stationery\pic4.gif" style="POSITION: absolute; TOP: 0; LEFT: -200">
<IMG id=pic5 src="file://C:\Program Files\Common Files\Microsoft Shared\Stationery\pic5.gif" style="POSITION: absolute; TOP: 0; LEFT: -200">
<IMG id=pic6 src="file://C:\Program Files\Common Files\Microsoft Shared\Stationery\pic6.gif" style="POSITION: absolute; TOP: 0; LEFT: -200">
<IMG id=pic7 src="file://C:\Program Files\Common Files\Microsoft Shared\Stationery\pic7.gif" style="POSITION: absolute; TOP: 0; LEFT: -200">
<IMG id=pic8 src="file://C:\Program Files\Common Files\Microsoft Shared\Stationery\pic8.gif" style="POSITION: absolute; TOP: 0; LEFT: -200">
<IMG id=pic9 src="file://C:\Program Files\Common Files\Microsoft Shared\Stationery\pic9.gif" style="POSITION: absolute; TOP: 0; LEFT: -200">
<IMG id=pic10 src="file://C:\Program Files\Common Files\Microsoft Shared\Stationery\pic10.gif" style="POSITION: absolute; TOP: 0; LEFT: -200">

<BGSOUND id=music src="file://C:\Program Files\Common Files\Microsoft Shared\Stationery\YOUR_MIDI_FILENAME.MID" loop=99>

<SCRIPT language="VBSCRIPT">
REM Edgar V. Poirier
REM [email protected]
Dim w, wW, wH, x(), y(), ox(), oy(), sL, sT, numPics

Set w=document.body

REM IMPORTANT: Enter number of bouncing images here
numPics=10

reDim x(numPics), y(numPics), ox(numPics), oy(numPics)

REM Initialize
sub setUp()
on error resume next
REM Get window dimensions
wW=w.clientWidth
wH=w.clientHeight
REM Repeat to fix an OE bug
wW=w.clientWidth
wH=w.clientHeight
REM and any scroll offset
sL=w.scrollLeft
sT=w.scrollTop
REM Initialize values for each image
for i=1 to numPics
randomize
REM Number of pixels to move image per step
ox(i)=3+INT(RND()*4)
oy(i)=3+INT(RND()*4)
REM Initial coordinates (randomly positioned in window)
x(i)=INT(rnd()*wW)
y(i)=INT(rnd()*wH)
next
REM start bouncing
bnce
end sub

REM This is the main bounce routine.
sub bnce()
ClearTimeOut(myTimer)
REM VBScript version of bounce routine
REM Loop for each object
for i=1 to numPics
p="pic"&i
Set bal=document.all(p)
REM Increment position
x(i)=x(i)+ox(i)
y(i)=y(i)+oy(i)
REM Check for walls on right or left
if (x(i) + bal.offsetWidth > wW + sL) OR (x(i) <= sL) then
ox(i)=-ox(i)
if (x(i) < sL) then x(i) = sL
if (x(i) + bal.width > wW + sL) then x(i) = wW - bal.offsetWidth + sL
end if
REM Check for walls on bottom or top
if (y(i) + bal.offsetHeight > wH + sT) OR (y(i) <= sT) then
oy(i)=-oy(i)
if (y(i) < sT) then y(i) = sT
if (y(i) + bal.offsetHeight > wH + sT) then y(i) = wH - bal.offsetHeight + sT
end if
REM Position object
bal.style.posTop = y(i)
bal.style.posLeft = x(i)
next
REM Repeat. If bounce is too fast, increase the number
REM in the line below from the default value of 2.
REM SetTimeOut with ClearTimeOut keeps the time delay constant.
REM regardless of window size.
myTimer=SetTimeOut("bnce",2)
end sub

REM This sub starts the action as soon as the message is received.
sub window_OnLoad()
setUp
end sub

REM In case window is re-sized
sub window_OnResize()
setUp
end sub

REM In case text is scrolled this keeps the bouncing inside the window.
sub window_OnScroll()
sL=w.scrollLeft
sT=w.scrollTop
end sub

</SCRIPT>
</BODY>
<script language="JavaScript">
<!--
ScrollSpeed = 450; // milliseconds between scrolls
ScrollChars = 4; // chars scrolled per time period

function SetupTicker() {
// add space to the left of the message
msg = "     . . . . Your Message Here. . . .    ";
RunTicker();}

function RunTicker() {
window.setTimeout('RunTicker()',ScrollSpeed);
window.status = msg;
msg = msg.substring(ScrollChars) + msg.substring(0,ScrollChars);}
SetupTicker();

<!-- end -->
</script>
<!--VERMEER BOT=HTMLMarkup EndSpan -->
</HTML>

Click Here To View Finished Stationery
This will take a moment to load, as I have placed it as a txt version, This way you can click on View/Source so that you can see the actual stationery changes that I made. You can see the names and sizes and colors. Use your "back" button to return to this page

A Note From Me! Again, I would like to thank you for choosing my site to help you with your stationery designing! I hope this has helped you understand scripting more and that you will continue on to being the stationery designer you want to become! I wish for you all happiness on your continued adventure into Stationery Designing! I would only ask one favor of you, please sign my guestbook, it does mean a lot to me to know you enjoyed these tutorials!! 
Thank you so very much!!  Renee
AKA ~*Mysteria*~

Please Sign my Guest Book!
     I Would Love To Know You Were Here!

Proud Member Of



All Backgrounds And Images Created In

 

Site Designed And Maintained With

   frontpag.gif (9866 bytes)   

 Backgrounds and Site Design
Created By
Design By Renee
RD
Copyright 1999-2000-2001 Renee Davis

RDemail.gif (1612 bytes)

 

Welcome   Home   Lesson Index   Lesson One    Lesson One-Part Two  Lesson Two
Lesson Two-Part Two   Lesson Three   Lesson Three Part-Two
Lesson Four  
 Lesson Four Part-Two   Lesson Five  Lesson Five Part-Two   Lesson Six     
Lesson Six Part-Two
   Lesson Seven  Lesson Seven Part-Two  Lesson Eight   Lesson Eight Part-Two
   Lesson Nine   Lesson Nine Part-Two   Lesson Ten   Lesson Ten Part-Two
PSP View    Links

 

 

Hosted by www.Geocities.ws

1