Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Custom Cursor Query(without Weird Glich?)



hi there, in my movie i have a custom cursor and i have used this code:
code: cursor_mc.onMouseMove = function() {

updateAfterEvent();
};
function init() {

cursor_mc.swapDepths(1048575);

cursor_mc.startDrag(true);

Mouse.hide();
}

init();
now is there a function that say when the mouse isn't on the swf the custom cursor isn't visible and vis versa? and if so what is it?



FlashKit > Flash Help > Flash ActionScript
Posted on: 04-18-2005, 05:28 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

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!

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.

Asp Database Query Weird Thing Happening
Hi,

I'm trying to create a members area in MX by using 'new loadVars' and 'sendAndLoad to pass username and password values to an ASP page. SQL code then queries a database to see if my MX username matches a database username.

Say I have a username of 'user' and a password of 'pass', my problem is that in the code:


Code:
dim my_username = Request.Form("username")
dim my_password = Request.Form("pwd")

"SELECT * FROM LoginTable WHERE username='" & my_username & "' " _
& "AND password='" & my_password & "';"

For some reason the SQL does not insert the values from the my_username and my_password variables. I have checked the database connection which is working, I have hardcoded the SQL statement to show WHERE username ='user', which also works, and I am able to output the value of my_username using Response.Write at the end of the ASP code.

I can only presume that the ASP page cannot receive the my_username values from Flash in time before the SQL executes, but this doesn't sound right. Please can anyone shed any light on this strange anomaly - I'm fairly new to ASP and am willing to supply the full ASP and Actionscript code if necessary.

Thanks in advance.

F5 Input Text Cursor Query
Flash 5 user:

I'm trying to simulate a dos-based interface. Text input in this interface uses a horizontal white cursor.

I've managed to get this cursor to follow what the user types in - it works fine in the standalone .swf - the text color is set to green and it's against a black background which means that the original flashing black cursor is hidden. However, when it's run through a browser, the default flashing cursor appears in green (i.e. the color of the text).

I was wondering is there any way of getting rid of this default flashing cursor in text input fields?

Custom FLV Player Query
Dear all

I have created a custom FLV player and i would like to embed it into our web site. The problem I have is I want it to be dynamic. So I can link lots of videos to it rather than export just one movie with the player from flash and embed that each time into the website. I want the player as a permanent entity and then link to it via a database with a list of FLV videos. I know about Flashvars and creating those variables in the javascript file but I want to know do I need to or can I type a query into the source field in the parameters of the .fla file to link to a database full of the videos. Rather than place in that source field the name of one .flv movie. Thats where I am stuck. I am pretty new to flash. I am using progressive download by the way.

Our website is coded with classic ASP/CSS and we use access for databases.

Many thanks

Rob

Quicktime Glich?
I am working with a flash mx file that contains a movie symbol in the first and only frame. The movie symbol has 400 frames. When I export it as a QuickTime 7 mov file I specify that I want it to "pause on the first frame", yet it automatically starts to play when opened. The pause function works when there are no symbols. Is this a glich? Does anyone know of a work-around?

Thanks, RMC

Weird Cursor Issues With Menu
I am using a custom cursor for the flash movie. Now here is the problem. If you accidently right click within the flash movie you get a menu popup (obviously default), but when you click off the menu the default white arrow stays on top of your custom cursor (not disappearing and leaving the custom cursor). I have tried other scripts for the custom cursor, but nothing seems to get right of that issue. Is there a way to have nothing pop up with you right click (no menu at all) or is there some extra script I have to add to eliminate that error.
I have tried using the <param name=”movie” value=”main.swf”>, but that still gives you a menu...

Thanks in advance

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'

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

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

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.

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

More About Custom Cursor...
Please tell me actionscript for my custom cursor, who would change size or colour when I roll on buttons./Just script for that colour or size changing/

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

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

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);
}

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

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!

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.

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?

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?

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!

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

Custom Cursor
Hi
how would i create a custom cursor that stays the same when you roll over a button ?

Thanks again !!!!!


PLEASE HELP ME !

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!

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.

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

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

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

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!

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!

[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!

[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?

Custom Cursor
How do I create a custom cursor to appear when rolled over on hotspots but dissapear when not.

ex: ttp://www.yangtan.com/v01/flash.html

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.

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.

Custom Cursor
Can someone point out a good online tortorial on making a custom cursor?
Thanks

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?

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

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?

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

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

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

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

[FMX] Custom Cursor
Can anybody help?!

Is there any way I can fade in/fade out a custom cursor when a visitor rolls into/out of an active area?

Any help greatly appreciated.

J.

Custom Cursor Help
i created a custom cursor, is it possible also to make the cursor chnge whenever in hovers over a button?? if yes, cn u post the script. thanks

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.

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

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

Copyright © 2005-08 www.BigResource.com, All rights reserved