8 Replies - 28969 Views - Last Post: 03 April 2007 - 08:50 AM

#1 wongcy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 30-March 07

How to put a close button from flash in website

Posted 30 March 2007 - 02:39 AM

I have put a pop-up flash file (.swf) in a html website. When I click a html button, the flash will pop-out, but I dont know how to close the pop-up flash file by using flash actionscript.

(I had made a Exit button in the pop-up flash, but dont know how to close it when I add it into html website.)

Pls anyone who can help me~~~ thks!! :)

Is This A Good Question/Topic? 0
  • +

Replies To: How to put a close button from flash in website

#2 pioSko  Icon User is offline

  • still.dreaming
  • member icon

Reputation: 23
  • View blog
  • Posts: 1,888
  • Joined: 06-June 03

Re: How to put a close button from flash in website

Posted 30 March 2007 - 06:28 AM

Is the pop-up just a regular "new window" popup?? Can't the user just close the window?
Was This Post Helpful? 0
  • +
  • -

#3 CyanBlue  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 6
  • View blog
  • Posts: 156
  • Joined: 01-September 06

Re: How to put a close button from flash in website

Posted 30 March 2007 - 07:01 AM

Something like this attached to the button might work...
exitButton.onPress = function ()
{
   getURL("java script:window.opener=self;self.close();");
}

Was This Post Helpful? 1

#4 wongcy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 30-March 07

Re: How to put a close button from flash in website

Posted 01 April 2007 - 07:59 PM

View PostpioSko, on 30 Mar, 2007 - 06:28 AM, said:

Is the pop-up just a regular "new window" popup?? Can't the user just close the window?


I have make a html page first, the html page got a button, when click it, will pop out a flash (SWF file format),
and I want to make a close button in this flash, when user click the close button, only close this flash and the html page will not affected.

before that I have try use this code on the close button:

on(release) {
	fscommand ("quit");
}


but it only can run at SWF or exe format, when I publish it to html, it cant function.
Was This Post Helpful? 0
  • +
  • -

#5 wongcy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 30-March 07

Re: How to put a close button from flash in website

Posted 01 April 2007 - 08:06 PM

View PostCyanBlue, on 30 Mar, 2007 - 07:01 AM, said:

Something like this attached to the button might work...
exitButton.onPress = function ()
{
   getURL("java script:window.opener=self;self.close();");
}


Sorry, the code cant function>.<
I have try

on (release){
getURL("java script:window.opener=self;self.close();");
}


but also cannot function. Is that got any more code need be add?
Thks for your reply and help!!! :D
Was This Post Helpful? 0
  • +
  • -

#6 pioSko  Icon User is offline

  • still.dreaming
  • member icon

Reputation: 23
  • View blog
  • Posts: 1,888
  • Joined: 06-June 03

Re: How to put a close button from flash in website

Posted 02 April 2007 - 01:10 AM

Did you change the name (ie. exitButton) to whatever name you've given your button?

Also, it's supposed to be javascript not java script.
Was This Post Helpful? 0
  • +
  • -

#7 CyanBlue  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 6
  • View blog
  • Posts: 156
  • Joined: 01-September 06

Re: How to put a close button from flash in website

Posted 02 April 2007 - 06:09 AM

Huh... Did I actually tyep 'java script' or did the code tag created it like that???
Let me test...
getURL("java script:whatever();");

Ah... The code tag did that... Any way to fix this??? Hm...

pioSko... How do you do the inline tag where you did with 'javascript' and 'java script'??? :)
Was This Post Helpful? 0
  • +
  • -

#8 pioSko  Icon User is offline

  • still.dreaming
  • member icon

Reputation: 23
  • View blog
  • Posts: 1,888
  • Joined: 06-June 03

Re: How to put a close button from flash in website

Posted 02 April 2007 - 11:46 AM


[il] tekst [/il]



Was This Post Helpful? 0
  • +
  • -

#9 CyanBlue  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 6
  • View blog
  • Posts: 156
  • Joined: 01-September 06

Re: How to put a close button from flash in website

Posted 03 April 2007 - 08:50 AM

Thanks!!! :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1