• Resolved tonnaer

    (@tonnaer)


    As always, I’ve been looking for the answer in the codex, in the forum, and googling for it, but I couldn’t find anything.

    I’m working on my flash slide show widget, and what I want to do is have the flash object call a php script, that’ll return a list of images to load to the flash object.

    Now I could simply call a stand-alone php script, passing it the url of the folder where the images are to be found. But I would prefer to call the WP framework, because that way I’ll be able to use the WP functionality in my script, and it would also prevent (or diminish) the risk of external calls to this php script.

    So my question is: is there a way to let a flash object call the WP framework to have a script executed and the result returned to it? I’m not asking how flash can call a script, I know how to do that, but if there is a way to execute the script through WP.

    In Joomla this is possible creating a module containing the script to be executed, and calling it through the Joomla framework like this: ‘index.php?option=com_componentname&format=raw’.
    How is it done in WordPress?

Viewing 3 replies - 1 through 3 (of 3 total)
  • We ran into the same issue.

    In our first approach we had a list of galleries that, when clicked, went to a slide show page, passing the id for the gallery. In the slide show page we took that id, created the xml for our slide show and then saved it in the php session. Then when flash loaded, it called a php file that echoed the session xml. I was told this approach did not work b/c when flash called the php file, the session id was different… or something like that. We were on a time crunch and I have not looked into it any more.

    We ended up passing the xml string directly into flash via flashvars. Make sure to not have any spaces between nodes and use htmlspecialchars. Our flash slide show can handle as much as 100 images… which is more than most people need.

    Thread Starter tonnaer

    (@tonnaer)

    Thanks for your answer. After a long and difficult search, I already found some info and am working on it 🙂
    As you may have noticed, it is really hard to find the info you need when you go beyond the very basic level of WP plugin development. Unless, maybe, you know exactly what you want and where to find it. So thanks again, all help is more than welcome.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Flash call to WordPress to get data (AJAX) – how to?’ is closed to new replies.