Can you start a full screen slideshow via javascript?

jfriendjfriend Registered Users Posts: 8,097 Major grins
I have a customizer who wants to make their own Slideshow button and trigger the full screen slideshow from their button with javascript instead of using the existing button. Does anyone know if this is possible?

I see that SM.buttons.slideshowButton is the slideshow button, but I don't know how to trigger the slideshow via javascript. Anyone know how?
--John
HomepagePopular
JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
Always include a link to your site when posting a question

Comments

  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited November 6, 2008
    jfriend wrote:
    I have a customizer who wants to make their own Slideshow button and trigger the full screen slideshow from their button with javascript instead of using the existing button. Does anyone know if this is possible?

    I see that SM.buttons.slideshowButton is the slideshow button, but I don't know how to trigger the slideshow via javascript. Anyone know how?

    Bump. Anyone please?

    I could really use an answer to this question. It would solve a customization issue that a customer is having.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • {JT}{JT} Registered Users Posts: 1,016 Major grins
    edited November 6, 2008
    jfriend wrote:
    Bump. Anyone please?

    I could really use an answer to this question. It would solve a customization issue that a customer is having.

    Sadly, you can't launch the flash slideshow via javascript because of security concerns that Adobe has. The only way to do so is to have direct interaction by having someone click a mouse on the flash file itself - so we have an invisible flash file on top of the button that waits for you to click before going full screen.

    You can however launch a popup window that has the full page flash slideshow:
    window.open('/photos/swfpopup.mg?swfPop=true&noClickURL=true&url='+encodeURI(location.href),'ssWindow', 'scrollbars=0,status=0,resizable=1,width='+screen.width+',height='+screen.height+',top=0,left=0,fullscreen=1');
    
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited November 6, 2008
    {JT} wrote:
    Sadly, you can't launch the flash slideshow via javascript because of security concerns that Adobe has. The only way to do so is to have direct interaction by having someone click a mouse on the flash file itself - so we have an invisible flash file on top of the button that waits for you to click before going full screen.

    You can however launch a popup window that leads to the a full page flash slideshow:
    window.open('/photos/swfpopup.mg?swfPop=true&noClickURL=true&url='+encodeURI(location.href),'ssWindow', 'scrollbars=0,status=0,resizable=1,width='+screen.width+',height='+screen.height+',top=0,left=0,fullscreen=1');
    

    Thanks for the answer JT. This customer wants a completely different control for launching the slideshow in a different place on the screen.

    Customizing the current slideshow button doesn't seem to be able to get to what they want. I suppose it might be possible to embed another copy of your same invisible flash thing on top of their control and try to solve the problem that way. This might be more trouble than it's worth though. It certainly would have been easier to just launch the existing one with JS.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • {JT}{JT} Registered Users Posts: 1,016 Major grins
    edited November 6, 2008
    jfriend wrote:
    Thanks for the answer JT. This customer wants a completely different control for launching the slideshow in a different place on the screen.

    Customizing the current slideshow button doesn't seem to be able to get to what they want. I suppose it might be possible to embed another copy of your same invisible flash thing on top of their control and try to solve the problem that way. This might be more trouble than it's worth though. It certainly would have been easier to just launch the existing one with JS.

    Yeah, it would have been easier. But Adobe takes security seriously, so that is out. The code for creating the current blank flash button is on the page, pretty easy to change the div that it is put in.
Sign In or Register to comment.