Solved

Closing flash window Javascript

Posted on 2000-03-17
5
221 Views
Last Modified: 2008-03-10
I need help closing my flash window.
Here's what I got;

On the entrance page-
<head>
<script>
<!--

/*
*/

function fullwin(){
window.open("flashpage.html","","fullscreen,scrollbars")
}
//-->
</script>

<body>
<form>
<input type=button onClick="fullwin()" value="ENTER"><br>
</form>

On the flashpage.html, In the .fla - button instance,
on release
get url ("javascript:window.close()")

Is it not working because
I used a form button to open this full window?
Help,
Thanks
0
Comment
Question by:wanda101797
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:coopa
ID: 2627494
Usually you get a prompt asking to confirm the close of the window...

Do you get to see the prompt ?

For example.. This code...
<a href="#" onclick="window.close()">Close this window</a>
....will prompt the user.

Maybe flash is just ignoring the command ?

I'm sure the only way to close a window without this promt is to do so from the parent window.

Let me check...
0
 
LVL 2

Accepted Solution

by:
coopa earned 100 total points
ID: 2627525
> Is it not working because I used a form button to open this full window?

Definately not.

I have just produced my own flash movie that closes a window... and it prompts in IE5 but simply closes in Netscape 4.

The fla file can be found here...
http://www.coopa.demon.co.uk/ee/closewin.fla
Try testing this on your machine to see if it works...

0
 
LVL 1

Author Comment

by:wanda101797
ID: 2627537
It never has given a prompt, it's on top of the 1st (entrance) page.
I've used the full screen before -flash, (I'm just starting to get into flash) but the full window I opened has frameset, and I put this into any of the frames - <a href="javascript:top.close()"><img src="img/exit.jpg" border="0"></a>
and it worked perfect.
0
 
LVL 2

Expert Comment

by:coopa
ID: 2627577
> It never has given a prompt
Strange on IE5 I always get the prompt.

> ...and it worked perfect
Strange that in flash it does not...

By the way did my flash movie work on your machine ?
0
 
LVL 1

Author Comment

by:wanda101797
ID: 2627800
>By the way did my flash movie work on your machine ?
Yes.

You have this- get url;
javascript:close()
and it works perfect, I changed mine,
uploaded it and tried it (IE5)
no prompt, it just closed, exactly what I wanted.
Thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

733 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