Skip to main content
Participant
May 25, 2009
Answered

AS3 being ignored by Captivate

  • May 25, 2009
  • 1 reply
  • 484 views

Hi folks, brand new here hoping to get a little inspiration.

I have a captivate module I am trying to embed a small flash swf into.

The swf involves a simple script in which when an area is moused over information pops up.

the swf works fine outside of captivate, but as soon as its embedded it just starts cycling through the information. (it's a map of Canada with locations being listed when a province is moused over.

Here's my code in case tha helps

"this.stop();


alberta.addEventListener(MouseEvent.ROLL_OVER, rollSection);
alberta.addEventListener(MouseEvent.ROLL_OUT, offsection);
home.addEventListener(MouseEvent.ROLL_OVER, rollSection);
home.addEventListener(MouseEvent.ROLL_OUT, offsection);
bc.addEventListener(MouseEvent.ROLL_OVER, rollSection);
bc.addEventListener(MouseEvent.ROLL_OUT, offsection);
Saskatchewan.addEventListener(MouseEvent.ROLL_OVER, rollSection);
Saskatchewan.addEventListener(MouseEvent.ROLL_OUT, offsection);
Manitoba.addEventListener(MouseEvent.ROLL_OVER, rollSection);
Manitoba.addEventListener(MouseEvent.ROLL_OUT, offsection);
Ontario.addEventListener(MouseEvent.ROLL_OVER, rollSection);
Ontario.addEventListener(MouseEvent.ROLL_OUT, offsection);
Quebec.addEventListener(MouseEvent.ROLL_OVER, rollSection);
Quebec.addEventListener(MouseEvent.ROLL_OUT, offsection);
Newfoundland.addEventListener(MouseEvent.ROLL_OVER, rollSection);
Newfoundland.addEventListener(MouseEvent.ROLL_OUT, offsection);
Brunswick.addEventListener(MouseEvent.ROLL_OVER, rollSection);
Brunswick.addEventListener(MouseEvent.ROLL_OUT, offsection);
Nova.addEventListener(MouseEvent.ROLL_OVER, rollSection);
Nova.addEventListener(MouseEvent.ROLL_OUT, offsection);
Prince.addEventListener(MouseEvent.ROLL_OVER, rollSection);
Prince.addEventListener(MouseEvent.ROLL_OUT, offsection);

function rollSection(evt:MouseEvent):void
{
//trace("The" + evt.target.name + "button was rolling");

gotoAndStop(evt.target.name);
}
function offsection (evt:MouseEvent):void
{
stop();
}

"

any help would be appreciated.

    This topic has been closed for replies.
    Correct answer Captiv8r

    Hi there

    If this is Captivate 3, I think you are probably out of luck as I don't believe it understans AS3. I think it only understands AS2. If this is Captivate 4, you choose which AS version you want via Edit > Preferences... > Project category > Publish Settings node.

    Cheers... Rick

    1 reply

    Captiv8r
    Captiv8rCorrect answer
    Legend
    May 25, 2009

    Hi there

    If this is Captivate 3, I think you are probably out of luck as I don't believe it understans AS3. I think it only understands AS2. If this is Captivate 4, you choose which AS version you want via Edit > Preferences... > Project category > Publish Settings node.

    Cheers... Rick

    May 26, 2009

    Hi there,

    Just to add to Rick's excellent suggestion. If you are using Captivate 3 and own Flash then you could export your entire Captivate 3 project into Flash and then add your SWF map into your FLA file.

    Best - Mark


    <a href="http://macrofireball.blogspot.com/"><strong>Visit the macrofireball blog</strong></a>