Solved

Closing flash window Javascript

Posted on 2000-03-17
5
217 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
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:coopa
Comment Utility
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
Comment Utility
> 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
Comment Utility
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
Comment Utility
> 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
Comment Utility
>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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
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…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
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.

763 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

11 Experts available now in Live!

Get 1:1 Help Now