Solved

Flash and Html

Posted on 2003-11-03
17
254 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
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

685 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