Tips on Modifying the Special Effect

Perhaps the most useful two tips we can offer are to make a copy of the page containing the special effect and work with the copy. You don't want to have an accident or make a mistake and mess up your good working version of the special effect. The second tip is to be bold. Don't be afraid to change something because you can always change it back or start over with a new copy of the special effect.

We can be a little more specific in giving you hints. The specifics of any special effect will obviously affect what and how you can modify it to suit your purposes. We like to think in categories so you can transfer what works in one item in that category to another item in the same category. The tips are given first with examples if you need them to help understand the tip.

Special Effects on Images - If you like what the special effect does with the sample images, you might like what the special effect does with your images. Modifications to look for are listed in the table:

Modification
Suggested Action to Modify or Tip to Guide Your Thinking
Name of Image
If the effect only happens to one image, you could look for the place in the script which seems to contain the name of the image and either change the name of the script to reflect the name of your image or rename your image to match the name in the script.
Number of Images
Look for a pattern in the script. If you have more images than the sample provided, you will need to copy the section of the script that pertains to images and add your image names. Try to keep the pattern looking closely at punctuation marks like the comma or semi-colon.
Size of Image
Some special effects on images expect the images to all be the same size while others allow for different dimensions of images. If your images are not all the same size and the special effect makes them all the same size, you will have to find another special effect or resize your images to the same dimension.
Images as Backgrounds
Images may be used as backgrounds on most any space - page, table, cell, text area, etc. The trick may be to find an image that will let you see any objects (text or other images) while displayed over the background image. Look for good contrasting of color for text font and background images.

Special Effects on Images - If you like what the special effect does with the sample text, you will probably like what the special effect does with your text. Modifications to look for are listed in the table:

Modification
Suggested Action to Modify or Tip to Guide Your Thinking
Text Message Itself
Look for the exact placement of the text message in the script. Watch out for the 'containing characters' of your script. Sometimes the text must be located between two quotation-mark characters. If the text you plan to use also contains a quotation mark, it probably won't work correctly. See if an apostrophe would work as well.
Font
You may want to change the font of the text in the special effect. You could want a different color, size, style or combination. Depending on the script, this may be more effort than it is worth to you. Look for a suitable script that let's you see the name, size, color of the font and change these attributes to suit your needs
Location
The sample effect may display the message you want, but often not in the place you want it to show on your page. Consider using a Table. Paste the script from the Body section inside the exactly correct table cell. This often works and lets you control the "where" the text shows up.
Text Boxes
Some text scripts choose to locate the text message in a text box. The sample script may call for a small (or large) text box depending on the size needed for the sample. Your needs could vary from the sample and not look good in the same size text box. You will need to look in the script where the dimensions of the text area is identified and increase the numbers or decrease depending on your preferences.

Special Effects with Motion - There are may things that can move. This is something of a 'catch-all' for things that might move on the page.

Modification
Suggested Action to Modify or Tip to Guide Your Thinking
The objects move but at the wrong speed
Typically there is a single number in the script that controls the timing of an event. Usually that number works something like this - Count from 1 to this number and take the next action or move. You can speed things up by decreasing this number or slow things down by changing to a larger number
Location
Consider putting the object that moves (text/image) inside a table cell. You have great control of the location of the table and its cells. The trick is to paste the object to be moved inside the code for the correct table cell - between the correct cell tags. The cell tags are all <td> to begin a cell and </td> to close that table cell
Popups
Some special effects will cause a pop-up object (window, image, text, etc.) - the various security and 'nag-protection' features on some computers may block the pop up from happening. Most blocked popups will work if the user depresses the CTRL key. You may need to add something on your page to alert the user of this problem and suggest a solution.
Links
Some of the effects use links as a 'trigger' for the effect. The links may be images or text - Substituting your text or images should work, but you may have to consider space (size of images or length of text) A good idea is to try whatever size you need to see if it works. If it does not, then consider using something more nearly like the sample until you can get it to work correctly.

Some Sample Scripts matching the tips given.

Text Examples:

//This is the news you wanna have, set the link and the text. If you don't wan't it to link anywhere
//use a # as the link
news=new Array()
//Copy these three lines and change the info and numbers to get more news.
news[0]=new Array()
news[0]["text"]="New scripts, www.AceJS.com is updated daily with more scripts!"
news[0]["link"]="http://www.AceJS.com"

news[1]=new Array()
news[1]["text"]="Webmaster tools, counters, icons and much much more @ AceJS.com"
news[1]["link"]="http://www.AceJS.com"

In this text script, you can easily modify what is said as long as you stay between the quotation marks ("xxxxx") - similarly you can have a link to a new web page (your site or an external site) as long as you enter the correct web address between the two quotation marks.

news[2]=new Array()
news[2]["text"]="Your third message goes here "
news[2]["link"]="http://newwebpage.com"

news[3]=new Array()
news[3]["text"]="Your fourth message goes here "
news[3]["link"]="http://newwebpage.com"

If you needed more than two test messages, you could copy the pattern and add your third or fourth news item. Just be sure to change the numbers accordingly.

Image Examples

This example uses images of butterflies to move around the screen. A portion of the script that affects the image is...

var floatimages=new Array();
floatimages[0]='butterfly2.gif';
floatimages[1]='butterfly2.gif';

If your image is bat.jpg, you could change the code to read

var floatimages=new Array();
floatimages[0]='bat.jpg';
floatimages[1]='bat.jpg';

Of course you need to be careful to stay inside the apostrophe characters and note the semi-colon at the end of each line.

Motion Examples

The same script moving butterflies around the screen moves the image in a straight line for some time before it changes direction. You could adjust the length of time by changing only one number

var Ymax=8; //MAX # OF PIXEL STEPS IN THE "X" DIRECTION
var Xmax=8; //MAX # OF PIXEL STEPS IN THE "Y" DIRECTION
var Tmax=10000; //MAX # OF MILLISECONDS BETWEEN PARAMETER CHANGES

A larger number, say 15000, would cause the image to go in a straight line a little longer. A smaller number would cause a shift much quicker.


This concludes the tips section. We would be remiss if we didn't remark here that the developers of these pages are not personally proficient in developing original scripts for use on web pages. However, we are quite good at finding special effects and modifying them to meet our personal and professional needs. Also note that all such special effects are not free. Some developers wish to charge for the use of their work as is their right. To the best of our knowledge, all of the special effects in this collection are free for use. We recommend that you leave the author's identification with your special effect (if it is there) to honor the author and possibly encourage other creative scripts in the future.

View the Collection | Return to Tutorials