-
I have been trying to use some JS from Colin Moock
it works great but my swf´s won´t fit exactly in the pop up I have tryed moving it left,right etc in a table without a table etc !!!!
the movie size setting is the same in the script and in the fla.
I am using Dreamweaver 3 and I will also paste the script just in case.
< !--
Popup Window
Version 2.0
Last Updated: May 7, 1999
Code maintained at: http://www.moock.org/webdesign/javascript/
Copy permission granted for non-commercial uses. Written by Colin Moock.-->
<SCRIPT LANGUAGE="JavaScript"> var javascript_version = 1.0;</SCRIPT>
<SCRIPT language="JavaScript1.1"> javascript_version = 1.1;</SCRIPT>
<SCRIPT language="JavaScript">
var newwin;
function launchwin(winurl,winname,winfeatures)
{
//This launches a new window and then
//focuses it if window.focus() is supported.
newwin = window.open(winurl,winname,winfeatures);
if(javascript_version > 1.0)
{
//delay a bit here because IE4 encounters errors
//when trying to focus a recently opened window
setTimeout('newwin.focus();',250);
}
}
</SCRIPT>
Thanks in advance
Steve
Nice to see U to see U nice
-
I have been trying to use some JS from Colin Moock
it works great but my swf´s won´t fit exactly in the pop up I have tryed moving it left,right etc in a table without a table etc !!!!
the movie size setting is the same in the script and in the fla.
I am using Dreamweaver 3 and I will also paste the script just in case.
< !--
Popup Window
Version 2.0
Last Updated: May 7, 1999
Code maintained at: http://www.moock.org/webdesign/javascript/
Copy permission granted for non-commercial uses. Written by Colin Moock.-->
<SCRIPT LANGUAGE="JavaScript"> var javascript_version = 1.0;</SCRIPT>
<SCRIPT language="JavaScript1.1"> javascript_version = 1.1;</SCRIPT>
<SCRIPT language="JavaScript">
var newwin;
function launchwin(winurl,winname,winfeatures)
{
//This launches a new window and then
//focuses it if window.focus() is supported.
newwin = window.open(winurl,winname,winfeatures);
if(javascript_version > 1.0)
{
//delay a bit here because IE4 encounters errors
//when trying to focus a recently opened window
setTimeout('newwin.focus();',250);
}
}
</SCRIPT>
Thanks in advance
Steve
Nice to see U to see U nice
-
Can you post the size of your movie, as well as what parameters you're passing to the function? Most importantly, what are the 'winfeatures' you're sending? Fiddle with the width and height parameters in there.
hth,
Deep (just a guy)
<pre><font face="courier" size="2">,-----------------------------.
| Pradeep Kumar Nair, B.Math |
| Graphic/Multimedia Designer |
| ICQ#: 39102360 |
| Medius Communications, Inc. |
| http://www.medius.com |
`-----------------------------'</font></pre>
Moderator - i/us Flash Forum
-
Iam not 100 % sure what you mean Deep !
(what parameters you're passing to the function?)
I think you mean the action in the flash button? if so it´s ;
on (release) {
getURL ("javascript:launchwin('whatever.html' , 'newwindow' , 'height=300,width=300')");
}
All my movie sizes are different I am using the action more than once.
I can get the movies to fit in but not exactly
If I enter the size of the swf for the pop up its never the real size of the swf
I have to mess around for ages and i still get some of the default html background and it looks crap as some of my movies are image backgrounds
As for the "winfeatures" I don´t know what you mean.
Thanks for your help
Steve
Nice to see U to see U nice
-
winfeatures was just the parameters you pass in the launchwin command - in your case ('whatever.html', 'newwindow', 'height=300, width=300'). Now are all your movies 300x300? If they're different sizes (as you seem to indicate), you should send those sizes dynamically, or at least send the right sizes based on the file you're opening (like, if you have a 20x400 movie, send width=20, height=400, whereas if it's 300x300 send width=300, height=300).
How are you calling your movies from whatever.html? Are you just loading one movie, then from that movie you're loading all the other movies? Or are you loading them in some other fashion?
If you're opening a new html file for each movie, then each time you call launchwin, set the width and height to the size of the movie (as you've set in the html file). If you're opening one html file and then having the movie in there open the other movies, then I'd say to make sure your movie dimensions match one another because that's the easiest way to make sure that you're not going to see that nasty background.
Also, you could set the window width and height to the size of the movie, and then set the width and height parameters in the HTML file to 100%x100%. That way the movie will scale to your window, no matter what size it is.
Finally, in your HTML file, make sure that your body tag looks something like this:
<body marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 bgcolor=...[etc.]...>
That will make sure that you don't get an extra bunch of space in the browser window - everything will be aligned to the top right. I'd say to do this first, and that might fix up your problem.
hth,
Deep (just a guy)
<pre><font face="courier" size="2">,-----------------------------.
| Pradeep Kumar Nair, B.Math |
| Graphic/Multimedia Designer |
| ICQ#: 39102360 |
| Medius Communications, Inc. |
| http://www.medius.com |
`-----------------------------'</font></pre>
Moderator - i/us Flash Forum
-
Thanks Deep,
All my buttons call different html files in seperate pop up windows.
I going to have a go at what you said and if it does not work Ill be back for help !
Thanks again
Steve
Nice to see U to see U nice
-
just a question, but are you sure you want to have a lot of pop-up windows? generally people don't like seeing a lot of pop-up windows - it makes it harder for them to keep organized, plus it can just be plain annoying to see a window pop up if you're not expecting it. i guess i just wanted to give you a heads-up on that...but i guess we'll have to see your design before we can really say if it's obtrusive or not. [img]/infopop/emoticons/icon_smile.gif[/img]
good luck!
hth,
Deep (just a guy)
<pre><font face="courier" size="2">,-----------------------------.
| Pradeep Kumar Nair, B.Math |
| Graphic/Multimedia Designer |
| ICQ#: 39102360 |
| Medius Communications, Inc. |
| http://www.medius.com |
`-----------------------------'</font></pre>
Moderator - i/us Flash Forum
-
Hi deep,
Yeah I know what you mean and as sad as it sounds I don´t really like pop ups and full screen is a total shocker !
It´s for my own site with my porfolio of work I just wanted it to look a bit more tidy rather than having just a normal window pop up.
Any sugestions ?
Thanks
Steve
Nice to see U to see U nice
-
hmmm...hard to say without knowing somewhat what you're trying to do, really. why not just section off a portion of your page and then display your portfolio items there? you can do this using frames, if you want, but if you don't like frames, then look into using include statements to maintain your navigation/common elements across the site.
hth,
Deep (just a guy)
<pre><font face="courier" size="2">,-----------------------------.
| Pradeep Kumar Nair, B.Math |
| Graphic/Multimedia Designer |
| ICQ#: 39102360 |
| Medius Communications, Inc. |
| http://www.medius.com |
`-----------------------------'</font></pre>
Moderator - i/us Flash Forum