Hello all,
I have a ScrollPane instance on the stage, which is made up of six images stacked vertically, and combined into a movieClip called thumbs1_mc. This movieClip is exported to Actionscript in the library, (class name is thumbs1_mc). What I want to have happen is when the user clicks on the contents of the scrollPane, the full screen image (from a separate folder called /images) should appear in the UILoader. Here's the code so far:
import fl.events.ScrollEvent;
import fl.containers.ScrollPane;
import fl.containers.UILoader;
var aSp:ScrollPane;
aSp.setSize(120, 400);
aSp.source=“thumbs1_mc”;
var aLoader:UILoader = new UILoader();
aLoader.source="/images/pix1.jpg";
aLoader.x=150;
aLoader.y=5;
aLoader.scaleContent=false;
addChild(aLoader);
thumbs_mc.pix1.addEventListener(MouseEvent.CLICK, ldr1);
thumbs_mc.pix2.addEventListener(MouseEvent.CLICK, ldr2);
thumbs_mc.pix3.addEventListener(MouseEvent.CLICK, ldr3);
thumbs_mc.pix4.addEventListener(MouseEvent.CLICK, ldr4);
thumbs_mc.pix5.addEventListener(MouseEvent.CLICK, ldr5);
thumbs_mc.pix6.addEventListener(MouseEvent.CLICK, ldr6);
function ldr1(e:MouseEvent):void
{
aLoader.source="/images/pix1.jpg";
}
function ldr2(e:MouseEvent):void
{
aLoader.source="/images/pix2.jpg";
}
function ldr3(e:MouseEvent):void
{
aLoader.source="/images/pix3.jpg";
}
function ldr4(e:MouseEvent):void
{
aLoader.source="/images/pix4.jpg";
}
function ldr5(e:MouseEvent):void
{
aLoader.source="/images/pix5.jpg";
}
function ldr6(e:MouseEvent):void
{
aLoader.source="/images/pix6.jpg";
}
What I think this boils down to, is how can I make the individual pictures clickable once they’re in the scrollPane? I’ve tried doing this w/out the scrollPane and it works fine, but I need the scrollability as I intend to add many more images!
Thanks so much-any help is appreciated!!
Rosey