Click to See Complete Forum and Search --> : window sizes
mrcollision
09-09-2003, 10:04 AM
I've got a flash file and I want it to load when people access my site. The flash file is 800x400 and I want the index page to automatically open up a smaller browser window that is 800x600 and then close itself leaving just the smaller popup.
Also.. in flash I want to have a button going to a URL that is 712x570 but I don't know how give an action that tells the browser to open up a window without scroller bars, buttons and an address line. all of this AND at the resolution..
Sorry for ALL the requests.
Cheers.
James.
andrew1234
09-09-2003, 10:08 AM
you need to use popups in java script and window.close in the script to close the other window
mrcollision
09-09-2003, 01:32 PM
Yeah i know but could someone direct me to an example of a script that can do that. I don't know how to write javascripts or do window.close fucntions or anything like that.
cheers.
andrew1234
09-10-2003, 12:58 AM
http://forums.webdeveloper.com/showthread.php?s=&threadid=16179&highlight=window.close
go here
96turnerri
09-10-2003, 05:57 AM
heres how to open a new window without scrollbars etc
<script>
function openLog()
{
NewWindow=window.open('XXXXXX.htm', 'Log',
'width=400,height=400');
}
</script>
<a href="javascript:openLog()">See Web Log / Updates</a>
to have a close link
<a href="javascript:window.close('this')">Close</a>
96turnerri
09-10-2003, 05:59 AM
should be javascript:OpenLog()
mrcollision
09-10-2003, 07:05 AM
Works a treat, thanks.
96turnerri
09-10-2003, 07:10 AM
no problem m8 anytime
Originally posted by 96turnerri
<script>
function openLog()
{
NewWindow=window.open('XXXXXX.htm', 'Log',
'width=400,height=400');
}
</script>
<a href="javascript:openLog()">See Web Log / Updates</a>That script has numerous errors/problems:
1: You did not define your scripting language, try a tag like this: <script type="text/javascript">
2: You used JavaScript in the href attribute. What happens when your users don't hae javascript enabled?
This way would be much better:
<a href="somepage.htm" onclick="window.open(this.href,'child','width=400,height=300'); return false;">link</a>
96turnerri
09-10-2003, 08:14 AM
that is also another valid way, but i use my first stated method my site is a java enabled site
96turnerri
09-10-2003, 08:29 AM
doesnt matter
96turnerri
09-10-2003, 08:59 AM
oh ok you cant get into my site without java so the coding doesnt matter if they dont have java enabled.
mrcollision
09-10-2003, 09:12 AM
anyoe know what I could do to get a flash button to link to a window of my own proportions or a pop-up window.
Basically I need a window that is 712x570 that has no address bars, buttons or scrollers to open when I click on a button in flash.
I know no actionscript and my scripting knowledge is incredibly basic.
Any help?
Ok for flash:
1-Open your flash file for your button
2-Highlight you button you want to use for the pop up
3-Press F9 to on the action panel, or right click and choose action
4-Go into Expert mode, by clicking on the pull down menu in the top right corner that looks like 3 lines with dots beside them. And past this code exactly as it is:
on (release) {
getURL ("javascript:NewWindow=window.open('http://WEBSITE','newWin','width=712,height=570,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No, resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}
If you go back to normal mode the code need to be in 1 straight line, with no breaks. Where it says 'WEBSITE' put the location of the site you want to go to, but make sure to keep the http:// in front. Publush your movie, and that is it.
No need to put any JavaScript tag in the html page or nothing, just that. If you want you can just use the swf file directly.
96turnerri
09-10-2003, 10:29 AM
ty p2bc i was after something simalar saves me starting a new thread nice one m8, thanks for looking at that site i did 4 richieno9 giving ur opinion cheers
Rich
mrcollision
09-10-2003, 10:37 AM
tried.. couldn't go to normal mode.. Got this up instead.
Scene=Scene 1, Layer=buttons, Frame=1: Line 2: String literal was not properly terminated
getURL ("java script:NewWindow=window.open('http:// WEBSITE','newWin','width=712,height=570,left=0,top
Scene=Scene 1, Layer=buttons, Frame=1: Line 3: Left side of assignment operator must be variable or property.
=0,toolbar=No,location=No,scrollbars=No,status=No,
Scene=Scene 1, Layer=buttons, Frame=1: Line 4: String literal was not properly terminated
resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
Scene=Scene 1, Layer=buttons, Frame=1: Line 5: ')' or ',' expected
}
mrcollision
09-10-2003, 10:48 AM
and then I re-read your post and put it all on one line. Oops.
mrcollision
09-10-2003, 11:16 AM
oh wait.. that doesn't work either.. For some reason when I click the link the whole line gets entered as a URL and it cant seperate the URL from the rest of the code.
That is fine.
Look at the picture.
http://www.birkemusik.dk/test/flash.jpg
Where the word website is highlighted up at the top is where you edit the site.