SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast DougErkkila's Avatar
    Join Date
    Oct 2002
    Location
    Buckeye, AZ
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hidden Information

    I'm currently working on an artistic project and have run into a slight set back. I need to load a collection of images in a grid and allow a user to choose a few of the images and then move on to something else based on the images. I'm trying to figure out how I can hide a variable or bit of information in the image object so that the flash script can determine the appropriate path.

    Any ideas? or is more information needed?

    Thanks,
    Doug

  2. #2
    SitePoint Zealot webQS's Avatar
    Join Date
    Oct 2002
    Location
    Sydney : Australia
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try putting each image in it's own movie clip container, then storing variables related to that image on the clip instance.

    eg
    //load some images in
    clip0.loadMovie("image0.jpg");

    clipN.loadMovie("imageN.jpg");

    //set an property of the clip
    clipN._alpha = 50;
    //set an author defined variable
    clipN.imageTitle = "this is an image of a car";
    //mouse event to zoom in on an image etc
    clipN.onRelease = function() {
    this.activeImage = N;
    this.gotoAndPlay("zoom");
    }

    HTH
    James

  3. #3
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yeah, it's all about movieclips in MX. They were made to be VERY powerful.

    You can reference them via their name and then variable/method/property.

    ie.

    movieClip._width = the width of the movie (property)
    movieClip.myHP = the Hit Points of this character movie clip (variable)
    movieClip.flip(vertically) = a method of the movie clip that passes an argument as well.

    These 3 abilities of Movie Clips add a LOT of power.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •