-
Help with mouse cursor replacing
OK I've been successful in replacing my mouse cursor with a movieclip I made.
Problem is, I have several movies on the site, each on on a different level, and the cursor's movieclip loads underneath them...how can I force it to load on top of everything?
Also, the site resides in one HTML which has a table. This table has a top section and a bottom section. Each section holds two different main SWFs. The mouse only works in the section it is replaced. How do I make it so that the cursor stays changed across the whole site?
-
Also, I wanted to make four different cursors, and replace the mouse cursor randomly. Any thoughts on how?
-
well u have to do one thing first that keep all ur movieclip which u want to use as curson and put the same code on each of them also u need to switch the depth of this movieclip to next highest avalable depth do the following
Mouse.Hide(); // on main time line
on movieclip
onClipEvent(load){
_root.createEmptyMovieClip("muymc", _root.getNextHighestDepths());
}
onClipEvent(mouseMove){
this.swapDepth(_root.mymc);
this._x = _xmouse;
this._y = _ymouse;
}
put this code on all the four movie clip and copy this movieclip to all ur four flash fla well this will solve ur problem
-
mmm
That ALMOST solved the problem.
The thing is, I don't have four different FLAs, I'm using just one, I need it to randomly choose a cursor each time it is loaded.
-
you could do this on the main time line
var cursor:Number = Math.round(Math.random() *3);
like on the first frame what this does is gets a random whole number between 0 - 3 giving the possible outcomes of 0,1,2 and three
make an if event saying something like
if(cursor == 0){
code for cursor 1 here
}else if(cursor == 1{
code for cursor 2 here
}else if(cursor == 2{
code for cursor 3 here
}else{
code for cursor 4 here
}
so everytime the program loads it will give a different random number giving you a different cursor hope this helps
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|