A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F8] Simple mc/XML question?

  1. #1
    Member
    Join Date
    Jun 2007
    Location
    Canada
    Posts
    95

    [F8] Simple mc/XML question?

    I am currently making a site that references in information from XML. I created a movie clip (image_holder1_mc) that I populate with images referenced from an XML file (which is working well).

    My question is: Is the movie clip ALWAYS called "image_holder1_mc" even after there is an image in it (I load the images in the following way - - -> image_holder1_mc.loadMovie(filename1[currentIndex])" or does the movie clip change to the name of the file that it has been populated with?

    For example, the movie clip is called "image_holder1_mc" but after there is an image populating it, is it called "bubba.jpg" etc. and not "image_holder1_mc" any more?

    The reason why I am asking is that I want to do a simple "on (rollOver)" and "on (rollOut)" to display the captions of the pictures using an invisible button but I don't know whether I call "image_holder1_mc" or the new file name (bubba.jpg). I have tried the "on (rollOver)" and "on (rollOut)" with a static image and it works but when the images are dynamic, it doesn't seem to work anymore.

    I have tried the following and it isn't working:

    On the invisible button, I have the following action script

    on (rollOver) {
    _root.mouse_over_image_holder1_mc = true;
    }
    on (rollOut) {
    _root.mouse_over_image_holder1_mc = false;
    }
    In the first frame of the file, I have the following action script:

    _root.image_holder1_mc.onEnterFrame = function() {
    if (mouse_over_image_holder1_mc) {
    _root.image_holder1_mc.nextFrame();
    } else {
    _root.image_holder1_mc.prevFrame();
    }
    };

    Thanks.....
    B.
    Last edited by numbnutz_ca; 11-22-2007 at 07:24 PM.

  2. #2
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    "Is the movie clip ALWAYS called "image_holder1_mc" even after there is an image in it "

    yup it is, even after loading stuff into it.

    As to your code, im a bit confused with the nextFrame part of your holder mc, do you have code in each frame of that mc or something?
    Evolve Designs Interactive Media
    the natural selection

  3. #3
    Member
    Join Date
    Jun 2007
    Location
    Canada
    Posts
    95
    Yes I have two frames in the image_holder1_mc. The first one is just the imageholder and the second frame holds the caption of the picture and a 50% transparent rectangle the size of the picture. When the user mouses over the image, they will see the caption and the transparent rectangle (in attempt to shade the image and make the caption stand out more). When the mouse leaves image_holder1_mc, both the semi-transparent rectangle and the caption disappears. Well, that's what it's supposed to do.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center