Launch prettyPhoto multiple image gallery from Flash?
  • I am able to launch prettyPhoto from Flash (AS3) but only for single images. When I attempt to load an image array for multiple images I get an error. How can I load up a complete gallery from Flash. I've attempted loading the array directly and iterating through each item.

    THIS WORKS FOR SINGEL IMAGE
    ExternalInterface.call("prettyLaunch","images/test1.jpg","test image")

    THIS DOES NOT WORK
    var images = new Array('images/gallery/test1.jpg', 'images/gallery/test2.jpg', ...);
    ExternalInterface.call("prettyLaunch",images);

    THIS ALSO DOES NOT WORK
    ExternalInterface.call("prettyLaunch",['images/gallery/test1.jpg', 'images/gallery/test2.jpg']);

    Please - can anyone help?
  • This also does not work:
    for(var i:Number = 0;i
  • Hi All,

    Well here's hoping this will help anyone else with this problem. I solved it myself shortly after posting here. In order to have a multiple image gallery called from Flash AS3, simply call one image via flash with this:
    ExternalInterface.call("prettyLaunch","images/test1.jpg","test image")

    In your html page list all your images as //NOTE: no text link. Invisible
    - Repeat for as many images as you have. I'm sure there is a more elegant way to do this, and it is not perfect because prettyPhoto will go back to the second image in your list after whichever image your user clicks on, but it's a start!

    Oh, and don't forget to have your jquery function in your page too.
  • any other solution?
  • @kef0913
    Hey can you explain better prob with examples how you got this sruff working as gallery. i dont seem to get this "In your html page list all your images as //NOTE: no text link. Invisible "
    Or has anyone being able to play gallery from flash

    Thanks.
  • Hi, I found a better solution, kef0913 thanks for the idea.

    Set up the links with the urls for all your pics and make the links "invisible" and add an id for each link.
    ExternallInterface will then call the id of the link and not the actual url

    this will call the desire image, and then when user presses next it will go to the next image and so forth...




  • Hi there,

    The prettyLaunch function is only a proxy to the prettyPhoto API?

    If you're not aware, you can open content in prettyPhoto using the API:
    images = ['images/fullscreen/image1.jpg','images/fullscreen/image2.jpg','images/fullscreen/image3.jpg'];
    titles = ['Title 1','Title 2','Title 3'];
    descriptions = ['Description 1','Description 2','Description 3']
    $.prettyPhoto.open(images,titles,descriptions);

    Read the documentation here: http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/documentation/
  • Thanks All. Pretty photo is indeed pretty good. I have been able to manoeuver it.
    I made other links display as none and pronto it's done.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!