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.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saqib KhanSenior DeveloperCommented:
on (press) {
MahmoodRAuthor Commented:
Thanks for your answer. However, I tried your code and it didn't work. Is ther any condition for that?
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

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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.
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:
What could be wrong? Thanks, all of you.
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
MahmoodRAuthor Commented:
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?
Saqib KhanSenior DeveloperCommented:
You are missing one " before javaScript

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
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"?
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.
Saqib KhanSenior DeveloperCommented:
maybe Try this

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

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

I sent you a couple of of emails containing the fla files. I hope you have recieved them. Thanks
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.
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 ---
   function gotoAboutPage() {
      window.open('about.html', 'remote', 'height=300, width=300, resizeable=yes');

--- Then call this function from the flash movie ---
on(release) {


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.