• Home
  • Archives
  • Tag Cloud
  • Contact
Blue Orange Green Pink Purple

Basic Image Gallery

Tweet
Viewed 635 times in Podcasts, Gadgets & Tech since Wednesday, February 21st, 2007 Tags: actionscript, gallery, image, swishmax
Feb 21

I’ve whipped up a (VERY) basic gallery for you to play with.
It’s much easier and quicker to do stuff with action script than it is to do with manual effects.
Look at the attached gallery.swi
If you can’t open it because you have an older version of swishmax, use the code below

Add all your large images to the scene and give each one a unique name in the SHAPE tab and tick the target box.
This just allows you to control this image later with action script
I added five images, each named image#, where # is a unique number.

On Scene_1′s SCRIPT tab enter the following

onLoad () {
// Sets the five named and targeted images to invisible
image1._visible = false;
image2._visible = false;
image3._visible = false;
image4._visible = false;
image5._visible = false;
}

function resetImages() {
// Resets the five named images to invisible before making one visible onRelease
image1._visible = false;
image2._visible = false;
image3._visible = false;
image4._visible = false;
image5._visible = false;
}

Create and place the corresponding thumbnails and for each one add this to it’s script

on (release) {
// Call the function to reset all images to invisible
resetImages();
// Make selected image visible
// Correspond this next line to the image you want to show for this thumbnail
image1._visible = true;
}

Good luck

[kml_flashembed movie="http://www.adrianhodge.com/flash/swishmax_gallery.swf" height="195" width="325" /]

 

Leave a Reply

Adrian Hodge

  • About

    Welcome to the personal website of Adrian Hodge. I'm a web designer/developer living in Rotorua, New Zealand. Married with two lovely kids, I have a love of motorcycles and gadgets. I work for Destination Rotorua Tourism Marketing during the day and run Hodgeman Web & Design after hours.

    Facebook Twitter Google+ YouTube RSS

  • Search


  • NZ accommodation
  • Latest Tweets
    • A great way to end my two week holiday. A MotoTT trackday! (@ Taupo Motorsport Park) [pic]: http://t.co/wEINFoj0 23 hrs ago
    • I've uploaded an @YouTube video http://t.co/pjZ8ur40 MotoTT Taupo Jan 21, 2012 - Track 1 - GoPro Tank Cam 1 day ago
    • Fun with the kids (@ Paekakariki Holiday Park) [pic]: http://t.co/sHfzWRQK 5 days ago
    • More updates...
  • Recent Posts
    • Tweets for the week (2012-02-06)
    • Tweets for the week (2012-01-30)
    • Fabulous Friday Funnies
    • Tweets for the week (2012-01-23)
    • Tweets for the week (2012-01-16)
  • Categories
    • Friday Funnies (266)
    • General Rantings (80)
    • Humour (68)
    • Joshi Jargon (38)
    • Kaylee Rae (4)
    • Music, Movies & Entertainment (18)
    • Podcasts, Gadgets & Tech (7)
    • Rotorua Activities (7)
    • Tweets (99)
    • UTube Picks (22)
    • Web Design (4)
  • Archives
  • Related posts
    • Fuel Prices hit New Zealander’s hard
    • Why doesn’t everyone use English? Photo
    • Clothing Tag Photo
    • Our New Mitsubishi Legnum Photos




  • Home
  • Archives
  • Tag Cloud
  • Contact

© Copyright Adrian Hodge. All rights reserved.

Back to Top