0
Adding text to javascript pop up window
New Here
,
/t5/animate-discussions/adding-text-to-javascript-pop-up-window/td-p/198621
Mar 21, 2009
Mar 21, 2009
Copy link to clipboard
Copied
I am opening a pop up windows with javascript from my Flash
movie that works fine. Each opening window has a video in it. Now
what I'd like to do is add text under/above the quick time movie
inside the pop up windows. I'm not very savvy with programming and
I've tried to look all over but can't find a simple direct answer,
so any help would be greatly appreciated.
Thanks!
Here's the code I have inside the Flash movie:
btn_rebecca.onRelease = function() {
getURL("javascript:openNewWindow('Videos/rebecca.mov','thewin','width=500,height=400,toolbar=no,scrollbars=no')");
}
And here's the code I have in the html:
<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures); }
</script>
Thanks!
Here's the code I have inside the Flash movie:
btn_rebecca.onRelease = function() {
getURL("javascript:openNewWindow('Videos/rebecca.mov','thewin','width=500,height=400,toolbar=no,scrollbars=no')");
}
And here's the code I have in the html:
<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures); }
</script>
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/animate-discussions/adding-text-to-javascript-pop-up-window/m-p/198622#M238846
Mar 21, 2009
Mar 21, 2009
Copy link to clipboard
Copied
What you are doing now is just creating a new html window
that contains the QT movie. If you want to add text then you will
have to alter the html of that window. Is there any reason why you
can't format an html document to contain the text and the QT movie
and then open that document?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Taankk
AUTHOR
New Here
,
/t5/animate-discussions/adding-text-to-javascript-pop-up-window/m-p/198623#M238847
Mar 21, 2009
Mar 21, 2009
Copy link to clipboard
Copied
Thanks for your message Rob! Hmmm... good question. I guess I
could do that as well... I'm not sure exactly how to do that, in a
way that lets me define the window size, not having scroll bars
etc. like it is now, so that it looks like a pop up window and not
a whole page? Also, I need to have about 20 of them, one for each
QT movie, so I thought I would have been easier if I could do it
with the code, and not have to create 20 pages and do all the
linking etc. Any ideas how that would be done? Do I need to create
those pages in dreamweaver and then link to the pages in Flash? Can
I still define the window sizes and format exactly the same?
Thanks!!
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/animate-discussions/adding-text-to-javascript-pop-up-window/m-p/198624#M238848
Mar 22, 2009
Mar 22, 2009
Copy link to clipboard
Copied
An html document is an html document. If you create a
document that has a line of text, then the QT movie, and then
another line of text, you have the basic layout of the movie. If
you just open this document in a browser, it will work as a normal
html document. If you open that same page using the window.open()
JS method, then you can define the chrome and size of the window.
If you don't want to create all 20 pages and load then on your server, then you could write a JS function to write the content to an html document on the fly. You might do this by:
1. Use window.open() to open up a blank html document,
2. Use document.write() to write the html content that you want in that document.
That way you can create as many custom windows with unique content as you want.
If all of the content is static, then it really is a whole lot less work to just make the html documents and open them as needed.
If you don't want to create all 20 pages and load then on your server, then you could write a JS function to write the content to an html document on the fly. You might do this by:
1. Use window.open() to open up a blank html document,
2. Use document.write() to write the html content that you want in that document.
That way you can create as many custom windows with unique content as you want.
If all of the content is static, then it really is a whole lot less work to just make the html documents and open them as needed.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Taankk
AUTHOR
New Here
,
/t5/animate-discussions/adding-text-to-javascript-pop-up-window/m-p/198625#M238849
Mar 22, 2009
Mar 22, 2009
Copy link to clipboard
Copied
Can you give me an example code and tell me where to put it?
I'm a super beginner in actionscript or any programming, and don't
know how to do that... I would really appreciate it! I tried to
look on the Flash help section, but I'm not savvy enough to figure
it out based on that. Thanks!!!
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/animate-discussions/adding-text-to-javascript-pop-up-window/m-p/198626#M238850
Mar 22, 2009
Mar 22, 2009
Copy link to clipboard
Copied
None of that has anything to with actionscript. It's all done
in javascript. You can find out more about javascript at:
http://www.w3schools.com/js/default.asp.
Discussing javascript is pretty far off the focus of this
forum.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

