Flash Rollover buttons in Presenter

I've created rollever buttons in Flash CS5 and added the scripting like it was told in the screenr tutorial by David Anderson http://www articulate com/forums/articulate-presenter/18094-flash-rollover-buttons-hyperlinking-slides html

But for some  I am not able to have the buttons work in advancing to the particular slides The rollover action works but when clicking on the buttons it just stays on that slide

Not sure if I've just been staring at my scripting but it looks correct and it was done in AS 2 0:

mcButton1 onPress = function() {
 
  _level0ArtAPI PlaySlideNum(4);
};
mcButton2 onPress = function() {
 
  _level0ArtAPI PlaySlideNum(5);
};

I don't know if it matters but I'm using PPT 03 with Presenter '09 version 6

Does anyone know why this is not working for me? Thanks

19 Replies
Jenny Wang

Hi David

I am working on the similar rollover effect

1) When the button is rolled over, the audio is played

2) When the button is clicked, it branches to a PPT slide

However, I kept receiving the error message and could not get it work I wonder if you could help to take a look at the file (attached)? Much thanks!!!

David Anderson

Hi JW,

The first thing I noticed in your file is that you're publishing to ActionScript 3 this will affect how the file performs in Presenter '09 You'll want to ensure whatever code you're using works in ActionScript 2

I'm wondering if you couldn't simply add the buttons sounds to the Over state of the button? You wouldn't need any code for that and it would publish easily to AS2

Jenny Wang

Okay, I think I'm almost there, except the Flash plays well standalone, but did not play the sound when embedded into Presenter Below are my code for one button put in frame 1 in the main stage I have six buttons on the same stage using the same code Can you help to see what went wrong? Thanks!!

mcButton1 onPress = function() {
 _level0 ArtAPI PlaySlideNum(8);
};

var mySound:Sound = new Sound();
mcButton1 onRollOver = function() {
 _root mySound attachSound("dropout");
 _root mySound start();
}
mcButton1 onRollOut = function() {
 _root mySound stop();
}

David Anderson

J W said:

Hi David

I tried putting the narration to the Over state button It worked, except when I put 6 buttons on the stage, the narration overlaps each other I guess I will have to use ActionScript in this case


Hi JW,

Sorry, I should have mentioned first putting the audio clip into a Movie Clip and setting the event to Stream Here's a sample of what it could look like

David Anderson

J W said:

Okay, I think I'm almost there, except the Flash plays well standalone, but did not play the sound when embedded into Presenter Below are my code for one button put in frame 1 in the main stage I have six buttons on the same stage using the same code Can you help to see what went wrong? Thanks!!

mcButton1 onPress = function() {
 _level0 ArtAPI PlaySlideNum(8);
};

var mySound:Sound = new Sound();
mcButton1 onRollOver = function() {
 _root mySound attachSound("dropout");
 _root mySound start();
}
mcButton1 onRollOut = function() {
 _root mySound stop();
}


Okay, that seems to work well

Just make sure your  buttons are Movie Clip symbols and then apply the correct instance names to each Using your code, here's what it looks like:

Jenny Wang

 I finally got it worked The reason is that the ActionScript 2 "_root" and "attachSound" are not recommeded to use in Flash, when embedded in Articulate Here are the code that worked finally on each button The mp3 file was put in the published project folder

mySound1 = new Sound();
mySound1 loadSound("Sound1 mp3", false);
mcButton1 onRollOver = function() {
mySound1 start();
}

mcButton1 onRollOut = function() {
mySound1 stop();
}

Stijn van Hofwegen

Maybe just a year late, but I found myself facing the same problem today

The solution, when using "attachSound", is putting the "this" statement between the brackets As following:

Wrong:

var mySound = new Sound();

mySound attachSound("audiofile");

Right:

var mySound = new Sound(this);

mySound attachSound("audiofile");

Just incase somebody runs into same problem, maybe this will help

Stijn van Hofwegen

Rob Verzera said:

THANK YOU THANK YOU THANK YOU!!!!!

Of course I did about 42 slides using this method - brought them into articulate and nothing ;(

Adding the "this" when instantiating the object fixed it

Giant Kudos!


This forum helped me out so many times It's nice to hear that my problem could be of help for a change