# HELP: buttons -\> scrollpane issues

**URL:** <https://forum.kirupa.com/t/help-buttons-scrollpane-issues/297321>\
**Category:** flash\
**Created:** [September 30, 2009, 8:08am UTC](https://forum.kirupa.com/t/help-buttons-scrollpane-issues/297321 "2009-09-30T08:08:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fforward](https://avatars.discourse-cdn.com/v4/letter/f/df788c/32.png) [@fforward](https://forum.kirupa.com/u/fforward)\
**Post date:** [September 30, 2009, 8:08am UTC](https://forum.kirupa.com/t/help-buttons-scrollpane-issues/297321/1 "2009-09-30T08:08:57Z")

</div>

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
