Open Source Development Tutorials | Newsletter Signup | About Us
Search  

Go Back   Open Source Tutorials Forum > Web Development > Macromedia Flash Development
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-16-2007, 11:57 AM
numbnutz_ca numbnutz_ca is offline
Junior Member
 
Join Date: Jul 2007
Posts: 1 numbnutz_ca is on a distinguished road
Default [Flash8] Image MouseOver in XML Gallery

Hi,

I am currently working on an XML Gallery for my girlfriend's brother who is a photographer. I have created a flash front end template and am using an XML database to load the images and accompanying captions (it's working so far except the following).

The effect that I want to achieve is when the user mouses over the image, the image shades (I am just going to use a simple rectangle the size of the photo and put it at a 30% alpha transparency) and the caption appears over the image.

The code that I am using (that's not working on any dynamic images loaded from the XML file) is as follows:

In the main actionScript in frame 1 of the timeline I have:
_root.image_holder1_mc.onEnterFrame = function() {
if (mouse_over_image_holder1_mc) {
_root.image_holder1_mc.nextFrame();
} else {
_root.image_holder1_mc.prevFrame();
}
};
On the invisible button over the image I have:
on (rollOver) {
_root.mouse_over_image_holder1_mc = true;
}
on (rollOut) {
_root.mouse_over_image_holder1_mc = false;
}
In image_holder1_mc (where the image is loaded into), the first frame does not have the shaded rectangle nor the caption but frame 2 has both. When the user mouses over the invisible button in the root timeline, frame 2 of the image_holder1_mc movie clip SHOULD be played but it does not. I have been able to make it work with just a static image not loaded from XML but as soon as I use the dynamically loaded image, the feature does not work (it also does not grab the captions that's associated with the image).

Is this a case of image_holder1_mc being changed due to the file name of the image that gets loaded or is image_holder1_mc always going to be image_holder1_mc regardless of the image name?

I have included the source files in case someone would like to help. This seemed like it would be a simple thing to do but it isn't turning out that way.

Thank you in advance for your time and patience.
Brent a.k.a. numbnutz
Attached Files
File Type: zip XMLGallery.zip (9.2 KB, 80 views)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -5. The time now is 02:42 PM.


Powered by: vBulletin Version 3.0.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright 2004 - 2006 GrindingGears.com. All Rights Reserved.