Heya! I'm still new to Flash, and was wondering if someone could tell me how (or if it's possible!) to make a popup open from inside an SWF file?
Does that make sense?
I mean, in the same way as it would work from an HTML file?
Thanks :)
da_mascus
09-17-2007, 11:23 PM
Flash 8 AFAIK cant popup things by itself, but it can trigger a javascript that can.
Basically what you need is to insert this code between the <head>here</head> tags of your HTML file where did you embed your flash movie. This is the script used to popup things (pics,html):
<script language ="javascript">
function resizeWindow(theurl, windowname, features)
{window.open(theurl, windowname, features);}
</script>
once you have done this you can add the popup function to your button in your flash movie. like this:
on (release) {
getURL("javascript:resizeWindow('something.html', 'windowName', 'height=640, width=800, resizable=0, status=no, scrollbars=no, toolbar=0, location=0, directories=0, menubar=0, left=0, top=0')");
}
as you can see its the same getURL principe, but you call upon the script and send a few paramters too. They are all adjustable to your liking.
I hope I wasnt too much confusing, its almost morning here and I haven't slept for some time, so I am a bit wasted:)
Oh that's great! Thanks so much :) I had a little trouble in the beginning because it came up with an error message when I tried to open the popup from the file, but when I uploaded it it was fine. Thank you!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.