SWiSH

 


Home
Search
History
SWiSH
News

 

Enjoy these animations built using a program called SWiSH. The .swi files can be downloaded by those who own the program and freely modified and experimented with for educational purposes only.  If you do decide to use/modify /improve on the work you see here, please let me know by email. I would love to see the results.

Jean-Michel Molin
Computer Support
Weston School

 

Animations

bullet

Pumpkin Message

bullet

Canada

bullet

Actions Speak Louder Than Words

bullet

Enrichment

 

Original .swi files

bulletPumpkin Message
bulletCanada
bulletActions Speak Louder Than Words
bullet4 Letter Words

 

Testing Section

The links in the Animations section use the following code to pop up a window when you click on the link. You can define window height and width, control whether or not scroll bars will appear, decide whether the user can resize the window and if the web page will open in a new window or not.  I find this very useful when I want to control a browser window which contains a flash movie.

 

Anyone know how to add code to centre the browser window on the screen?

<a href="filename.htm" onClick="popup = window.open('filename.htm', 'windowname', 'height=440,width=640,scrollbars=no,resizeable=no'); return false" target="_blank">WebPage Text</a>

A few suggestions and comments...

bullet

You have to edit the html manually,

bullet

Replace filename.htm with the name of the file you want to open.

bullet

Replace windowname with text that doesn't contain any spaces (took me a while to figure that one out).
Use underscores if you want to separate words

bullet

Height and width are whatever you need in pixels

bullet

Scrollbars and Resizeable can be set to yes or no

bullet

Target can be set to _blank (new window), _parent (parent window), _top (whole page) or _self (same frame)

bullet

Replace WebPage Text with the text you want to see on your actual web page.

 

Below is a working example for the Pumpkin Message link in the Animations section of this page

<a href="PumpkinMessage.htm" onClick="popup = window.open('PumpkinMessage.htm', 'Pumpkin_Message', 'height=440,width=640,scrollbars=no,resizeable=no'); return false" target="_blank">Pumpkin Message</a>

The following javascript will set the size of a new browser window and center it on your screen.  I t has tyo be added in the <head> section of the html page you are loading. Unfortunately, it doesn't do away with the "chrome" (scroll bars, etc.)  Anyone out there know how to include the ability to remove scrollbars and control the resize option? Try it by clicking here.

<script type="text/javascript">
<!--


window.onload = function() {
 

var width,height,new_x,new_y;


// New width/height
width = 640;
height = 440;


// Set the new x/y values for the window
// This will move the window to the center of the screen
new_x = ((screen.availWidth / 2)- (width / 2));
new_y = ((screen.availHeight / 2) - (height / 2))

// Resize the window and move it to the center of the screen
window.resizeTo(width,height);
window.moveTo(new_x,new_y);


}
-->
</script>




 

bullet

test

bullet

test1

bullet

test2

bullet

test3

bullet

Pumpkin Message Javascript

bullet

Pumpkin Message Javascript2