Solved

Closing flash window Javascript

Posted on 2000-03-17
5
222 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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 how to record live broadcast.
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.

705 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