Jump to content


Another Easy Question


  • You cannot reply to this topic
4 replies to this topic

#1 ccbass85

    Young Padawan

  • Members
  • Pip
  • 86 posts
  • Gender:Male
  • Location:Maryland

Posted 09 January 2006 - 11:23 PM

Sorry i've been askin a lot of questions but its aways specific things that i cant find in tutorials. Ok 2 Questions.

1) I have a button that when you click on it i want a jpeg to pop up in a new browser window, but i want the brower window to be the same size as the jpeg. How would i do this?

on (release) {
_root.item_mc.loadMovie("pi_01.jpg","_blank"); This loads the pic in a regular sized window


2) completed apart from the top Question. If i load a jpeg into a movie clip, is there a way to make it fade in when its loaded instead of just appearing on the screen?


All the help is really appreciated guys. Thanks!!

Edited by ccbass85, 09 January 2006 - 11:24 PM.


#2 Tirus

    P2L Jedi

  • Members
  • PipPipPip
  • 764 posts
  • Gender:Male
  • Location:Montreal, Canada
  • Interests:Web Design, Programming, Music, Martial Arts

Posted 09 January 2006 - 11:32 PM

for your first question, i do not know of any actionscript coding to get your browser to open in a specific size (but i dont know much about actionscript in the first place :D ), the only thing i can think of is outside of flash, you would have to have the jpg in an html file that is coded to open to a certain height and width, but that would be a pain to do, since youd have to make an html file for every jpg, so hopefuly funkysoul has a better method for you.

as for your second question, i recommend instead of loading up the jpg directly, why dont you load up a movie clip in which the jpg fades in, that would work.

Edited by Tirus, 09 January 2006 - 11:36 PM.


#3 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 10 January 2006 - 05:12 AM

okay as you see this is the code for a new popupwindow with a specified size and centered, with a bit knowledge of javascript you can modify this to your needs :D
getURL ("javascript:NewWindow=window.open('http://www.yoursite.com','newWin','width=800,height=600,left=0,top=0,toolbar=No,location=No,scrollbars=No,statu
s=No,resizable=No,fullscreen=No');  screen_height = window.screen.availHeight; screen_width = window.screen.availWidth; left_point = parseInt(screen_width/2)-(800/2); top_point = parseInt(screen_height/2)-(600/2); setTimeout('NewWindow.moveTo(left_point,top_point)',100); void(0);");

to your second question:
You can use the Transition Class on a Movieclip to make that kind of stuff. Press F1 and search for it ;)

#4 ccbass85

    Young Padawan

  • Members
  • Pip
  • 86 posts
  • Gender:Male
  • Location:Maryland

Posted 12 January 2006 - 10:03 PM

Hmmm. I didnt get any actionscript errors but it doesnt work for me. I doesnt do anything at all even when i uploaded it to the server. :) All i changed was the url. Is there something i have to add or something? I dont know javascript but i didnt modify anything except the url.

My action script looks like this

on (release) {
getURL ("java script:NewWindow=window.open('http://www.yahoo.com','newWin',& #39;width=800,height=600,left=0,top=0,toolbar=No,location=No,scrollbars=No,statu
s=No,resizable=No,fullscreen=No'); screen_height = window.screen.availHeight; screen_width = window.screen.availWidth; left_point = parseInt(screen_width/2)-(800/2); top_point = parseInt(screen_height/2)-(600/2); setTimeout('NewWindow.moveTo(left_point,top_point)',100); void(0);");
}

#5 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 13 January 2006 - 04:35 AM

now that's really strange.
if you check my site, you wil see that exactly that script is working fine for my portfolio section.

Here a real snippet of my code on my website:
_root['but2d'+i].onRelease = function() {
				//getURL("http://www.six4rty.ch/2005/display.php?img=" +this.picpath_txt, blank)
				getURL ("javascript:NewWindow=window.open('http://www.six4rty.ch/2005/display.php?img="+this.picpath_txt+"','newWin','width=800,height=600,left=0,top=0,toolbar=No,location=No,scrollbars=No,statu
s=No,resizable=No,fullscreen=No');  screen_height = window.screen.availHeight; screen_width = window.screen.availWidth; left_point = parseInt(screen_width/2)-(800/2); top_point = parseInt(screen_height/2)-(600/2); setTimeout('NewWindow.moveTo(left_point,top_point)',100); void(0);");
			}






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users