Results 1 to 6 of 6

Thread: switchcontent using flash button

  1. #1
    Join Date
    Jun 2007
    Posts
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default switchcontent using flash button

    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; cursorointer">find out more</font> </p>).

    In flash I've inserted this button action:
    on(press) {
    getURL("javascript:expandcontent(this,'sc1')");
    }

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

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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 for the proper posting format when asking a question.

  3. #3
    Join Date
    Jun 2007
    Posts
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Script: Switch Content Script
    http://www.dynamicdrive.com/dynamici...tchcontent.htm

    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

  4. #4
    Join Date
    Jun 2007
    Location
    England
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.
    e.g:
    Code:
    <span onclick="expandcontent(this, 'sc1')">
    
    //Flash objecty stuff in here
    
    </span>
    Then you could take that action button action from the Flash element, because the <span> would be doing that bit.

  5. #5
    Join Date
    Jun 2007
    Posts
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I've trying it without success... with a flash object it doesn't work

  6. #6
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Eh, this is more of a flash question than a javascript one. You should've posted it in the flash section rather than here...
    Sorry.
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

Bookmarks

Posting Permissions

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