| Subject: | Re: Can someone help me with this code? |
|---|---|
| From: | "Kol-001" <webforumsuser@xxxxxxxxxxxxxx> |
| Date: | Fri, 29 Aug 2008 13:33:09 +0000 (UTC) |
| Newsgroups: | macromedia.flash.actionscript |
Hi Hugh,
You are right in that you can link to other galleries using the ID number
(but, I assume, only TN2Admin (fCMSPro gallery document) defined galleries)
with the code supplied.
I think this may help - I'm a newbie with actionscript and I know nothing
about Flashloaded so I may be way off beam here, but....
First define a variable, this will be used in the 'show' (that's show, not
load) gallery element of your code:
var galNum: Number;
Make as many buttons as required to launch a gallery (you say "each button
opening one of several galleries" so I assume you want 1 gallery per button)
and give each an instance name.
You then write the relevant code for each button function (assuming once more
that the buttons are in the same frame) using the instance name (I use a
separate layer in the frame to write actionscript and try not to attach code
directly to objects - which then leads me to say yes you can put all the
different buttons code in one frame)....
myLoadGalBtn1.onRelease = function () {
myThumbnailer2.loadGallery(24);
galNum = 24;
}
myLoadGalBtn2.onRelease = function () {
myThumbnailer2.loadGallery(25);
galNum = 25;
}
notice the buttons have different instance names (the 1 & 2 at the end - but
you can call them what you like).
Then you can use other code supplied to actually show the gallery (using the
variable generated in each button click). Some code from Flashloaded will be
along the lines of:
myThumbnailer2.showGallery(25);
so my guess is you can replace the actual number with the variable galNum
inside the brackets to use the number generated by whatever button was pressed,
like:
myThumbnailer2.showGallery(galNum);
Cheers
Kol
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Server Authentiacation in action script, adinana |
|---|---|
| Next by Date: | third person shooter, robin1232 |
| Previous by Thread: | Re: Can someone help me with this code?, Hugh Anderson |
| Next by Thread: | Screen Click, Kol-001 |
| Indexes: | [Date] [Thread] [Top] [All Lists] |