Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

custom cursors

Status
Not open for further replies.

jacksplat

Programmer
Jun 19, 2001
67
US
i'm trying to create a custom cursor but can not do it. I have followed the article in teh help provided with flash and it doesn't work. I have looked over all the code and every step zeveral times and cannot get it to work. please give me hints on how to do this.
 
i can get te mouse to hide, but i can't get my movie clip to act the new cursor...so the "startdrag" part isn't working.
 
I can't find the help file you mean, although I do sort of remember it, and the only thing I can think of is that you might have forgotten to give the movie clip an instance name.

To do this select Window/Panel/Instance from the menus and then in the panel put a name in where it says 'Name' (just under behaviour) that matches the name that you are referencing with the startdrag command).

Let me know how it goes, sorry I can't be more useful but I'm a little strectched for time at the moment; I'll let you know at lunchtime today if you've had no luck!

X-)

PetitPal.
 
i finally got it working after doing 3 tutorials on flashkit.com I don't know what was wrong...i had everything correct, instance name...everything...it just wasn't working....I got it now tho, and i realized that inorder to have the mouse refresh correctly u have to put the frame rate at 120, so animations r blistering fast.

i'm new to flash so this may be a very stupid question, but could i have a static menu scene at 120 fps, then when something is clicked, have it point to another scene at a lower frame rate, then at teh end of the enimation show another menu scene or static scene at the 120 frame rate? i'm asking because i haven't had time to test it out myself. thanks
 
Jacksplat,

You can't change the framerate between scenes within the same movie.

As for the cursor change, nice little thing, but it has the adverse effect of slowing down the mouse. The more complex the mc attached, the slower the mouse will be! Nothing I know of, you can do about it!
Unless... Got this crazy idea... Maybe loading the cursor mc as a movie on another level, if it had been done at let's say 3 fps, and that your main movie is at 12 or 15 fps, thus playing the cursor mc 4 or 5 times faster, would work! Might be worth a try!

;-)ldnewbie
 
so ur saying that lowering the frame rate of the cursor movie but then keeping the main at regular will make the mouse update faster? that doesn't sound like it would work to me. I'm talking about if say u have the cursor all the way at the left hand side of the screen and then u move it to teh right hand side, whether u see the cursor move all the way across or if u see it just flash up at certain places. I had another question on this subject but i forgot it now....
 
I did say there was nothing you could do about it and that it was just a crazy idea!

;-)ldnewbie
 
Is there any way of checking if the mouse is OUT of the flash movie?...because I've always hated it when you made a custom cursor, and if you move your mouse outta the SWF, the stupid MC stays right in the movie and sits there in the middle of everything...SHEESH, and w/ a fast mouse mover like me, it's a problem. ----------------------------------------
The Learning process is just a way to get rid of all the stupids in your head.

Now where's that cute kitten? ;-)
 
o yeah thats my other qustion.....is there a way to make the movie expand to fill up the whole browser, but without resizing it? just like if u have a lets say 400x300 movie, and u have a custom cursor, is there a way to keep the movie 400x300 but make the custom cursor work in the entire web page, instead of stopping at teh edge of the movie?
 
Jacksplat, look at this thread...

thread250-104027

I would think that you might be able to load your SWF into a fullscreen movie that has the cursor actionscripting in it, and the html will show through...;)

Am I right on this one Old and Virt? ----------------------------------------
The Learning process is just a way to get rid of all the stupids in your head.

Now where's that cute kitten? ;-)
 
i'm thinking even if the movie is full screen it still retains it's border..when you do the full screen it just makes the bg color take up the rest of the browser window out side of the actual movie..so no i don't think you can do it that way..but i'm sure there is some scripting that can be done to make the mouse mc go invisible untill the mouse rolls back over the movie..


i could be wrong though don't quote me on that..


keep searching..
e.gif


carlsatterwhite@endangeredgraphics.com
 
Well, he's wanting the cursor to be in the entire webpage, over HTML and stuff, I believe...so I was thinking, you could use kind of an OVERLAY Flash page, load your main movie that is 400x300 in the center of the overlay and the overlay would allow you to have the cursor going over the HTML...with the flash movie showing and the rest of it not. ----------------------------------------
The Learning process is just a way to get rid of all the stupids in your head.

Now where's that cute kitten? ;-)
 
worth a try..seems like it would work..
e.gif


carlsatterwhite@endangeredgraphics.com
 
basically i had in mind something like this site has become sort of a guide for me to learn flash. i'm trying to emulate it or atleast take certain elements from it that i like for the sake of learning, i'll modify them later when i encorporate them into my own page. i tried to contace the owner of the page but it keeps saying my message can't be sent. so i turn to u guys for help. hehe
 
dude that whole page is flash..there is no html there..just because some of it is white doesn't mean that the movie stops at the color frame edges..if you right click anywhere on that page it brings up the about flash prompt..that is why he can have the custom cursor througout the entire page..
e.gif


carlsatterwhite@endangeredgraphics.com
 
Virt is right, that whole page ( is Flash... But Luke's way of doing things might work (though only in IE!) also. Will try it sometime!
As for testing if the mouse is out of the swf... Sure you could! Probably several ways to have your own cursor dissapear upon exit of the movie frame.

Something like this on a 400*400 movie:
xval = getProperty(_root.cursor, _x);
if (xval>10 && xval<390) {
setProperty (_root.cursor, _visible, &quot;1&quot;);
} else {
setProperty (_root.cursor, _visible, &quot;0&quot;);
}

Guess you could also have an invisible button (just a little smaller) than the movie, and show your cursor on rollover, or hide it on rollout.

One problem with both of these Luke! If you're trigger happy as I suppose you are, because of refresh rate, on a fast move out, you can allways trip these methods... And your cursor would still be left lying there!
But on normal moves, It works fine!

;-)
 
i know that entire page is flash...there was never a doubt in my mind about that...my question still remains, &quot;how do i do that?&quot; is it just a really bug movie and he put &quot;scroll=no&quot; in teh body so that even tho my resolution is 1024x768 and say the movie is 1600x1200, i can't scroll to see teh rest? or is it a small movie that he got the bg to extend 100% of the browser size? i noticed that even when u shrink the size of the browser down it doesn't make the movie resize and u can even shrink the browser down all the way and theres still no resize and theres no scroll.
 
looks like he made the movie 1024x768... my browser resolution is higher than that and there is a border around the page where the cursor becomes a standard pointer again. Ya' Gotta Love It!
sleepyangelsBW.jpg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top