Custom Cursor Troubles With Rollovers
Hi all,
I can't get my head around this one:
I have a movieClip on the stage which acts as a cursor. Next to it I
have a button with some rollovercode. Seperately the work fine, together
they have some conflict. I only get some nervous rollover/rollout
behaver if I move the mouse over the button, but not the expected
over/out behavior like the code suggests. Conflicting events?
This is the (barebones) code:
The cursor:
package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class CCursor extends MovieClip
{
public function CCursor()
{
stage.addEventListener( MouseEvent.MOUSE_MOVE, moveMe );
}
private function moveMe( evt:MouseEvent ):void
{
x = evt.stageX;
y = evt.stageY;
}
}
}
The button:
package
{
import flash.display.SimpleButton;
import flash.events.MouseEvent;
public class Butt extends SimpleButton
{
public function Butt()
{
addEventListener( MouseEvent.MOUSE_OVER, zoomIn );
addEventListener( MouseEvent.MOUSE_OUT, zoomOut );
}
private function zoomIn( evt:MouseEvent ):void
{
scaleX = 2;
}
private function zoomOut( evt:MouseEvent ):void
{
scaleX = 1;
}
}
}
Thanks in advance,
Manno
--
----------
Manno Bult
http://www.aloft.nl
Adobe > ActionScript 3
Posted on: 05/09/2008 01:45:41 PM
View Complete Forum Thread with Replies
Sponsored Links:
Custom Cursor To Return To The Regular Mouse Cursor
How can I get my custom cursor to return to the regular mouse cursor when in the bottom 3rd of my flash movie. I need to do this for nav functions and I want the regular cursor actions in this area. So to recap: within the top 2/3 of the movie I will have my custom cursor, upon entering the bottom 3rd of my movie I need the cursor to switch back and vice verse...
my code below, please any suggestions are very helpful as I have tried several things:
stop();
import flash.events.Event;
import flash.events.MouseEvent;
import flash.ui.Mouse;
Mouse.hide();
stage.addEventListener(MouseEvent.MOUSE_MOVE, moving);
function moving(evt:MouseEvent):void {
if (cursor.currentFrame != 0) {
cursor.gotoAndStop(1);
}
cursor.x = stage.mouseX;
cursor.y = stage.mouseY;
cursor.mouseEnabled = false;
evt.updateAfterEvent();
}
//These three eventlisteners are telling flash to "listen" for specific events
//in our case if the mouse moves and if the mouse button is down or up.
//then if one of these events happens, it calls a function (mouse_down, mouse_up or moving).
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouse_down);
stage.addEventListener(MouseEvent.MOUSE_UP, mouse_up);
// This is how to construct a simple function,
// this function will write in our text field "mouse is moving"
// when the even is raised by the eventlistener
// function just like above, just for the mouse down event.
function mouse_down(e:MouseEvent) {
if (mouseX < 800 && mouseY < 450) {
timer.start();
timer2.start();
}
}
// function just like above, just for the mouse up event.
function mouse_up(e:MouseEvent) {
timer.stop();
timer2.stop();
}
Thanks again and help!
View Replies !
View Related
Cursor Change - On Rollovers
Hello,
The cursor altamatically changes when the buttons are rolled over when made to a flash movie, however this stops happening when embedded in a Director ,movie?
Does anyone know if there is there a publish setting that will solve this?
Thanks,
Emily
View Replies !
View Related
Mouse Cursor On Rollovers
I want to have a flash page with a grid of blocks. The blocks wil be floating over a picture and are all movie clips. I want to create a roll over effect so that the opacity of the blocks change when you move over them, but I dont want the hand cursor to come up because people will assume they can click them.
And idea how to keep the origional mouse cursor with a rollover? I did see some guys site were he had a similar thing, I assume e used movie clips.
View Replies !
View Related
Mouse Cursor On Rollovers
I want to have a flash page with a grid of blocks. The blocks wil be floating over a picture and are all movie clips. I want to create a roll over effect so that the opacity of the blocks change when you move over them, but I dont want the hand cursor to come up because people will assume they can click them.
And idea how to keep the origional mouse cursor with a rollover? I did see some guys site were he had a similar thing, I assume e used movie clips.
View Replies !
View Related
Custom Cursor + Custom Scrollbar = Problem
Ok, this is the thing: I made a scrollbar in flash, just like I made a cursor. the cursor only works when I set the settings to flash < 6 and as soon as I use the scrollbar while also using the cursor, it stops working. i suck at AS-ing and any help would be greatly appreciated.
~YF220
PS: .fla included.
View Replies !
View Related
CUSTOM CURSOR
Hi again FK. I need help with producing a customised cursor in Flash4. I have the necessary artwork in flash 4 but i don't know how to turn it into a cursor easily.
Muchos helpos would be appreciated... Thanx peeps I knew I could rely on u guys/gals.
_____________________________
Eggman sez 'Stay In School'
View Replies !
View Related
Custom Cursor
ok, i have a flash site with a custom cursor that i want to fade out when the mouse leaves the borders of the window that the flash movie is in. i have the animation set to fade out, all i need is the code to place that will tell the cursor mc to go to that fadeout animation when it detects that the mouse is out of the window. anyone out there wanna help me out???
thanks in advance
mr nix
View Replies !
View Related
Custom Cursor
Is there a way that i can create a custom cursor that acrtivates on button Rollover. Tricky Part is:
The button is an alpha masked mover from affter-effects taht carries transparency.
Any help would be great.
_drewf
View Replies !
View Related
Custom Cursor
hey there, i need a set of lamest terms instructions or tutorial to make a custom cursor for my site. im only a newbie so could it please be easy to understand? thanks in advance.
View Replies !
View Related
Custom Cursor
I have created a custom cursor for a website. The problem is that the cursor appears to go underneath the buttons. I have tried rearranging the layers but that does not work.
Any suggestions?
Also does anyone know if you can have the same custom cursor appear in the website if part of it was made in dreamweaver. I have another site that just the intro is in flash and the rest in dreamweaver and I want the custom cursor to appear throughout the site.
Thanks in advance for the advice
Tazmania
View Replies !
View Related
Custom Cursor
Hey guys
Have a little problem
Am making this little movie and have created a custom cursor, but with this custom cursor i want to pick another MC up and drap it, which is fine, but when i do it drops the cursor. Is there away to have the cursor remain draging and still be able to drag the other MC?
Regards
Steve
View Replies !
View Related
Custom Cursor And...
hey im really startn to get mad lol 1.how do u make animation inside a buton for example when u click i guy he starts to dance or somthn like that
2.and how do u make a custom cursor
pleez write 1 or 2 before your answer
View Replies !
View Related
Custom Cursor
I created a custom cursor in Flash MX & the problem I am having is when you go in any direction to the ends of the sides the cursor cuts off. Does anyone know of a way to fix that. Listed below is the code that I am using.
Spirit Beanies click
Any help would be appreciated.
Thanks
onClipEvent (load) {
Mouse.hide();
startDrag("", true);
}
View Replies !
View Related
Custom Cursor
here's the deal:
in director you can replace the arrow-cursor with a hand (or any other default cursors of windows) whenever it rolls over an object. you can also make your own - saved as two 8-bit bmp's (one as it's supposed to look and the other as a mask).
can this be done in flash. the thing is; i don't want the cursor to depend on what framerate (12 in this case) the movie is. there's some sort of script to prevent this though (something about "function"), but that's all i know.
by the way;
can you only make hittest-areas as squares...? that seems rather boring...
/bensa
View Replies !
View Related
Custom Cursor
I have made a custom cursor for my current project. I am wanting the cursor to "move" or play a short movie when the cursor clicks a button. To further explain it, I have a set of water glasses as the background. Each glass is a button. When the button is pressed, it plays a sound on release. My cursor is a spoon. When I press on of the glasses, I want the spoon to move as if it is tapping the glass. I have a small movie made of this. Is it possible to do this??? Please help!
View Replies !
View Related
Custom Cursor.
Hi,
I am having a problem with a cursor that I built I can get it to work with one exception. I have draggable windows in my project and when ever I drag them the cursor stops working. Why and how can I fix this problem.
Oh and what I am doing is loading the cursor in a higher level than everything else. I am not sure if this method is the best but it is the only way I can get it to show up over certain graphics. Any help would be awesome.
View Replies !
View Related
Custom Cursor
k, im not sure how to explain this, i want a custom cursor that when u click nothing it changes to one graphic, and when u do click something(a button) it changes to random graphics other than the first(and the normal)
maybe the attachment will better explain better...
how do i do this?
View Replies !
View Related
Custom Cursor
k, im not sure how to explain this, i want a custom cursor that when u click nothing it changes to one graphic, and when u do click something(a button) it changes to random graphics other than the first(and the normal)
maybe the attachment will better explain better...
how do i do this?
View Replies !
View Related
Custom Cursor
I used to know how to make a custom cursor but I forgot now. Can anyone refresh my memory? I know it has something to do with dragging a clip event or something but I am not familiar with that much AS. If anyone could give me the AS that'd be cool. Thanks!
View Replies !
View Related
Custom Cursor
Hi, can someone please tell me how to make a custom cursor??
i want a hand to be the cursor instead of the arror inside my flash movie. im not sure if you understand whay im talking about... but i hope you do ^_____^;;
Thanks for your time
View Replies !
View Related
Custom Cursor Help
I want a custom cursor to animate when the mouse button is clicked.
I built the custom cursor animation using the timeline. I have a stop action on the first key frame so the animation will not start playing.
Right now I have this code to change my cursor. What do I have to do to make my timeline start playing on mouseDown?
Mouse.hide();
startDrag("cursor",true);
I tried this....
onClipEvent (mouseDown) {
this.gotoAndPlay();
}
where am i missing the boat?
Thanks!
View Replies !
View Related
Custom Cursor Anyone :(
Hi,
Anyone know a good tutorial on creating custom cursor that ONLY APPEARS when the mouse is over a certain area?
I've seen lot's of tutorials that show you how to create a custom cursor, but
the cursor sits there all the time. It's visible to the eye.
I'm trying to create one where you don't see the cursor until your mouse is over the area where it appears.
View Replies !
View Related
Custom Cursor Any One?
I'm trying to create a custom cursor that appears ONLY in a certain area of my flash movie.
I don't need this cursor to appear on the entire movie, I only need it to appear in a certain area of my flash movie. For example, maybe I have a simple little box in the center of my 800x600 flash movie, and I want the custom cursor to appear only in that little box.
Does anyone know how to create such a thing?
tg
View Replies !
View Related
Custom Cursor Help
Hi all,
After searching for a while and being the absolute novice i am, i can't find an answer. please help........
I created a quick dummy movie with start stop action. If you click on the movie it will stop, then click again it'll restart.
How can i change the cursor icon from a hand/arrow into something of my choosing????
sample movie here
ohh yeah, im using flash mx on a mac
View Replies !
View Related
Custom Cursor Help Please
Hi, Im trying to make a simple custom cursor work with a line drawing app, but I lose clicking fuctionality. this cursor is only to activate while over a certain section of my SWF so I did this
Code:
_root.screen_mc.onRollOver = function(){
Mouse.hide();
_root.pencil._alpha = 100;
_root.pencil.startDrag(true);
}
_root.screen_mc.onRollOut = function(){
Mouse.show();
_root.pencil._alpha = 0;
_root.pencil.stopDrag();
}
how can I do this and maitain the full capabilities of the mouse?
thanks in advance
Mark
View Replies !
View Related
Custom Cursor
Hi,
I'm making a photo gallery site. When the user scrolls over an image, I want the cursor to turn into an arrow that will advance to the next image.
I made a custom cursor, but I only want it to be activated when it's scrolling over the photo, not the entire site.
Here's my code:
onClipEvent(load)
{
Mouse.hide();
this.startDrag();
}
Thanks!
View Replies !
View Related
Custom Cursor
Hi,
I'm having trouble with a custom cursor that i made into an arrow.
It works, except it "flashes" on the very top left of the site when you enter the area where the cursor changes.
Any suggestions?
I posted my file:
go to FTP.fatcow.com
username and password: dianeco
Thanks!
View Replies !
View Related
[F5] Custom Cursor
Hay all,
I am actually building a flash game and using a custom cursor. It has to be published at v6 player.
There are mini movies that are loaded into it dynamically.
My problem is that my cursor doesn't show over top of the pieces that are loaded dynamically. How can I get my cursor to show or go to the highest depth?
Any help is much appreciated!
View Replies !
View Related
[F8] Custom Cursor
hi friends,
currently i am working in a flash website. in that, i have kept a small movieclip(news_mc) in the centre which can be dragged and dropped at any place of the file. while dragging the hand cursor should be replaced with the custom cursor(my_cursor) which i have created already.
could you pls help in this regard?
View Replies !
View Related
Custom Cursor
I've been trying to create a custom cursor. I've looked at two tutorials so far, and they all say to do the same thing. This is my script:
Code:
import flash.display.Sprite;
import flash.events.MouseEvent;
cursor_mc.startDrag(true);
Mouse.hide();
and this is my cursor:
(low quality because I had to copy paste to paint and save as bmp)
The cursor works fine, except when I try to click on a button or symbol. The button just randomly goes into "over" mode when the cursor is over it. When I try to click the buttons, nothing happens.
Anyone know how I can make a cursor that will actually click?
Thanks to all that help.
View Replies !
View Related
Custom Cursor Help
breakItUp_mc is the mc I wish to use as cursor. It has been exported for actionscript with the same name. Does it still need to be added to the stage?
Any help is, well. helpful....
Thanks...
stage.addEventListener(MouseEvent.MOUSE_MOVE, updateCursor);
Mouse.hide();
function updateCursor(event:MouseEvent):void {
breakItUp_mc.x = mouseX;
breakItUp_mc.y = mouseY;
}
yet I keep getting the error:
1119: Access of possibly undefined property x through a reference with static type Class.
View Replies !
View Related
Custom Cursor
I thought this was simple. I need some custom cursors. Created the cursor as a movieclip object on a new layer's first frame and on its actions I have
onCLipEvent(load) {
this.startDrag();
}
when the movie loads, the custom cursor moves alright except its some distance from the standard cursor so its of course not working as expected and if I hide the cursor it will be unusable. Tried setting the movieclips _x to mouse x and that did not help either. What amd I missing?
View Replies !
View Related
Custom Cursor
How can I have a mc act both as a custom cursor and a mc? Is it possible? Here is the scenerio- We are developing a rather simple game where the cursor (crosshair_mc) should cause selected weapons to shoot when pressed but it seems the cursor(crosshair_mc) only responds to the action placed on the timeline (which is for the cursor) and any action/behavior placed on the mc directed is not performed. Any assistance is greatly appreciated. Please remember we are graphic designer formost and not the most brillant when it comes to script, so simply responses and of visual examples with sorrce would be most ideal. Thanks in advance
View Replies !
View Related
Custom Cursor
Hi
I am mucking about with the custom cursor tute and I would like to use the windows cursor and just change the white colour in the middle of the arrow.
My question is can I do a screen shot which includes the cursor or should I just redraw it?
View Replies !
View Related
Help With A Custom Cursor
I am trying to get a custom cursor working in MX - The cursor is a fine line the length of the movie.
I am using this piece of code from a tutorial:
onClipEvent (load) {
Mouse.hide();
startDrag(this, true, L, T, R, B);
}
My page has a number of movielips, some are masked and can be unmasked when the mouse rolls over them. This code works when there is only one movieclip on the stage, But when I add multiple clips with masks the cursor does change to the line, but the line freezes when I attempt to roll over the masked movie to unmask?
What am I doing wrong?
Thanks
View Replies !
View Related
Custom Cursor Help
I'm trying to create a custom cursor that appears ONLY in a certain area of my flash movie.
I don't need this cursor to appear on the entire movie, I only need it to appear in a certain area of my flash movie. For example, maybe I have a simple little box in the center of my 800x600 flash movie, and I want the custom cursor to appear only in that little box.
Does anyone know how to create such a thing?
tg
View Replies !
View Related
Custom Cursor
hi every one,
My boss is asking for multiple types cursors on the same flash file like the pointer and mouse,only one being present at a given instance of time,
if possible give me a solution to my problem
thank y
View Replies !
View Related
Custom Cursor
Going through some old stuff again and stumbled on this... if you guys can use it for whatever... I'm having a very bored if you can't tell...
This class is extremely simple to use, you just create a new instance of it passing into the constructor either the instance name of the movieclip that you would like to follow the mouse, or the identifier name that you gave the symbol in the library... then you call activate() to make it your cursor and deactivate() to make it not your cursor...
Saved as, CustomCursor.as
ActionScript Code:
/* * @author Michael Avila * @version 1.0 */ class CustomCursor{ // our cursor movieclip private var cursor : MovieClip; private var event_cursor : MovieClip; /* Our CustomCursor Constructor * * @param Either the instance name of the movieclip that you are using as a custom cursor or * the identifier name that you gave it in the Library. * * @usage <pre>var cursor = new CustomCursor(my_cursor);// movieclip * // or * var cursor = new CustomCursor("my_cursor");// from library * </pre> */ public function CustomCursor( cursor : Object ) { switch (typeof cursor) { case "string": this.cursor = _root.attachMovie(cursor.toString(), cursor.toString(), _root.getNextHighestDepth()); break; case "movieclip": this.cursor = MovieClip(cursor); break; default: trace("You must supply either an identifier name or an instance name"); break; } event_cursor = _root.createEmptyMovieClip("alsdkfj", 13000); event_cursor.onMouseMove = function() { updateAfterEvent() }; } /* Activates our cursor, activation involves hiding the Mouse and telling our CustomCursor to follow the mouse position. */ public function activate() { Mouse.hide(); Mouse.addListener(this); } /* Deactivates our cursor, deactivation involves showing the mouse and telling our custom cursor to stop following the mouse positions */ public function deactivate() { Mouse.show(); Mouse.removeListener(this); } // gets called when the mouse moves public function onMouseMove():Void { cursor._x = _root._xmouse; cursor._y = _root._ymouse; updateAfterEvent(); }}
Code as it would appear in the .fla
ActionScript Code:
var cursor = new CustomCursor(my_cursor);// uses mc that is already on stage// orvar cursor1 = new CustomCursor("my_cursor");// pulls from librarycursor.activate();
Take Care guys.
_michael
View Replies !
View Related
Help With Custom Cursor
I have trouble publishing a custom cursor that I made using flash. I checked my publish settlings and save it into a new folder whereby the swf and html appear and upload it but it does not appear on my website. I hope someone can help me as soon as possible. Thank you in advance.
View Replies !
View Related
Help With A Custom Cursor ?
Hi im trying to get this cursor component working in a file with dynamicly assigned depths , Im having trouble setting the courser's depth whi9ch is causing it to disappear behing the background whben i set its depth dynamicly .
Can anyone tell me how to set its depth to 901 so it dosnt get shoved behind the wallpaper ?
download
View Replies !
View Related
Custom Cursor
im looking for a way to get a custom cursor on my flash site...also...i want this cursor to load automatically...i do not want my viewers to click a button to get the cursor to load...any advice would be great..thanks
View Replies !
View Related
Custom Cursor
Hi, I'm kinda new to flash.
I've made a cursor in a seperate .as file. called "Cursor.as"
Now i want this drawing I made in there to be my current cursor.
But i have no idee what code I need to use..
(i've been searching this forum but everything i found was with movieclips...)
So i'm wondering if you could help me with what code I should put in my Main.as (or Cursor.as) to get it as my current cursor.
View Replies !
View Related
|