Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 07-07-2010, 08:35 PM   #1
Registered User
Join Date: Jul 2010
Posts: 1
Question [AS3] ScrollPane image gallery

Alright, so I have a ScrollPane on my stage that I got from the components window in flash. I have a movie in my library that is linked to the ScrollPane. In the movie I have thumbnails that I converted to buttons. What i want to happen is when you click on a button a larger version of the image you clicked with load right above the ScrollPane. When I test it and click the buttons nothing happens. Here is how I have my .fla set up:

Scene 1:

the empty scrollpane component with an instance name of "paintings_scrollpane".

its class in the linkage properties is "fl.containers.ScrollPane"

the scrollpane is the only thing on the stage. there is no actionscript.

then i have a movie clip with the name "paintings", that is in my library.

its class in the linkage properties is "MyPaintings"

inside the "paintings" movie clip are thumbnails that i have converted to buttons and given instance names that are listed in the code.

on a different layer in the "paintings" movie clip i have the actionscript that is posted below:

var Xpos:Number = 275;
var Ypos:Number = 180;
var jpg:MovieClip;
var loader:Loader = new Loader();

var defaultIMAGE:URLRequest = new URLRequest("swfs/mixed_media/one.jpg");

loader.x =Xpos;
loader.y =Ypos;


//Btns Universal function

function btnClick(event:MouseEvent):void{
var newJPGRequest:URLRequest = new URLRequest("swfs/mixed_media/"+event.target.name+".jpg");

//Btn Listeners
one.addEventListener(MouseEvent.CLICK, btnClick);
two.addEventListener(MouseEvent.CLICK, btnClick);
three.addEventListener(MouseEvent.CLICK, btnClick);
four.addEventListener(MouseEvent.CLICK, btnClick);
five.addEventListener(MouseEvent.CLICK, btnClick);
six.addEventListener(MouseEvent.CLICK, btnClick);
letospirit is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:31 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.