# Free Code & Tips



## BluBarry (Aug 30, 2006)

Hi Gang ~ Yep I know, most of you can produce this code in your sleep but I thought I'd like to throw in a simple html or js code once in awhile for those that could use them. 

Any Code I submit can be altered to do or look anyway you wish. If you need help with this or that, shoot me a PM. One last thing, I guess you can say, I'm old school so much of what I toss in is Old School HTML instead of letting Flash Templates do the work for you (although I use that stuff too) 

Today's *EZ Code* is a simple *Drop Down Menu*

*********************************************************
<!-- TWO STEPS TO INSTALL PULLDOWN MENU:

1. Paste the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->

<!-- STEP ONE: Copy this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
// End -->
</SCRIPT>
</HEAD>

<!-- STEP TWO: Paste this code into the BODY of your HTML document -->

<BODY>

<center>
<form name="form">
<select name="site" size=1>
<option value="">Select Category
<option value="example.html">MyPage
<option value="example2.html">My 2nd Page
<option value="http://www.footballforum.com">My Friend's Page
<option value="/folder/example3.html">Page in different folder
<option value="http://www.techsupportforum.com">Our Site
<option value="one_more_page.html">etc,etc,etc,etc,
</select>
<input type=button value="Go!" onClick="javascript:formHandler()">
</form>
</center>

*****************************************************

*Comments & Questions post here!*
*
*


----------



## BluBarry (Aug 30, 2006)

*Tip of the Day ...*

One of the best Tools I have in my system for Design and a host of other applications is *EZ Screen Capture*. You'll find it helpful when you need to grab an image that will fit just nicely into your Layout. 

Also it is a great tool when you need to illustrate the problem you're having to others.

I can't count the times , Tech Support Agents have to me because of the image I sent, they were able to actually see what I was talking about.

I would also be wise to create a Free Account on one of the Image Posting Sites like *Photobucket* or whatever. You can then use EZ Screen Capture to grab the image you want and Upload it to PhotoBucket then post it on *TSF* for the World to see.


----------



## BluBarry (Aug 30, 2006)

*Re: EZ Code of the Day ...*

*Hi Gang* ~

I’m currently working on a Tutorial using Flash that you’re gonna really like but as I re-read the instructions, I realized it wasn’t too clear for those who might not have Flash experience. I found myself committing the same offense many others do in thinking . “ _You know what I mean_ “. Anyway, it will be up probably tomorrow. 

For those who are interested, this is a little code to place in the Head of your Document that will Display an *Amber Alert Ticker*. I am especially concerned about this because it just seems to me I’m hearing more & more stories about little Kids being abducted, sexually abused or killed then I ever recall years ago. So the more these Amber Alerts are around maybe the better the chance of someone actually seeing one of these Kids. If you save one child, you’ve done more than most in a lifetime.

*Amber Alert Java Applet Code for Website Pages :

<!-- Begin Code Amber Ticker code. -->
<P ALIGN=CENTER>
<SCRIPT LANGUAGE="JavaScript1.2" src="http://www.codeamber.org/js/codea.js">
</script>
</P>
<!-- end of Code Amber Ticker code (c)Copyright codeamber.org 2002, 2003, 2004,2005,2006,2007--> *
******************************************************
*THIS IS A COOL LITTLE CURSOR SNAKE SCRIPT WHERE A SET OF WORDS THAT YOU DECIDE WILL FOLLOW THE CURSOR AROUND THE SCREEN. THIS IS FUN FOR AWHILE BUT SOON YOU MIGHT GET TIRED OF SEEING IT AS I DID OVER TIME. ANY PROBLEMS GETTING IT WORKING, LET ME KNOW .. *
*******************************************************
*<!-- THREE STEPS TO INSTALL MOUSE BANNER:*

1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY tag your HTML document
3. Put the final code inside the BODY of your HTML page -->

*<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->*

<HEAD>

<style>.spanstyle {
COLOR: white; FONT-FAMILY: Verdana; FONT-SIZE: 8pt; FONT-WEIGHT: bold; POSITION: absolute; TOP: -50px; 
VISIBILITY: visible
}
</style>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var x, y;
var step = 10;
var flag = 0;

var message = "JavaScript is so cool !! ";
message = message.split("");
var xpos = new Array();
for (i = 0; i <= message.length - 1; i++) {
xpos_ = -50;
}
var ypos = new Array();
for (i = 0; i <= message.length - 1; i++) {
ypos= -50;
}
function handlerMM(e) {
x = (document.layers) ? e.pageX : document.body.scrollLeft + event.clientX;
y = (document.layers) ? e.pageY : document.body.scrollTop + event.clientY;
flag = 1;
}
function makesnake() {
if (flag == 1 && document.all) {
for (i = message.length - 1; i >= 1; i--) {
xpos = xpos[i - 1] + step;
ypos = ypos[i - 1];
}
xpos[0] = x + step;
ypos[0] = y;
for (i = 0; i < message.length - 1; i++) {
var thisspan = eval("span" + (i) + ".style");
thisspan.posLeft = xpos;
thisspan.posTop = ypos;
}
}
else if (flag==1 && document.layers) {
for (i = message.length - 1; i >= 1; i--) {
xpos = xpos[i - 1] + step;
ypos = ypos[i - 1];
}
xpos[0] = x + step;
ypos[0] = y;
for (i = 0; i < message.length - 1; i++) {
var thisspan = eval("document.span" + i);
thisspan.left = xpos;
thisspan.top = ypos;
}
}
var timer = setTimeout("makesnake()", 10);
}
// End -->
</script>
</HEAD>

*<!-- STEP TWO: Copy this code into the BODY tag of your HTML document -->*

<body bgcolor="#000080" text="#000000" onload="makesnake()"
style="OVERFLOW-X: hidden; OVERFLOW-Y: scroll; WIDTH: 100%">

*<!-- STEP THREE: Put the final code inside the BODY of your HTML document -->*

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
for (i = 0; i <= message.length-1; i++) {
document.write("<span id='span"+i+"' class='spanstyle'>");
document.write(message);
document.write("</span>");
}
if (document.layers) {
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;
// End -->
</script>

<p><center>
<font face="arial, helvetica" SIZE="-2">The Tech Support Forum<br>
by <a href="http://techsupportforum.com">The Tech Support Forum</a></font>
</center><p>

<!-- Script Size: 2.08 KB -->

*****************************************************

*Comments & Questions post here!*
*
*_


----------



## BluBarry (Aug 30, 2006)

*preLoader Tutorial*

*Hi Gang ~

Sorry I've been away for a few days and then Sunday was Football of course but to show my appreciation for what you all are providing here, I thought I'd put this little Tutorial together on how to create a preLoader for your Flash Movies.

Ok, nuff said all will be explained by clicking on this link

preLoader Tutorial using Masking & Tweening

Enjoy and PM me with any questions ....*

*****************************************************

*Comments & Questions post here!*
*
*


----------



## BluBarry (Aug 30, 2006)

*** Good to Remember ***

In working with *Flash ActionScripts*, if you get an Error Message stating " *Statement Must Appear Within on Handler* " 

This simply means you are putting your Action Code on the Button or Movie Clip. In this case, try placing the Code on the associated Frame and that should take care of the problem. 

_A good working habit to always use is creating a separate Frame for your Codes, naming it Action(s) instead of the frame associated with your Symbol._

BB


----------

