trouble with pop up

  • adidas1200
  • Novice
  • Novice
  • User avatar
  • Posts: 33
  • Loc: chicago

Post 3+ Months Ago

I've looked all over the web and all I've found were tutorials, nothing to help me with this problem. I'm trying to display my portfokio pieces in a pop up window instead of a new page. when I press the button a new winhdow open - blank and full size. I've used the javascript method found in the tutorial. what am I doing wrong.

I have entered the script in flash as well as the changes in the html code.



thanks

-ryan
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

http://www.kirupa.com has 2 or 3 tutorials on this very subject :)


Edit: Oh yeah, and be sure to test the movie in a browser and not the Flash autoring environment. Given that window.open() is a browser interpreted javascript command, Flash does not handle that and so to test this properly you need to be viewing your movie from within a browser.
  • adidas1200
  • Novice
  • Novice
  • User avatar
  • Posts: 33
  • Loc: chicago

Post 3+ Months Ago

I was so frustrated I published everything and uploaded it testing it on the web. The site you recommended had some info on setting the pop up function up but nothing on how to fix this exact problem. I have been noticing quite a few people on multiple forums are having this problem. I'm sure there is a simple solution, thats why it's so frustrating.

I appreciate the help

-ryan
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

The problem may be your pop-up function. It's hard to troubleshoot a problem without any code to go by.
  • adidas1200
  • Novice
  • Novice
  • User avatar
  • Posts: 33
  • Loc: chicago

Post 3+ Months Ago

on the button (this is from the macromedia tutorial):

on (release) {
getURL("javascript:openNewWindow('http://www.macromedia.com','thewin','height=400,width=400,toolbar=no,scrollbars=yes') ");
}



and in the html:

<SCRIPT LANGUAGE=JavaScript>
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
</SCRIPT>


I placed this between the <head>'s
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Works 100% fine diddly-o for me. (IE 6 SP1 on Windows XP Pro)
  • adidas1200
  • Novice
  • Novice
  • User avatar
  • Posts: 33
  • Loc: chicago

Post 3+ Months Ago

if I were to bring up an image. I just replace the web address, in this case http://www.macro.... with a *.swf or *.html file?

here's what i've done.

created an .swf file contaning an image. published it, so I have and .swf and a .html with content.


I should just replace the direction to the web site with a direction to my image. correct?? or is there a change in code?
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6375
  • Loc: twitter.com/unflux

Post 3+ Months Ago

i'm not sure why, but i did exactly what you have here and it
worked for me. here's the test page: http://www.unflux.com/files/testPop.html

for the zip, go here: http://www.unflux.com/files/testPop.zip
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Well it's technicall the same, but if the file is on the same server you don't need the full url (although it doesn't negatively effect the script to have a full url either), you can use a relative url. like just "file.swf" or if it is in a directory called "myFiles" it would be "myFiles/file.swf"
  • adidas1200
  • Novice
  • Novice
  • User avatar
  • Posts: 33
  • Loc: chicago

Post 3+ Months Ago

ill try it again.

thanks for all your help.
  • adidas1200
  • Novice
  • Novice
  • User avatar
  • Posts: 33
  • Loc: chicago

Post 3+ Months Ago

i think I've figured it out. thanks again for all your help. No B.S. out of all the forums i've gone to this the quickest and most helpful. I'll definetly recommend it.


thank you

-ryan
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6375
  • Loc: twitter.com/unflux

Post 3+ Months Ago

nice to hear you enjoy OZZU. :)

what did you find was the problem?
  • adidas1200
  • Novice
  • Novice
  • User avatar
  • Posts: 33
  • Loc: chicago

Post 3+ Months Ago

dumb mistake in setting up the code in html. I checked out your site (unflux). Looks Great. Is this the method you used to show your portfolio. That's essentially what I'm looking to do. press a button and have static images and motion graphic examples pop up in a new window
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6375
  • Loc: twitter.com/unflux

Post 3+ Months Ago

well, i'm only using seperate movies to represent my different
sections. if that's what you mean by new window, then yes.
  • torbjorn
  • Novice
  • Novice
  • User avatar
  • Posts: 23

Post 3+ Months Ago

Use Javascript:
Stick this inside the head tag:(between <head> and </head>
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
function newWindow() {yournewWindow = window.open("your_popup.html", "popup",
"width=200,height=120, scrollbar=no, resize=no") }
</SCRIPT>

Activate it with a link:
(anywhere between <body> and </body>
<a href="javascript:newWindow()">

Should be a popup window. You can control the parameters of the wndow with vaiables like "width" and "scrollbar".

t
  • adidas1200
  • Novice
  • Novice
  • User avatar
  • Posts: 33
  • Loc: chicago

Post 3+ Months Ago

the javascript is working out just fine. It's what I was going for. it's just a pain to re enter the code in the html everytime i republish my site. Oh well it works and that all that matters.
  • adidas1200
  • Novice
  • Novice
  • User avatar
  • Posts: 33
  • Loc: chicago

Post 3+ Months Ago

do you know a way to center an image in the pop up I've created? I'm not looking to center the pop up on the screen, just the image within the pop up window. I hope I explained that properly.


this isn't a big deal I'm just picky when it comes to stuff like that.
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6375
  • Loc: twitter.com/unflux

Post 3+ Months Ago

first, why don't you just uncheck the html box in your publish
settings after you published and centered the flash?? this
would allow you to make changes to the html and leave it as
you want it to be. If you flash file isn't changing dimensions
every time you publish, then this is an easy solution.

as for the pop up, all you have to do is center the image in
the first place on the page you're loading. Best bet is to center
it in a 100% width table.

Post Information

  • Total Posts in this topic: 18 posts
  • Users browsing this forum: No registered users and 10 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.