Be a Supporter!

Custom cursors not over flash ads?

  • 337 Views
  • 7 Replies
New Topic Respond to this Topic
JackSmack
JackSmack
  • Member since: Nov. 11, 2004
  • Offline.
Forum Stats
Member
Level 22
Game Developer
Custom cursors not over flash ads? 2010-07-16 19:02:33 Reply

Hey I am making a game with a custom cursor and I just noticed that it stops following the mouse when the mouse goes over an ad box in the game.

I was wondering why this is and if there is any way to fix it?

I have illustrated the problem below... any ideas?

Custom cursors not over flash ads?


Visit JackSmack.com and submit your Flash Games!

BBS Signature
Redshift
Redshift
  • Member since: Feb. 12, 2005
  • Offline.
Forum Stats
Member
Level 15
Programmer
Response to Custom cursors not over flash ads? 2010-07-16 19:55:21 Reply

Well, what code did you use to simulate the custom cursor?


#include <stdio.h>
char*p="#include <stdio.h>%cchar*p=%c%s%c;%cmain() {printf(p,10,34,p,34,10);}";
main() {printf(p,10,34,p,34,10);}

BBS Signature
JackSmack
JackSmack
  • Member since: Nov. 11, 2004
  • Offline.
Forum Stats
Member
Level 22
Game Developer
Response to Custom cursors not over flash ads? 2010-07-16 22:55:30 Reply

myCursor is the cursor clip and is on the timeline.

Here is the code...

Mouse.hide();

stage.addEventListener(MouseEvent.MOUSE_
MOVE, mouseMoveHandler);
stage.addEventListener(MouseEvent.MOUSE_
DOWN, mouseDownHandler);
stage.addEventListener(MouseEvent.MOUSE_
UP, mouseUpHandler);

function mouseMoveHandler(evt:MouseEvent):void
{
myCursor.visible = true;
myCursor.x = evt.stageX;
myCursor.y = evt.stageY;
}

function mouseDownHandler(evt:MouseEvent):void
{
myCursor.clip.gotoAndStop(2); // goto down state
}

function mouseUpHandler(evt:MouseEvent):void
{
myCursor.clip.gotoAndStop(1); // go to up state
}

stage.addEventListener(Event.MOUSE_LEAVE , mouseLeaveHandler);

function mouseLeaveHandler(evt:Event):void
{
myCursor.visible = false;
}


Visit JackSmack.com and submit your Flash Games!

BBS Signature
the1manwiththeplan
the1manwiththeplan
  • Member since: Jun. 10, 2008
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to Custom cursors not over flash ads? 2010-07-18 05:47:29 Reply

Have you encountered this problem before.

Perhaps the distributor of the ad API has programmed it to prevent MCs covering its ad-space?

Perhaps you could try use a separate mouse just for the loading screen to eliminate the issue just using

onClipEvent (enterFrame) {
	Mouse.hide();
	this._x = _root._xmouse;
	this._y = _root._ymouse;
	
}

If the separate loading screen mouse encounters the same problem perhaps my initial theory was correct...


...

Lochie
Lochie
  • Member since: Feb. 17, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to Custom cursors not over flash ads? 2010-07-18 05:59:52 Reply

At 7/18/10 05:47 AM, the1manwiththeplan wrote: onClipEvent (enterFrame) {
Mouse.hide();
this._x = _root._xmouse;
this._y = _root._ymouse;

}

He appears to be using AS3.0 sir.


asdfg

BBS Signature
MintPaw
MintPaw
  • Member since: Jun. 11, 2006
  • Offline.
Forum Stats
Member
Level 10
Programmer
Response to Custom cursors not over flash ads? 2010-07-18 15:14:29 Reply

Yeah dude, I think the API is designed to the point that it cannot be covered up by anything. If you try to cover it up at all your probably violating some rule.


If ya have something to say, PM me. I have a lot of time to spare.
Also never PM egg82.

BBS Signature
the1manwiththeplan
the1manwiththeplan
  • Member since: Jun. 10, 2008
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to Custom cursors not over flash ads? 2010-07-18 16:03:27 Reply

At 7/18/10 05:59 AM, Night-Mare wrote: He appears to be using AS3.0 sir.

Wooow shows how far my knowledge of AS stretches I wouldn't even know the first thing about that language lol


...

JackSmack
JackSmack
  • Member since: Nov. 11, 2004
  • Offline.
Forum Stats
Member
Level 22
Game Developer
Response to Custom cursors not over flash ads? 2010-07-18 22:23:16 Reply

well it's not like the clip is moving behind the ad. It's like the movie clip just becomes dislodged from the mouse or like the mouse is no longer within the bounds of the flash at all.

The only thing I can think is that the ad is loaded on a different level like Level_0 and when you mouse over it the stage doesn't recognize that the mouse is within the bounds at all. I don't know though.


Visit JackSmack.com and submit your Flash Games!

BBS Signature