-
Doesn't work when loaded into external swf
Hi Guys,
I've only been working with flash for about 3 weeks and I'm fairly new to programming so any help would be greatly appreciated.
I'm using Flash CS5 with AS3 btw.
Code:
///////////////////////////
// Custom Mouse Controls
///////////////////////////
var myCursor = new PCIcursor(); // PCIcursor is a movieclip
myCursor.visible = false;
myCursor.mouseEnabled = false;
myCursor.mouseChildren = false;
// Replace cursor with PCI card outline
function PCICursor(event:MouseEvent):void {
PCIboard.visible = false;
Mouse.hide();
stage.addChild(newCursorOutline);
stage.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
}
function mouseMoveHandler(evt:MouseEvent):void
{
newCursorOutline.visible = true;
newCursorOutline.x = evt.stageX;
newCursorOutline.y = evt.stageY;
}
Ok, the issue I'm having is that when I test this file in flash it seems to work fine. The cursor is replaced with the movieclip I am using and everything functions how it's suppose to. Now when it's uploaded online and loaded into another swf the cursor disappears completely. Any ideas?
-
Code:
///////////////////////////
// Custom Mouse Controls
///////////////////////////
var myCursor = new PCIcursor(); // PCIcursor is a movieclip
myCursor.visible = false;
myCursor.mouseEnabled = false;
myCursor.mouseChildren = false;
// Replace cursor with PCI card outline
function PCICursor(event:MouseEvent):void {
PCIboard.visible = false;
Mouse.hide();
stage.addChild(myCursor);
stage.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
}
function mouseMoveHandler(evt:MouseEvent):void
{
myCursor.visible = true;
myCursor.x = evt.stageX;
myCursor.y = evt.stageY;
}
Sorry, this is the code I have.
-
Any idea guys? I'm clueless. I could really use some help on this. Even if you might have just a small idea of what might be causing it to give me direction. I'm not even sure what to search for.
Thanks in advance!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|