• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Why do scaled and masked captivate swfs respond to clicks outside the mask? Can it be stopped?

New Here ,
Oct 19, 2009 Oct 19, 2009

Copy link to clipboard

Copied

We load Captivate 3 SWFs at runtime into our own course player, with movieclip.loadmovie. Our player is built with AS2 and published to Flash 8. We publish our Captivate movies to the same specs. Our latest challenge requires scaling and masking the Captivate SWF.

A click outside the masked Captivate still triggers a click as far as Captivate is concerned, and it throws up a “that’s incorrect” message. Specifically, it only happens when you click in a spot that has masked Captivate “behind” it. In other words, if there would be Captivate there if the mask was turned off, Captivate will respond even when the mask is turned on.

Is there a way to make Captivate ignore mouse clicks outside of the mask? I think it must be responding to Mouse.onMouseDown() since normally a masked object won’t respond to clicks outside the mask.

I’ve put together a small test file to demonstrate exactly what’s happening, and I’ve posted it here: http://www.tbgprod.com/_experiments/captivatemasktest/captivatemasktest.swf

I’ve also uploaded the .fla file. It’s ony 50kb and it’s available here: http://www.tbgprod.com/_experiments/captivatemasktest/MaskTest01.fla

You’ll also need the Captivate .swf file if you want to test locally. Here’s the direct link. Right-click and save target as: http://www.tbgprod.com/_experiments/captivatemasktest/DisplayProperties.swf

My question is "how do I make Captivate ignore clicks outside the mask?"

Many thanks,

Todd S

TOPICS
Advanced

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 19, 2009 Oct 19, 2009

Copy link to clipboard

Copied

Philip at Pipwerks already suggested placing a movieclip with button behavior in front, in order to block the mouse from Captivate, but that does not work. The outer bordered region in the demo file above already has just such a movieclip, and the counter at the top-right corner counts the clicks. So you'll see that when the Captivate movie is scaled, whether it's masked or not, both that region and the Captivate respond.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 20, 2009 Oct 20, 2009

Copy link to clipboard

Copied

Even if anyone just has any knowledge of how Captivate 3 movies actually monitor the mouse, I'd be happy to hear it. In other words, can anyone confirm my hunch? If we knew the internal structure of the Captivate SWF would it be possible to clear and restore some function as the mouse moves inside or outside of the target area? Something like this:

on mousemove {

     if mouse has crossed boundary to the outside {

          functionBuffer = container.whatever.whatever.function;

          container.whatever.whatever.function = null;

     }

     else if mouse has cross boundary to the inside {

          container.whatever.whatever.function = functionBuffer;

     }

}

This would kill Captivate's mouse functions and then bring them back to life, as the mouse exits and re-enters the masked Captivate area. Two questions:

1. If we knew the necessary whatever.whatever.function information, would this work?

2. Does anybody know the necessary whatever.whatever.function information?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 21, 2009 Oct 21, 2009

Copy link to clipboard

Copied

LATEST

I looked at this topic quite a few times but I can't really offer any explanation or solution.

However... I assume that you have Flash skills, so I have two ideas as to how you can identify the function you are looking for.

1. Decompile the Captivate swf using one of those pesky SWF decompilers. Browse through the actionscript to locate the mouse function

2. Use X-ray (http://osflash.org/xray) or similar to "trace" out the functions of your Captivate movie at run-time.

Sorry I couldn't be of more help.

/Michael


Visit my Captivate blog with tips & tricks, tutorials and Widgets.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources