Drawing Lines with SWiSHScript - SWiSHMax Tutorials
 
  Buy Ebooks, Video Games, DVDs, Electronics and more !
Home | Help Forums | Web Design Tutorials | Free Swishmax Downloads Make Money Online Blog . Free Image and Photo Sharing and Hosting

 

 

Company

Home

Nework Details

Tutorials

SWiSH 2

SWiSHMax

Flash MX

PHP & MySQL

HTML / JScript

Adobe Photoshop

Corel Draw

Gimp

Miscellaneous

Downloads

Templates

Plugins

Fonts

Wallpapers

Free Images

Scripts and Codes

Products

E-Books

SWiSH BB

SWiSH Templates

SWiSH-DB Newsletter
Subscribe to our newsletter : GO
  Partners / Affiliates

   Free image hosting
   Web Design Pakistan
   Swish Templates
   SWiSH Climax
   Talkfreelance Community
   Template Desire
   Lite boards
   Script Sector
   GimpTalk
   13dots
   Idea Designs
   PHP Cafe
   Sposatoettore
   Free swishmax templates
   Swishzone

Manage your site with Flax Article Content Management System
Drawing Lines with SWiSHScript
Category : SWiSHMax | Level : Intermediate | Language : English
Ask Question | Read Comments | Post tutorial | Previous | Next

Web www.swish-db.com

This tutorial will demonstrate you how to make line and set its linestlye(width,shape,alpha)
with SWiSHScript. The functions we will use in this tutorial are

lineStyle(width, color, alpha);
moveTo(x1,y1);
lineTo(x2,y2);


Description of lineStyle
-------------------------------------
This function is used for setting basic styles of the line you
are drwaing. For example if want line with following requirements

width = 2
color = black
alpha (visibility) = 50%

then you will use it like this
lineStyle(

Now if you want any other style you can simply change it from here.

Description of moveTo
-------------------------------------
This function has two parameters x1. When you will be making a line then you will have to tell the points from which points you want your line to be drawn,
for example if you want a line to be started from x=100 and y=100 then you will simply set your points like this

moveTo(100,10);

Basically without moveTo() and lineTo() you cannot make line. You can call this function as Start Point function.

Description of lineTo
-------------------------------------
This function also has two parameter, but it is different from moveTo(), becuase its x2 are
the end points of line for example if you want to make a line which will start from x=100, y=100, and now the end points x2=200,y2=100 It will make a line length of 100 pixels from points x1 to x2. You have seen then y1 and y2 are constant (100) so it will make a straight line on x=axis.

You can call this function as End Point Function, now if you are interested in blue color line, follow the example..
paste ths following code on frame 1 of mainTimeline..


onLoad () {
lineStyle(1, 223220, 100,1);
moveTo(10,10);
lineTo(100,10);
}


hope this tutorial will help you understand how to draw a line with SWiSHScript.
regards
- Ali Roman..


© 2002-2005 Flaxweb Network | Article Manager | Gimp Tutorials Library | RAD C++ Library | Free C/C++ Sourcecode |
Sites of interest : Web Design Blog | Swish Templates | Swishmax Ebook | Photoshop Templates | Gimp Tutorials | Text Forum | Make Money Online