I'm creating a XML photogallery, and have created movieClips with the loaded jpg from the XML using createEmptyMovieClip. The problem is that onRollover doesn't work. Does the hit area not include the loaded jpg? Here's what I have slides_xml = new XML(); slides_xml.onLoad = startSlideShow; slides_xml.load("photoGallery.xml"); slides_xml.ignoreWhite = true; function startSlideShow(success) { if (success == true) { rootNode = slides_xml.firstChild; totalSlides = rootNode.childNodes.length; firstSlideNode = rootNode.firstChild; var i = 0; var xPos = 35; var yPos = 35; thisDepth = 100; var currentSlide = rootNode.firstChild; while (( i < totalSlides) && ( i < 10)) { var buttonName = "btn" + i; _root.createEmptyMovieClip(buttonName, thisDepth); _root[buttonName]._x = xPos; _root[buttonName]._y = yPos; _root[buttonName]._xscale = _root[buttonName]._yscale = 20; _root[buttonName].jpeg = currentSlide.attributes.jpegURL; _root[buttonName].picTitle = currentSlide.attributes.picTitle; _root[buttonName].loadMovie(_root[buttonName].jpeg); _root[buttonName].hitArea = mcHit; _root[buttonName].onRollOver = function () { _root.txtDescription.text = _root[buttonName].picTitle; } currentSlide = currentSlide.nextSibling; yPos = yPos + 75; thisDepth = thisDepth + 1 i++; if (yPos > 400) { yPos = 40; xPos = xPos + 90; } } } }
I know this is really dumb, but have you tried creating a movieclip inside of the mc that loads your JPG files and having a transparent shape in there? You could probably dynamically resize that movieclip with each of your pictures.
Don't see what you're looking for? Try a search.
|