creating pop-ups in flash

  • zombiecrows
  • Newbie
  • Newbie
  • User avatar
  • Joined: Jun 02, 2004
  • Posts: 7
  • Status: Offline

Post June 4th, 2004, 10:05 am

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 4th, 2004, 10:05 am

  • Socno
  • Graduate
  • Graduate
  • No Avatar
  • Joined: May 26, 2004
  • Posts: 106
  • Loc: New York
  • Status: Offline

Post June 4th, 2004, 10:38 am

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: [ Download ] [ 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
  • Joined: Jun 02, 2004
  • Posts: 7
  • Status: Offline

Post June 4th, 2004, 11:41 am

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
  • Joined: Dec 20, 2002
  • Posts: 6396
  • Loc: unflux.net
  • Status: Offline

Post June 4th, 2004, 12:31 pm

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: [ Download ] [ 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: [ Download ] [ 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. }
UNFLUX.net Hosting | Foto
Quality Web Hosting

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: ATNO/TW and 97 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
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.