flash cursor

peleplay

Aktivan član
Poruka
1.323
uvezao sam iz dreamweavera flash dugme u html dokument. Pokusao sam da kada kursor predje preko dugmeta bude moj licni kursor, medjutim nesto ne stima tako da na sve moguce nacine kursor nce da se promeni (probao sam CSS, <param> u okviru objekta i josh hiljadu stvari ali nista ne pomaze) :?
 
a, pa ne moze :)
ako hoces poseban kursor preko dugmeta u flashu, reba ga raditi iz flasha, IE konta flash kao zaseban objekat i ne koristi over_state za njega...

greetz
 
Kod:
function showCustomCursor(name) {
	if (name == undefined) return;
	Mouse.hide();
	_root.__cCur__.removeMovieClip();
	_root.attachMovie(name, "__cCur__", 1000);
	_root.__cCur__.onMouseMove = function() {
		this._x = _root._xmouse;
		this._y = _root._ymouse;
		updateAfterEvent();
	}
}

function hideCustomCursor() {
	_root.__cCur__.removeMovieClip();
	Mouse.show();
}

i na button-u moras imati:

Kod:
on (rollOver) {
	_root.showCustomCursor("rollOverCursor");
	// ostatak koda
}
on (rollOut, releaseOutside) {
	_root.hideCustomCursor();
	// ostatak koda
}

gde 'rollOverCursor' predstavlja ime linkovanog movie clip-a koji predstavlja tvoj custom cursor...
 
inco, sad imam drugi problem. Nisam koristio tvoj kod nego sam nesto sam experimentisao, i uspeo sam da podesim da se kursor koriti u filmu. Medjutim, kad film ubacim u stranicu i kad kursor pomerim izvan filma, onaj isti kursor mi ostane na kraju filma, a drugim se koristim po presotalom body delu. Kako ovo da reshim?
 
evo ovako, da bih josh malo bolje uputio evo jednog clanka sto sam nasao na webu:

I. THE DOUBLE CURSORS SYNDROME


When a program (for instance a Flash movie, or a Director movie) is run from a browser, and that program changes its cursor appearance, the program often do not know when the cursor has left the movie window. This usually results in two cursors being visible on the screen at the same time. The first cursor is the phantom "inactive" cursor in the Flash movie, and the the other is the browser's cursor. (I have to admit that I'm not immune to this problem.) For example, the picture below shows a familiar "double-cursors" situation:



Since one of the cursor is inactive anyway, most users will not get disoriented; so this is not a big deal in most cases (it just look rather untidy). If you're interested, however, there are several ways to handle this by checking whether the mouse is inside the program or not. If it is not, hide it. This may require JavaScript or other acrobatics to detect mouse-ins/mouse-outs.

This kind of acrobatic is usually a hassle for programmers, and many just ignored it (myself included). There are several possible reasons for this (I'm not saying these are valid):
The programmer doesn't care.
It's tricky, one solution won't always work on all browsers.
It's time consuming, and all that time for what? Many think that the hassle is not worth the time.
Some programmer will find this task a challenge, but many won't. Reason: the problem on itself is not really a "part" of their program. (Finding out why a certain JavaScript/DHTML code to detect mouse over doesn't work on Macintosh browser brand A but not on Windows browser brand C is not a "challenge," it's nuisance. There're programmers who specialize to program "device drivers," and then there are some who just hate suck tasks.)

In Flash, one thing that would've solved this problem is Macromedia had provided a function that not only show and hide the cursor, but actually change the cursor. Hopefully Flash 6 will.
 

Back
Top