Flash and Html

Does any one knows how I can change the size of the window which desplays a movie? The movie is embeded in a html file. In other words how I can use the following code for a flash button asuming that the file to be opened through the movie is called about.html:

<a href="#" onClick="window.open('about.html','remote','width=300,height=300,resizable=yes');return(false);">

Any holp would be appretiated.
MahmoodRAsked:
Who is Participating?
 
RounehCommented:
I think I've encountered this problem myself.
Try this:
getURL("javaScript:window.open('about.html','remote','width=300,height=300,resizable=yes');event.cancelBubble = true;")

Another possible solution is to write the javascript bit in your HTML code and call that javascript from your flash movie.

--- Put this in the HTML file your flash movie is opened in ---
<script>
   function gotoAboutPage() {
      window.open('about.html', 'remote', 'height=300, width=300, resizeable=yes');
   }
</script>

--- Then call this function from the flash movie ---
on(release) {
   getURL("javascript:gotoAboutPage()");
}

Regards,
Rouneh
0
 
Saqib KhanSenior DeveloperCommented:
on (press) {
getURL("javaScript:window.open('about.html','remote','width=300,height=300,resizable=yes')")
}
0
 
MahmoodRAuthor Commented:
Thanks for your answer. However, I tried your code and it didn't work. Is ther any condition for that?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
blue-genieCommented:
i'm assuming you want to click on a button in a flash movie that's embedded in html that in turn opens a popup window.

if that's the case, the code supplied by adikhan is correct,
check that
a) your movie you're opening is indeed called about.html
b) the path to the movie is correct.
c) what didn't work

0
 
Saqib KhanSenior DeveloperCommented:
MahmoodR I believe you placing this action on a BUTTON not MovieClip.
and I also Believe page is saved within the Same Directory where Flash File is.
0
 
MahmoodRAuthor Commented:
It is working now after I corrected the code. However, in addition to the pop up window, it opens a blank window which adress is:
javaScript:window.open('about.html','remote','width=300,height=300,resizable=yes')". On this blank window there is written:
[object].
What could be wrong? Thanks, all of you.
0
 
Saqib KhanSenior DeveloperCommented:
Do you have a Page named about.html SAVED under the Same Directory?

Paste Your Code, whatever you using for the popup window
0
 
MahmoodRAuthor Commented:
adilkhan,
I am using the same code that you suggested. However, in addition to the pop up window which is "about.html", I am getting a blank page too, which icludes a text which says [object]. The address for this page (the blank page) or if you want to call it the file name is : javaScript:window.open('about.html','remote','width=300,height=300,resizable=yes')". It is strange isn't it? I don't know what is wrong?
0
 
Saqib KhanSenior DeveloperCommented:
You are missing one " before javaScript

getURL("javaScript:window.open('about.html','remote','width=300,height=300,resizable=yes')")
0
 
MahmoodRAuthor Commented:
This is exactly what I am using:
getURL("javaScript:window.open('about.html','remote','width=300,height=300,resizable=yes')" and it is making the pop up window that I need. However, as I said before, it is also opening a new blank window, by replacing my original movie, that I don't need. I am investigating to solve this problem. Thanks
0
 
Saqib KhanSenior DeveloperCommented:
Checkbox next to URL is unchecked?
Window Field is Blank?
Checkbox next to it is window field is unChkeck?
Variables field is set to "Dont Send"?
0
 
MahmoodRAuthor Commented:
The window field is blank and the variebles field is set to "Don't Send". In Flash 4 there si no Checkbox next to URL Or window field.
I think what's happening is that by using geturl command in the action, flash is not only making us the pop-up window, it also using the "javascript:window.open....')" as an url to replace the parent window. That's why my prent window is replaced by a new window. This is the problem that I don't know how to solve becaus I am new to Flash. Do you know how we can prevent the Flash from replacing the parent window with a blank widow? Thanks.
0
 
Saqib KhanSenior DeveloperCommented:
maybe Try this

getURL("javaScript:window.open('about.html','remote','width=300,height=300,resizable=yes');return false;")
0
 
MahmoodRAuthor Commented:
adikhan,

Unfortunately no. It doesn't even do what it was doing before!
0
 
Saqib KhanSenior DeveloperCommented:
is it possible to post your FLA?
if not then email me the file, (in my profile)
0
 
MahmoodRAuthor Commented:
Adilkhan,

I sent you a couple of of emails containing the fla files. I hope you have recieved them. Thanks
0
 
Saqib KhanSenior DeveloperCommented:
I receieved your Email, Thanks.
is it possible to send the .FLA file?
I cant really Help you with the SWF version.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.