Solved

Flash and Html

Posted on 2003-11-03
17
258 Views
Last Modified: 2010-04-03
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.
0
Comment
Question by:MahmoodR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
17 Comments
 
LVL 23

Assisted Solution

by:Saqib Khan
Saqib Khan earned 50 total points
ID: 9674588
on (press) {
getURL("javaScript:window.open('about.html','remote','width=300,height=300,resizable=yes')")
}
0
 

Author Comment

by:MahmoodR
ID: 9675680
Thanks for your answer. However, I tried your code and it didn't work. Is ther any condition for that?
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 9694677
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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 23

Expert Comment

by:Saqib Khan
ID: 9694797
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
 

Author Comment

by:MahmoodR
ID: 9697028
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
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 9697443
Do you have a Page named about.html SAVED under the Same Directory?

Paste Your Code, whatever you using for the popup window
0
 

Author Comment

by:MahmoodR
ID: 9701538
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
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 9701881
You are missing one " before javaScript

getURL("javaScript:window.open('about.html','remote','width=300,height=300,resizable=yes')")
0
 

Author Comment

by:MahmoodR
ID: 9702804
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
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 9703425
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
 

Author Comment

by:MahmoodR
ID: 9703853
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
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 9705587
maybe Try this

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

Author Comment

by:MahmoodR
ID: 9707751
adikhan,

Unfortunately no. It doesn't even do what it was doing before!
0
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 9708313
is it possible to post your FLA?
if not then email me the file, (in my profile)
0
 

Author Comment

by:MahmoodR
ID: 9711802
Adilkhan,

I sent you a couple of of emails containing the fla files. I hope you have recieved them. Thanks
0
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 9712094
I receieved your Email, Thanks.
is it possible to send the .FLA file?
I cant really Help you with the SWF version.
0
 

Accepted Solution

by:
Rouneh earned 75 total points
ID: 9712194
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

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question