PDA

View Full Version : lost in translation



hoolagon
July 16th, 2007, 02:19 PM
Hi,

I have build a dynamic xml slideshow for a client and now he's asking me to "Display image title in div element when rolled over". I asked what this mean to which he replied that it is similar to following javascript but triggered from the flash file:
document.getElementById('div element id').innerHTML = 'something';
is this difficult? would it be possible to call a js function and pass a param?

Having never touched JS before other than to copnfigure a SWFObject I have no idea what hes talking about. I'm a bit too embaressed to keep asking him the same question and hope one of you could shed some light. Could someone translate this in to a flash friendly language for me so I can at least understand his request.


Thanks in advance.

J

BetaWar
July 16th, 2007, 08:06 PM
What he is wanting is, well HTML and JS related, but here is what it is basically in AS:


imageName.text = name;
Where imageName is a dynamic text field, and name is the name of the image from the XML

Sadly I have not yet found a way that works to send Commands to, or from Flash to Javascript, or vice versa. Sorry about that...

hoolagon
July 17th, 2007, 08:52 AM
thanks for the reply. I had kind of thought as much and had done something simlilar. When I explained how it worked he replied that he was talking about the div element that would need to exist if you were writing to the DOM.
I still have no idea, but luckily hes happy with it as it is.

Cheers,
J

icio
July 17th, 2007, 09:25 AM
Isn't he simply wanting an image rollover?

All you'd need to do is create a movieclip which is initially invisible and upon rollover of an image, it becomes visible with the caption in it. Sounds like he's just trying to be technical :)