creating pop-ups in flash

  • zombiecrows
  • Newbie
  • Newbie
  • User avatar
  • Posts: 7

Post 3+ Months Ago

Ok so I have yet another problem. I want to create a pop-up window in my flash movie when you click on a certain button. I know how to make something open in another window, but what I want is to edit the size of the window (making it smaller then a normal window) when it comes up. I know you can do this using javascript, but I don't know how to put javascript in flash. Little help.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Socno
  • Graduate
  • Graduate
  • Socno
  • Posts: 107
  • Loc: New York

Post 3+ Months Ago

zombiecrows wrote:
Ok so I have yet another problem. I want to create a pop-up window in my flash movie when you click on a certain button. I know how to make something open in another window, but what I want is to edit the size of the window (making it smaller then a normal window) when it comes up. I know you can do this using javascript, but I don't know how to put javascript in flash. Little help.



What about using dreamweaver to make a html page where you insert the javascript code and add the flashfile into the html. Dreamweaver is often used to add flash and html/php/java together. I think the java code would be:

Code: [ Select ]
<script language="javascript">
show=1
function minimize(){
 moveBy(2000,2000)
 show=0
}
function reshow(){
 if(show==0){
  moveBy(-2000,-2000)
  show=1
 }
}
</script>
  1. <script language="javascript">
  2. show=1
  3. function minimize(){
  4.  moveBy(2000,2000)
  5.  show=0
  6. }
  7. function reshow(){
  8.  if(show==0){
  9.   moveBy(-2000,-2000)
  10.   show=1
  11.  }
  12. }
  13. </script>
  • zombiecrows
  • Newbie
  • Newbie
  • User avatar
  • Posts: 7

Post 3+ Months Ago

So how does that let flash know that when you click on the button in the movie to open up a new smaller window?
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

first, please change your signature image to comply with our rules as
stated in the announcements forum. Footer images are to be less than
6kb, no larger than 468x100.

second, it is better practice to embed flash files in an html page no
matter what, for better control and presentation. Once you do that, you
can use this to popup from flash very easily.

Place this in the html page between the head tags:
Code: [ Select ]
<SCRIPT LANGUAGE=JavaScript>
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
</SCRIPT>
  1. <SCRIPT LANGUAGE=JavaScript>
  2. function openNewWindow(URLtoOpen, windowName, windowFeatures) {
  3. newWindow=window.open(URLtoOpen, windowName, windowFeatures);
  4. }
  5. </SCRIPT>

then on the button in flash, add this:
Code: [ Select ]
on (release) {
getURL("javascript:openNewWindow('http://www.macromedia.com','thewin','height=400,width=400,toolbar=no,scrollbars=yes') ");
}
  1. on (release) {
  2. getURL("javascript:openNewWindow('http://www.macromedia.com','thewin','height=400,width=400,toolbar=no,scrollbars=yes') ");
  3. }

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 22 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.