View Full Version : switchcontent using flash button

06-15-2007, 05:33 PM
I'm using the switchcontent script (2005 version). Now I'm trying to activate it from a flash button instead of html code (usually typing: <span onClick="expandcontent(this, 'sc1')" style="cursor:hand; cursor:pointer">find out more</font> </p>).

In flash I've inserted this button action:
on(press) {

But, it doesn't work, nothing happens. What I'm doing wrong? I'm completely stuck!

06-16-2007, 02:40 AM
Hmm I'm not familiar with Flash at all, so I can't tell you exactly to embed a JavaScript function inside a Flash object. But assuming it's possible, there's nothing special about calling this particular JavaScript function.

Warning: Please include a link to the DD script in question in your post and in the correct forum. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

06-17-2007, 04:26 PM
Script: Switch Content Script

The code I use doesn't exist at dynamicdrive.com anymore, but there's an available link right here http://t100e.com/es/switchcontent.js

06-18-2007, 12:02 PM
I think (I'm not really sure about Flash, either) if you put the Flash element inside a layer, and used the onclick attribute of the layer, that might work.

<span onclick="expandcontent(this, 'sc1')">

//Flash objecty stuff in here


Then you could take that action button action from the Flash element, because the <span> would be doing that bit.

06-18-2007, 01:43 PM
I've trying it without success... with a flash object it doesn't work

06-18-2007, 03:10 PM
Eh, this is more of a flash question than a javascript one. You should've posted it in the flash section rather than here...