Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Closing flash window Javascript

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

604 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