How do i center an image thats Loading

  • dmartinAM
  • Born
  • Born
  • dmartinAM
  • Posts: 3

Post 3+ Months Ago

What's up Yall!
This is my 1st time posting here so please bear with me:
I am by no means a flash developer but I'm trying to build a website for my band and I'm having the following problem:

Try to picture this,
On my site, I have small pics on the right hand side of my gallery page, I want to be able to click on the small pic and a bigger size open up in the middle of the page. On the smaller picture I added the following commands to it:

on (release) {
unloadMovieNum(1);
loadMovieNum("BandPic1Big.jpg", 1);

The bigger picture opens up but its on the far left corner of the screen
How do I get it to open up in the middle of the screen?

Any help would greatly be appreciated
Thanks
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Tchuki
  • Mastermind
  • Mastermind
  • Tchuki
  • Posts: 1774
  • Loc: Edinburgh

Post 3+ Months Ago

You could always stick it between some HTML and center it that way :

Code: [ Select ]
<html>
<head>
<title>Your Page Name</title>
</head>
<body>
<center><img src="http://www.yourDomain.com/BandPic1Big.jpg"></center>
</body>
</html>
  1. <html>
  2. <head>
  3. <title>Your Page Name</title>
  4. </head>
  5. <body>
  6. <center><img src="http://www.yourDomain.com/BandPic1Big.jpg"></center>
  7. </body>
  8. </html>


Or you could use some JavaScript in your Falsh movie and load it into a window the exact size of your pic :

Code: [ Select ]
on (release) {
getURL ("javascript:NewWindow=window.open('ShowPopup.php','newWin','width=400,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus();");
}
  1. on (release) {
  2. getURL ("javascript:NewWindow=window.open('ShowPopup.php','newWin','width=400,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus();");
  3. }
  • dmartinAM
  • Born
  • Born
  • dmartinAM
  • Posts: 3

Post 3+ Months Ago

Enigma,

Thanks for your quick response, But I can't seem to figure out where to put the html code or the javascript code. Do I put it in between the current code that is already there?

I tried adding the HTML code and when I went to preview I got a whole bunch of errors:

Symbol=BandPic1Flash, Layer=Layer 1, Frame=1: Line 1: Unexpected '<' encountered
<html>

Symbol=BandPic1Flash, Layer=Layer 1, Frame=1: Line 3: Operator '>' must be followed by an operand
<title>BandPics</title>

Symbol=BandPic1Flash, Layer=Layer 1, Frame=1: Line 4: Operator '<' must be followed by an operand
</head>

Symbol=BandPic1Flash, Layer=Layer 1, Frame=1: Line 6: Operator '>' must be followed by an operand
<center><img src="C:\Documents and Settings\martid\My Documents\BandTemplate\Testing 6411site\with_FL\flash\BandPic1Big.jpg"></center>

Symbol=BandPic1Flash, Layer=Layer 1, Frame=1: Line 7: Operator '<' must be followed by an operand
</body>

Symbol=BandPic1Flash, Layer=Layer 1, Frame=1: Line 8: Operator '<' must be followed by an operand
</html>

Symbol=BandPic1Flash, Layer=Layer 1, Frame=1: Line 1: Statement must appear within on/onClipEvent handler
<html>

***I know this may be a stupid question but like I said before, I am not familiar with this program at all***

Thanks
  • Tchuki
  • Mastermind
  • Mastermind
  • Tchuki
  • Posts: 1774
  • Loc: Edinburgh

Post 3+ Months Ago

You dont put the HTML code into flash, you put the JavaScript in there on a button.

The HTML is for a single page.
  • dmartinAM
  • Born
  • Born
  • dmartinAM
  • Posts: 3

Post 3+ Months Ago

Ok, I chage the movie clip to a button and added the java script, do I have to edit the code you gave me so that it opens up what i want?
  • Tchuki
  • Mastermind
  • Mastermind
  • Tchuki
  • Posts: 1774
  • Loc: Edinburgh

Post 3+ Months Ago

Yes, edit the code so that the window opens to the parameters you want it to.

Post Information

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