My buttons work fine when i put them on the main timeline, but once inside a scrollpane they
start making troubles. I can’t seem to figure out why. Do i have to write a actionscript so that flash knows where the butons are?
NOTE: the actionscript below excludes the scrollpane, because the movie starts acting up when i put it in. My scrollpane will be called ScrollPane , my movieclip which will hold the buttons is called thumbs_mc and my buttons are called OneV TwoV etc.
stop();
function videoOne(event:MouseEvent): void{
VideoPlayer.source = “/Volumes/In Europa/DO ME BACKUP/do me/Users/nielsderoos/Documents/WEBSITE_FFORWARD_FLASH/Website_Fforward_Flash_Videos/PICABIA_Adam_Neate.flv”;
}
stop();
function videoTwo(event:MouseEvent): void{
VideoPlayer.source = “/Volumes/In Europa/DO ME BACKUP/do me/Users/nielsderoos/Documents/WEBSITE_FFORWARD_FLASH/Website_Fforward_Flash_Videos/PICABIA_JRdanslesRues.flv”;
}
stop();
function videoThree(event:MouseEvent): void{
VideoPlayer.source = “/Volumes/In Europa/DO ME BACKUP/do me/Users/nielsderoos/Documents/WEBSITE_FFORWARD_FLASH/Website_Fforward_Flash_Videos/PCPI_Erwin_Wurm.flv”;
}
stop();
function videoFour(event:MouseEvent): void{
VideoPlayer.source = “/Volumes/In Europa/DO ME BACKUP/do me/Users/nielsderoos/Documents/WEBSITE_FFORWARD_FLASH/Website_Fforward_Flash_Videos/PCPI-StudioDDT.flv”;
}
stop();
function videoFive(event:MouseEvent): void{
VideoPlayer.source = “/Volumes/In Europa/DO ME BACKUP/do me/Users/nielsderoos/Documents/WEBSITE_FFORWARD_FLASH/Website_Fforward_Flash_Videos/PCPI_kustaa.flv”;
}
stop();
function videoSix(event:MouseEvent): void{
VideoPlayer.source = “/Volumes/In Europa/DO ME BACKUP/do me/Users/nielsderoos/Documents/WEBSITE_FFORWARD_FLASH/Website_Fforward_Flash_Videos/PCPI_genevievegauckler.flv”;
}
stop();
function videoSeven(event:MouseEvent): void{
VideoPlayer.source = “/Volumes/In Europa/DO ME BACKUP/do me/Users/nielsderoos/Documents/WEBSITE_FFORWARD_FLASH/Website_Fforward_Flash_Videos/PCPI_sixeart.flv”;
}
stop();
function videoEight(event:MouseEvent): void{
VideoPlayer.source = “/Volumes/In Europa/DO ME BACKUP/do me/Users/nielsderoos/Documents/WEBSITE_FFORWARD_FLASH/Website_Fforward_Flash_Videos/PCPI_Tom14.flv”;
}
stop();
function videoNine(event:MouseEvent): void{
VideoPlayer.source = “/Volumes/In Europa/DO ME BACKUP/do me/Users/nielsderoos/Documents/WEBSITE_FFORWARD_FLASH/Website_Fforward_Flash_Videos/DutchProfiles_MVRDV.flv”;
}
stop();
function videoTen(event:MouseEvent): void{
VideoPlayer.source = “/Volumes/In Europa/DO ME BACKUP/do me/Users/nielsderoos/Documents/WEBSITE_FFORWARD_FLASH/Website_Fforward_Flash_Videos/DutchProfiles_Ted Noten.flv”;
}
stop();
function videoEleven(event:MouseEvent): void{
VideoPlayer.source = “/Volumes/In Europa/DO ME BACKUP/do me/Users/nielsderoos/Documents/WEBSITE_FFORWARD_FLASH/Website_Fforward_Flash_Videos/DutchProfiles_Customr.flv”;
}
OneV.addEventListener (MouseEvent.CLICK,videoOne);
TwoV.addEventListener (MouseEvent.CLICK,videoTwo);
ThreeV.addEventListener (MouseEvent.CLICK,videoThree);
FourV.addEventListener (MouseEvent.CLICK,videoFour);
FiveV.addEventListener (MouseEvent.CLICK,videoFive);
SixV.addEventListener (MouseEvent.CLICK,videoSix);
SevenV.addEventListener (MouseEvent.CLICK,videoSeven);
EightV.addEventListener (MouseEvent.CLICK,videoEight);
NineV.addEventListener (MouseEvent.CLICK,videoNine);
TenV.addEventListener (MouseEvent.CLICK,videoTen);
ElevenV.addEventListener (MouseEvent.CLICK,videoEleven);
import fl.transitions.;
import fl.transitions.easing.;
// INITIALIZE START POSITIONS FOR BOTH OF OUR MOVIECLIPS(THESE CHANGE BELOW)
var bodyStart:Number = body_mc.y;
// INITIALIZE THE STOP VARIABLES FOR LATER USE(THESE CHANGE BELOW)
var bodyStop:Number = 0;
// SET UNCHANGING DURATION SPEEDS FOR THE EASE PROPERTY OF BOTH MOVIECLIPS
var duration:Number = .5;
var duration2:Number = 1.2;
stop();
////////////////////////////////////////////////////////////////////////// BUTTON 1 //////////////////////////////////////////////////////////////////////////////
function OneVDown(event:MouseEvent):void {
// SET [BODYSTART] POSITION ON BUTTON DOWN (WHERE IT IS CURRENTLY)
bodyStart = body_mc.y;
// SET [BODYSTOP] POSITION ON BUTTON DOWN(WHERE YOU WANT IT TO WIND UP)
bodyStop = 182.30;
var OneVbody:Tween = new Tween(body_mc, “y”, Strong.easeInOut, bodyStart, bodyStop, duration2, true);
}
//////////
function OneVOver(event:MouseEvent):void {
// PLAY THE [OVER] LABEL SET INSIDE THE MOVIECLIP NAMED [BTN1]
OneV.gotoAndPlay(“over”);
// SET [MARKERSTART] POSITION ON BUTTON DOWN (WHERE IT IS CURRENTLY)
// SET [MARKERSTOP] POSITION ON BUTTON DOWN(WHERE YOU WANT IT TO WIND UP)
///////////////////////////////////////////////TWEEN(MOVIECLIP, “AXIS”, HOWEASE.EASETYPE, STARTPOSITION, ENDPOSITION, SPEED, BOOLEAN);
}
/////////
function OneVOut(event:MouseEvent):void {
// PLAY THE [OUT] LABEL SET INSIDE THE MOVIECLIP NAMED [BTN1]
OneV.gotoAndPlay(“out”);
}
///////// SET LISTENERS FOR BUTTONS
OneV.addEventListener(MouseEvent.ROLL_OVER, OneVOver);
OneV.addEventListener(MouseEvent.ROLL_OUT, OneVOut);
OneV.addEventListener(MouseEvent.CLICK, OneVDown);
//////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// BUTTON 2 //////////////////////////////////////////////////////////////////////////////
function TwoVDown(event:MouseEvent):void {
bodyStart = body_mc.y;
bodyStop = -168.4;
var TwoVbody:Tween = new Tween(body_mc, “y”, Strong.easeInOut, bodyStart, bodyStop, duration2, true);
}
//////////
function TwoVOver(event:MouseEvent):void {
TwoV.gotoAndPlay(“over”);
}
/////////
function TwoVOut(event:MouseEvent):void {
TwoV.gotoAndPlay(“out”);
}
/////////
TwoV.addEventListener(MouseEvent.ROLL_OVER, TwoVOver);
TwoV.addEventListener(MouseEvent.ROLL_OUT, TwoVOut);
TwoV.addEventListener(MouseEvent.CLICK, TwoVDown);
//////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// BUTTON 3 //////////////////////////////////////////////////////////////////////////////
function ThreeVDown(event:MouseEvent):void {
bodyStart = body_mc.y;
bodyStop = -852.6;
var ThreeVbody:Tween = new Tween(body_mc, “y”, Strong.easeInOut, bodyStart, bodyStop, duration2, true);
}
//////////
function ThreeVOver(event:MouseEvent):void {
ThreeV.gotoAndPlay(“over”);
}
/////////
function ThreeVOut(event:MouseEvent):void {
ThreeV.gotoAndPlay(“out”);
}
/////////
ThreeV.addEventListener(MouseEvent.ROLL_OVER, ThreeVOver);
ThreeV.addEventListener(MouseEvent.ROLL_OUT, ThreeVOut);
ThreeV.addEventListener(MouseEvent.CLICK, ThreeVDown);
//////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// BUTTON 4 //////////////////////////////////////////////////////////////////////////////
function FourVDown(event:MouseEvent):void {
bodyStart = body_mc.y;
bodyStop = -1188.6;
var FourVbody:Tween = new Tween(body_mc, “y”, Strong.easeInOut, bodyStart, bodyStop, duration2, true);
}
//////////
function FourVOver(event:MouseEvent):void {
FourV.gotoAndPlay(“over”);
}
/////////
function FourVOut(event:MouseEvent):void {
FourV.gotoAndPlay(“out”);
}
/////////
FourV.addEventListener(MouseEvent.ROLL_OVER, FourVOver);
FourV.addEventListener(MouseEvent.ROLL_OUT, FourVOut);
FourV.addEventListener(MouseEvent.CLICK, FourVDown);
//////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// BUTTON 5 //////////////////////////////////////////////////////////////////////////////
function FiveVDown(event:MouseEvent):void {
bodyStart = body_mc.y;
bodyStop = -1533.5;
var FiveVbody:Tween = new Tween(body_mc, “y”, Strong.easeInOut, bodyStart, bodyStop, duration2, true);
}
//////////
function FiveVOver(event:MouseEvent):void {
FiveV.gotoAndPlay(“over”);
}
/////////
function FiveVOut(event:MouseEvent):void {
FiveV.gotoAndPlay(“out”);
}
/////////
FiveV.addEventListener(MouseEvent.ROLL_OVER, FiveVOver);
FiveV.addEventListener(MouseEvent.ROLL_OUT, FiveVOut);
FiveV.addEventListener(MouseEvent.CLICK, FiveVDown);
//////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// BUTTON 6 //////////////////////////////////////////////////////////////////////////////
function SixVDown(event:MouseEvent):void {
bodyStart = body_mc.y;
bodyStop = -1884.2;
var SixVbody:Tween = new Tween(body_mc, “y”, Strong.easeInOut, bodyStart, bodyStop, duration2, true);
}
//////////
function SixVOver(event:MouseEvent):void {
SixV.gotoAndPlay(“over”);
}
/////////
function SixVOut(event:MouseEvent):void {
SixV.gotoAndPlay(“out”);
}
/////////
SixV.addEventListener(MouseEvent.ROLL_OVER, SixVOver);
SixV.addEventListener(MouseEvent.ROLL_OUT, SixVOut);
SixV.addEventListener(MouseEvent.CLICK, SixVDown);
//////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// BUTTON 7 //////////////////////////////////////////////////////////////////////////////
function SevenVDown(event:MouseEvent):void {
bodyStart = body_mc.y;
bodyStop = -2228.1;
var SevenVbody:Tween = new Tween(body_mc, “y”, Strong.easeInOut, bodyStart, bodyStop, duration2, true);
}
//////////
function SevenVOver(event:MouseEvent):void {
SevenV.gotoAndPlay(“over”);
}
/////////
function SevenVOut(event:MouseEvent):void {
SevenV.gotoAndPlay(“out”);
}
/////////
SevenV.addEventListener(MouseEvent.ROLL_OVER, SevenVOver);
SevenV.addEventListener(MouseEvent.ROLL_OUT, SevenVOut);
SevenV.addEventListener(MouseEvent.CLICK, SevenVDown);
//////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// BUTTON 8 //////////////////////////////////////////////////////////////////////////////
function EightVDown(event:MouseEvent):void {
bodyStart = body_mc.y;
bodyStop = -2228.1;
var EightVbody:Tween = new Tween(body_mc, “y”, Strong.easeInOut, bodyStart, bodyStop, duration2, true);
}
//////////
function EightVOver(event:MouseEvent):void {
EightV.gotoAndPlay(“over”);
}
/////////
function EightVOut(event:MouseEvent):void {
EightV.gotoAndPlay(“out”);
}
/////////
EightV.addEventListener(MouseEvent.ROLL_OVER, EightVOver);
EightV.addEventListener(MouseEvent.ROLL_OUT, EightVOut);
EightV.addEventListener(MouseEvent.CLICK, EightVDown);
//////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// BUTTON 9 //////////////////////////////////////////////////////////////////////////////
function NineVDown(event:MouseEvent):void {
bodyStart = body_mc.y;
bodyStop = 523.5;
var NineVbody:Tween = new Tween(body_mc, “y”, Strong.easeInOut, bodyStart, bodyStop, duration2, true);
}
//////////
function NineVOver(event:MouseEvent):void {
NineV.gotoAndPlay(“over”);
}
/////////
function NineVOut(event:MouseEvent):void {
NineV.gotoAndPlay(“out”);
}
/////////
NineV.addEventListener(MouseEvent.ROLL_OVER, NineVOver);
NineV.addEventListener(MouseEvent.ROLL_OUT, NineVOut);
NineV.addEventListener(MouseEvent.CLICK, NineVDown);
//////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// BUTTON 10 //////////////////////////////////////////////////////////////////////////////
function TenVDown(event:MouseEvent):void {
bodyStart = body_mc.y;
bodyStop = 865.3;
var TenVbody:Tween = new Tween(body_mc, “y”, Strong.easeInOut, bodyStart, bodyStop, duration2, true);
}
//////////
function TenVOver(event:MouseEvent):void {
TenV.gotoAndPlay(“over”);
}
/////////
function TenVOut(event:MouseEvent):void {
TenV.gotoAndPlay(“out”);
}
/////////
TenV.addEventListener(MouseEvent.ROLL_OVER, TenVOver);
TenV.addEventListener(MouseEvent.ROLL_OUT, TenVOut);
TenV.addEventListener(MouseEvent.CLICK, TenVDown);
//////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// BUTTON 11 //////////////////////////////////////////////////////////////////////////////
function ElevenVDown(event:MouseEvent):void {
bodyStart = body_mc.y;
bodyStop = 1201.8;
var ElevenVbody:Tween = new Tween(body_mc, “y”, Strong.easeInOut, bodyStart, bodyStop, duration2, true);
}
//////////
function ElevenVOver(event:MouseEvent):void {
ElevenV.gotoAndPlay(“over”);
}
/////////
function ElevenVOut(event:MouseEvent):void {
ElevenV.gotoAndPlay(“out”);
}
/////////
ElevenV.addEventListener(MouseEvent.ROLL_OVER, ElevenVOver);
ElevenV.addEventListener(MouseEvent.ROLL_OUT, ElevenVOut);
ElevenV.addEventListener(MouseEvent.CLICK, ElevenVDown);
//////////////////////////////////////////////////////////////////////////////////////////////////
Hope this can be resolved easily,
fforward