• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 289
  • Last Modified:

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

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?
0
prophyt
Asked:
prophyt
  • 3
1 Solution
 
TanLiHaoCommented:
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).

http://www.rgagnon.com/jsdetails/js-0086.html shows you to hide a divider.
0
 
TanLiHaoCommented:
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.
0
 
TanLiHaoCommented:
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.
0
 
prophytAuthor Commented:
thanks.... I will try your suggestions in a little...
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now