Open new window using java script

E

Emilio

I recently put together a Flash MX movie for my Web site,
using a downloaded demo copy of Flash from Macromedia. I
finished the movie before my 30 day trial ended, but I
have come across a problem playing the movie in
Frontpage. Since I can no longer do anything in Flash,
I'm hoping there is a solution in Frontpage/java script.
Below is the script that I have inserted into the HTML:

<!-- hide

function openNewWindow() {
popupWin = window.open('HvSea.swf',
'open_window',
'bgcolor=#000000,menubar=no,toolbar=no,directories=no,
status=no,scrollbars=no,resizable=no,width=750,height=400,
align=middle,')
}

// done hiding -->


The prolem is this: when the window opens it opens with a
white background. My movie uses a black background. While
the movie is loading I have a simple counter showing how
much of the movie has been loaded. Unfortunately, the
user never sees the counter because the counter in the
movie is white against a black background. All they see
is the white background until the movie is nearly fully
loaded, then they see the counter for a fraction of a
second before the movie starts.

I need to know how to get the pop up window to open with
a black background so the user can see the counter. Any
help would be appreciated. To see the problem for
yourself, the link is below:

http:\\www.emiliocorsetti.com\onalink.htm
 
J

Jim Cheshire

Emilio,

You need to create a new page with a black background. Insert your Flash
movie onto that page. Then use your script to open the page you created.

You might also want to check out Spawn from my Web site.

--
Jim Cheshire
Jimco
http://www.jimcoaddins.com
================================
Author of Special Edition
Using Microsoft Office FrontPage 2003
5 Stars on Amazon and B&N
================================
The opinions expressed by me in the
newsgroups are my own opinions and
are in no way associated with my
employer or any other party. Jimco is
not associated in any way with any other
entity.
 
E

Emilio

Jim,


I tried that and it didn't work. It looked like it was
going to work in Frontpage, but when I uploaded the page
to my Web site it made no difference.


What I did was creat a new page with a black background.
Then I created a link to start the movie.


If I was still able to use Flash, I would simply add a
black over white counter, but my 30 day trial of Flash
has expired.
 
G

Guest

I went to your Web site and found the info on the popup
window. I'm not against people trying to earn a buck.
$5.95 to solve my problem is not unreasonable. I would
have been more impressed, though, if you would have given
me the solution for this particular problem and them
recommend that I visit your Web site for more solutions.
I saw at least one other j-bot that I could probably use.
Before I pluck out any money, I have a few questions and
comments.


The dialogue box for the popup window didn't have a
selection for choosing a background color. I followed the
sample and thought I saw a second dialogue box that did
ask about background color, but it disappeared before I
had a chance to view it. Also, while viewing the sample I
was suddenly and unexpectedly given an error that said I
had followed a bad link. So I never did get through the
sample. So my question is: Is there a way to set the
background color from the dialogue boxes?


My problem with the white background may be attributed to
my Web site's use of themes. This may be why launching
the flash movie from a page with a black background had
no effect. Would your code overcome this problem if this
is the case?
 
S

Stefan B Rusynko

Unclear when you say "Then I created a link to start the movie"
What Jimco was recommending is you insert the flash movie in your new page w/ black background (nor create a link to it in that
page)
- Jimco also has an addin to include the flash (swf file) in the black page named Flasher




| Jim,
|
|
| I tried that and it didn't work. It looked like it was
| going to work in Frontpage, but when I uploaded the page
| to my Web site it made no difference.
|
|
| What I did was creat a new page with a black background.
| Then I created a link to start the movie.
|
|
| If I was still able to use Flash, I would simply add a
| black over white counter, but my 30 day trial of Flash
| has expired.
 
J

Jim Cheshire

I also have an add-in that will allow you to insert the popup, and both are
free.

--
Jim Cheshire
Jimco
http://www.jimcoaddins.com
================================
Author of Special Edition
Using Microsoft Office FrontPage 2003
5 Stars on Amazon and B&N
================================
The opinions expressed by me in the
newsgroups are my own opinions and
are in no way associated with my
employer or any other party. Jimco is
not associated in any way with any other
entity.



Stefan B Rusynko said:
Unclear when you say "Then I created a link to start the movie"
What Jimco was recommending is you insert the flash movie in your new page
w/ black background (nor create a link to it in that
 
M

MD Websunlimited

I didn't recommend any other solution because you already had three.

The color of the page background loaded into the popup is done in the page that is loaded. That is, it is not controlled by the
popup window.

--
Mike -- FrontPage MVP '97-'02
http://www.websunlimited.com
Wish to add a little sound to your buttons or images take a look at Sounder.
http://www.websunlimited.com/order/Product/Sounder/sounder.htm
FrontPage Add-ins Since '97 2003 / 2002 / 2000 Compatible
 
G

Guest

I guess I'm not sure how to do what you're suggesting. I
think you're saying that I should create a page with a
black background; create a link that takes the user to
that page; then when they load the page the flash movie
would start playing automatically. I don't know how to do
that. Right now I have a hyperlink that calls the
javascript. The hyperlink is -- javascript:eek:penNewWindow()


How do I make the flash movie play when the user loads
the page?


Also, I think the problem might be related to the use of
themes in my Web site. In the mean time I'll check out
your web site. Thanks.
 
E

Emilio

Once again I'm not getting it. Are you saying that what
ever background color is on the page that calls the popup
is the background color of the popup? If so, then if I
call the popup from a page with a black background as
previously suggested, then the popup should have a black
background. But when I tried this it did not work. I'm
guessing its because my Web site uses a theme. I do
appreciate the help, and I may very well head to your
site to purchase the sounder j-bot. As for your comment
about having three solutions, I haven't yet solved my
problem.


-----Original Message-----
I didn't recommend any other solution because you already had three.

The color of the page background loaded into the popup
is done in the page that is loaded. That is, it is not
controlled by the
 
S

Stefan B Rusynko

No
Create a black background page and On that black background page insert your Flash object html code

Then use your popup script from some other page to open the black background page




| I guess I'm not sure how to do what you're suggesting. I
| think you're saying that I should create a page with a
| black background; create a link that takes the user to
| that page; then when they load the page the flash movie
| would start playing automatically. I don't know how to do
| that. Right now I have a hyperlink that calls the
| javascript. The hyperlink is -- javascript:eek:penNewWindow()
|
|
| How do I make the flash movie play when the user loads
| the page?
|
|
| Also, I think the problem might be related to the use of
| themes in my Web site. In the mean time I'll check out
| your web site. Thanks.
|
|
|
| >-----Original Message-----
| >I also have an add-in that will allow you to insert the
| popup, and both are
| >free.
|
 
G

Guest

First off, thanks for your patience. I watched your
tutorial for the popup window. It did an excellent job of
explaining how to use the component. No where, however,
did it say anything about how to change the attribute of
the background color of the window.

Your last message implies that the popup window is like
glass and you see what ever is behind the window or "in"
the window. Makes perfect sense. But that doesn't explain
why my window opens with a white background. What I put
in the window is a flash movie that has a black
background.

Another response I received said to change the background
attributes of the page that is being displayed. When I
call the script that opens the window it simply loads the
flash movie. Frontpage generates the html code for the
window, which I'm guessing includes the theme code. If I
had access to the html code then I could delete the
theme, but I don't. The window is created by the
javascript. Frontpage generates the new page html code,
including the theme. The flash movie doesn't display
until it's fully loaded.


I don't see how your web component is going to solve the
problem.

-----Original Message-----
No the page that is "shown" in the popped up window
contains the background, it is a complete HTML page.
 
G

Guest

Okay, I tried what you suggested. I learned how to insert
the flash movie as a plug in. It's not the solution I was
looking for, but it does solve the biggest problem, which
was that the user never saw the counter.


I created a blank page with a black background. I
inserted a plug in. I then selected my flash movie. When
the user clicks on the link for the flash movie they are
taken to this new page and the movie starts and the
counter is visible.


There are two minor problems I can live with. For one the
movie is not centered unless the user has their explorer
window sized exactly right. Secondly, the user has to hit
the back button to return to the previous screen. I
thought adding buttons would clutter things up.


You can see for yourself how it looks by following the
link below. Thanks again for your help.

http:\\www.emiliocorsetti.com\onalink.htm






-----Original Message-----
No
Create a black background page and On that black
background page insert your Flash object html code
 
J

Jim Cheshire

Use Spawn to create a popup window for flshbk.htm. Choose the same size for
that popup as your Flash animation. You're done. :)

--
Jim Cheshire
Jimco
http://www.jimcoaddins.com
================================
Author of Special Edition
Using Microsoft Office FrontPage 2003
5 Stars on Amazon and B&N
================================
The opinions expressed by me in the
newsgroups are my own opinions and
are in no way associated with my
employer or any other party. Jimco is
not associated in any way with any other
entity.
 
E

Emilio

Success!!!


Thanks for all that contributed to this thread. For those
interested in the solution to my problem, here it is:


Jim's last comment and a comment from another person on
this thread gave me some insight on how popup windows
work. I didn't use any of the solutions suggested here,
though I borrowed from them. All I had to do was invoke
the Flash HTML page rather than the Flash movie. So in my
java script where it said HvSea.swf it now says
HvSea.html. This file was created by Flash and I wasn't
sure what I was supposed to do with it before.


I still have some mismatch window sizing problems, but I
can live with that. Thanks again for all who helped.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top