Solved

Flash and Html

Posted on 2003-11-03
17
251 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:adilkhan
adilkhan earned 50 total points
Comment Utility
on (press) {
getURL("javaScript:window.open('about.html','remote','width=300,height=300,resizable=yes')")
}
0
 

Author Comment

by:MahmoodR
Comment Utility
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
Comment Utility
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
 
LVL 23

Expert Comment

by:adilkhan
Comment Utility
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
Comment Utility
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:adilkhan
Comment Utility
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
Comment Utility
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:adilkhan
Comment Utility
You are missing one " before javaScript

getURL("javaScript:window.open('about.html','remote','width=300,height=300,resizable=yes')")
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:MahmoodR
Comment Utility
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:adilkhan
Comment Utility
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
Comment Utility
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:adilkhan
Comment Utility
maybe Try this

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

Author Comment

by:MahmoodR
Comment Utility
adikhan,

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

Expert Comment

by:adilkhan
Comment Utility
is it possible to post your FLA?
if not then email me the file, (in my profile)
0
 

Author Comment

by:MahmoodR
Comment Utility
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:adilkhan
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now