How to make swf file disappear when finish playing using PHP in Drupal?

Posted on 2009-12-24
Last Modified: 2013-11-11
I have a flash swf file playing in a Drupal page and I would like for it disappear from the page when it is finish playing using PHP.  Is that possible?
Question by:prophyt
    LVL 14

    Accepted Solution

    Hmm, PHP is a server-sided language so it's not possible to do that since this is client-sided.

    To do that, you need to use javascript. Of course, if you are using PHP to write the javascript, then it's possible.

    The recommended way to do this is to call ExternalInterface when the swf file have finished playing. Then the javascript function generated by the PHP page will simply hide the divider(which you should be using the put the swf in, especially if you are using swfobject). shows you to hide a divider.
    LVL 14

    Expert Comment

    There are also other ways of achieving this but unless you say what you mean by making the swf disappear from page using PHP, then I won't be able to tell you how.

    For example, do you mean that the SWF should just turn white, or just become hidden as I told you above. Or if there are text below the divider, the divider should disappear and the text move up?

    You need to specify clearly what you mean by disappear. Otherwise, just use the above method.
    LVL 14

    Expert Comment

    Just in case I wasn't clear on what I said, that page teaches you how to hide and remove a divider. It should be able to answer your question on what you want.

    Author Comment

    thanks.... I will try your suggestions in a little...

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
    The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now