HomeHome  ­FAQFAQ  ­SearchSearch  ­MemberlistMemberlist  ­RegisterRegister  ­Log inLog in  
Post new topic   Reply to topicShare | 
 

 Begginer- change cursor

View previous topic View next topic Go down 
AuthorMessage
devilz-fury
Admin


Posts: 16
Join date: 2008-06-08
Age: 15
Location: In a suit of metal!!!

PostSubject: Begginer- change cursor   Tue Jul 22, 2008 7:05 pm

Step One: Create the cursor

Note: DO NOT copy any script as it will not work.

Go to Insert > New Symbol

In the dialog box give your symbol a name.

Select Movie Clip as the behavior.

Click OK.

You must now create some sort of image that will replace the cursor. There are many ways of doing this in flash, the simplest being to draw one with the paint brush. But you could insert a Jpeg/Gif. Alternatively you could copy and paste a drawing from another program such as Illustrator or Freehand or copy and paste some clip art from Word. However you do it, you must create a picture inside your new symbol.

Important Note: The picture or drawing that you create must be in the centre of the Symbol. If it is not in the centre it will not align correctly. The 'click' point of your new cursor will be the cross hair in the centre of the symbol.

Note that the cross hair is at the point you would want to click with.

When this is done return to the main stage by clicking on the Scene 1 Tab . You will return to the main stage, which should be empty.

Click on Window > Library. Your symbol should be in the library.

Drag your symbol onto the main stage. The position of the symbol does not matter.


Step Two: Assigning an Action to the Symbol

Right click (Mac - control click) on the instance of the symbol on stage and select Actions.

Select Normal Mode from the View Options button .

Click on the Plus button

Select: Actions > Movie Clip Control > onClipEvent

In the options above select Enter Frame

Click on the Plus button

Select: Actions > Movie Clip Control > Start Drag

In the options go to target and type: this

In the options select the target as an Expression.

In the options select Lock mouse to centre.

onClipEvent (enterFrame) {
startDrag(this, true);
}

Your code should look like the above.


Step Three: Hiding the Default Cursor

Right click on frame 1 and select Actions (ie: if the Actions box is closed - if the Actions box is open just click on frame 1 to select it).

Click on the Plus button

Select: Objects > Movie > Mouse> Methods > hide.
Your script should look like this:

Mouse.hide();

Your script should look like the above.

It's that simple, you are now done so save and test your movie.

Enjoy. Very Happy

_________________

Back to top Go down
View user profile http://pro-flash-beat.darkbb.com
 

Begginer- change cursor

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
Pro Flash Beat :: Animation :: Tutorials :: Flash-
Post new topic   Reply to topic