?
Solved

Closing flash window Javascript

Posted on 2000-03-17
5
Medium Priority
?
223 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 400 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

Independent Software Vendors: 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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to record live broadcast.
Suggested Courses
Course of the Month11 days, 9 hours left to enroll

752 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