| Ultrashock Forums
• Full-Screen Centred Flash |
|||
![]() |
||||
| Search this Thread | Thread Tools | Display Modes |
| <1234>>> | Page 2 of 12 |
|
2005-10-03
#41 |
||
|
17 Creative Assets
|
2005-10-03
#42 |
||
|
Try this version... Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head>
<title>test</title>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="author" content="" />
<meta name="copyright" content="" />
<style type="text/css">
html, body {
margin:0px;
padding:0px;
}
object {
width:100%;
height:1000px;
}
</style>
</head><body>
<object type="application/x-shockwave-flash" data="Untitled-1.swf">
<param name="movie" value="Untitled-1.swf" />
</object>
</body></html>
![]() I've made the Flash movie 1000px high just to make double sure the scrollbar shows up. You don't need "overflow:hidden" in the html and body tags because that will stop the scrollbars showing up. Also, the "width" and "height" tags don't need to be on the actual Flash object because they are set by the style sheet. Hope that helps. |
|
|
2005-10-03
#43 |
||
|
And it helps ![]() Thanx men |
|
|
2005-10-03
#44 |
||
US pays nutrox.. right ?
|
|
17 Creative Assets
|
2005-10-03
#45 |
||
|
Originally posted by Bentropy Yeah, right... I cost too much. US pays nutrox.. right ?
J/KI just love the way this thread has gone from bitmap tiling to full-screen flash sites.
|
|
|
2005-10-03
#46 |
||
|
How do i get it even on the pixel ? Pixel fonts go wacky on resize. math.round ¿ |
|
17 Creative Assets
|
2005-10-03
#47 |
||
|
Originally posted by Bentropy I always tend to use Math.floor for some reason, but anything that gives you a whole number is fine.How do i get it even on the pixel ? Pixel fonts go wacky on resize. math.round ¿ You basically just need to make sure that your main movie clips (content containers etc) are all sitting on whole numbers. I'm not sure how you've got things setup in your code but a basic example to center a movie clip would be... ActionScript Code:
|
|
|
2005-10-03
#48 |
||
|
I wasnt familur with math.floor :\ but thats wha i thought. Thats in there.. and there definetely all sittin on the pixel, ... hmm.. Thx any way bro
|
|
|
2005-10-11
#49 |
||
|
Hi there, This thread have been really useful since I was trying to understand what was behind this "elastic layouts". With what I've learned here I came up with this. But I'm having a problem: when you maximize your browser (hit F11) and then minimize it again the myContent_mc stays near the top instead of getting centered vertically. Why is that?? Can anyone help? I tested it in every browser and this always happens, I´m using the exact same script Nutrox posted. Thanks |
|
17 Creative Assets
|
2005-10-11
#50 |
||
|
You don't need to press F11 to get it to happen, it also happens if you simply resize the browser... so... I'm going to take a wild guess that there's something slightly wrong in the code that you use to reposition everything. Are you using your reposition function to position everything when the movie first loads? That's something you should do if you're not already doing it. It's going to be difficult to help you though without seeing what's going on with your ActionScript. |
|
|
2005-10-11
#51 |
||
|
Thank you very much for the fast reply Nutrox here is the AS ActionScript Code:
I'm not using the myHeader_mc for now. |
|
|
2005-10-11
#52 |
||
|
For anyone who wants to animate the reposition. this is how i did it. (Robert Penner tween class) ActionScript Code:
thought I'd contribute a lil Thanks Nutrox.. |
|
|
2005-10-14
#53 |
||
|
Interesting, I must try this with Penner's easing. Thanks Bentropy and Nutrox ! Great thread.
|
|
|
|
2005-10-20
#54 |
||
|
Another question for this thread! Nutrox, above you mention that in Flash 8 this is very simple by "flood filling" the movie. Could you elaborate a little more. I'm guessing that this method doesn't require a seperate movie clip for each tile? |
|
17 Creative Assets
|
2005-10-20
#55 |
||
|
Originally posted by tripflip Here's an example that uses a PNG file in the library (linkage ID "myTile") to create a tiled fill...Another question for this thread! Nutrox, above you mention that in Flash 8 this is very simple by "flood filling" the movie. Could you elaborate a little more. I'm guessing that this method doesn't require a seperate movie clip for each tile? ActionScript Code:
|
|
|
|
2005-10-20
#56 |
||
|
Sweet! That's a perfect example. Now let me ask you to help expand that a little if you would. I have my flash file set to 100% x 100%, stage.scale = "noscale" and I would like to use the example you have given to render as my background. I'm not super AS savy but would this be possible? Thanks for the awesome help! |
|
17 Creative Assets
|
2005-10-20
#57 |
||
|
The best way would be to create a tiled movie clip the same size as the user's desktop, that way it would only need to be drawn once... ActionScript Code:
|
|
|
|
2005-10-20
#58 |
||
|
That Worked Perfect
I've had Flash 8 now for 3 weeks, and I've learned more in one thread than I have in 3 weeks of poking around. Thank you very much for your help. The examples you have given me are perfect. Now I have a perfect set of template files to start each new flash site with. Thanks again Nutrox! |
|
|
|
2005-10-20
#59 |
||
|
I knew it was probably to soon to post a success reply. First thanks for your help thus far. Now this might change the topic a bit, but if I want to load in movie clips on top of the background using LoadMovie do i have to specify a level higher than the level used in the createEmptyMovieClip? |
|
17 Creative Assets
|
2005-10-20
#60 |
||
|
Originally posted by tripflip The best thing to do really is to have your background in one level and then load the main site content into another level.I knew it was probably to soon to post a success reply. First thanks for your help thus far. Now this might change the topic a bit, but if I want to load in movie clips on top of the background using LoadMovie do i have to specify a level higher than the level used in the createEmptyMovieClip? For example, you might use this code in the first movie that gets loaded into the HTML ( _level0 )... ActionScript Code:
|
|
|
|
2005-10-20
#61 |
||
|
Hmmm...
This may be nothing, but when I got home this evening I opened my fla on my desktop with my resolution set to 1200 x 1600 on my 20" monitor, and for some reason the tiled background only stretchs the full width. The height is only about 250px. My systems are both setup the same except this machine has a dual monitor setup with a higher screen res, and the is on a 15" laptop. Any thoughts? |
|
17 Creative Assets
|
2005-10-21
#63 |
||
|
It sounds like the dual-monitors might be causing a problem there. Hmm. You might have to do things the "normal" way then and redraw the tiled background whenever the size of the movie changes (when the browser window changes size etc). Here's the code for that... ActionScript Code:
|
|
|
|
2005-10-21
#64 |
||
|
I think I figured it out. I blamed it on my system changes, but when I got back in the office this morning it was doing the same thing on my laptop. Instead of using the html file that flash creates I was using a XHTML file created with Dreamweaver. I can't believe I overlooked that considering I created it right before I left the office. Works perfect when I replace the Dreamweaver generated DOCTYPE section with the Flash generated DOCTYPE section. Nutrox thanks for all of your help. I'm pretty new to US, but I've looked at a lot of forums and you're everywhere so I know i've gotten solid advice. I do appreciate your help! |
|
|
|
2005-10-25
#65 |
||
|
Great Topic really interesting. I have a question about full background in flash. I've got it all working fine, but it doesn't seem to work in IE 5.2 for Mac Is this something I done wrong or is there a way to fix it. |
|
17 Creative Assets
|
2005-10-25
#66 |
||
|
Originally posted by flacoop Hehe... nothing works in IE 5 on the Mac. Great Topic really interesting. I have a question about full background in flash. I've got it all working fine, but it doesn't seem to work in IE 5.2 for Mac Is this something I done wrong or is there a way to fix it. ![]() Seriously though, the script used in this thread doesn't do anything browser specific, i.e. it's not using any JavaScript or anything like that, so I guess it's either an issue with the Flash plugin, or it could be the way you've constructed the actual HTML page. The Stage.onResize stuff will only work with Flash 6 or above, but there's no mention of any browser related problems in the Flash Help docs. |
|
|
|
2005-10-25
#67 |
||
|
Nutrox, Thanks for the reply, I'm using flash Mx and I have the latest flash player so I dont know if that is the problem, I tried it with the files you supplied earlier in the thread and IE just wont show it, I just get a blank browser, all the others are great. |
|
|
2005-10-25
#68 |
||
|
This might be the most useful thread on ...flacoop, try again.. Theres nothing wrong with the code. Make sure your implementing it correctly... and Make sure your mc isnt way off bounds. |
|
|
|
2005-10-25
#69 |
||
|
I'm sure the code is fine, but I'm just downloading the code Nutrox provided and then testing it in the browser, I'm not implementing at all Has anyone else tried it in IE on the Mac |
|
|
|
2005-10-25
#70 |
||
|
Are you using the HTML page generated from flash, then modifying the object width and height settings? I had a very similar problem when I created a blank HTML doc in dreamweaver then inserted the flash object. The XHTML tags at the top of the page were causing the problem. When I exported from Flash and used the Flash generated tags it worked great. |
|
|
2005-10-25
#71 |
||
|
Orr.. just use the HTML template Nutrox threw out there.
|
|
|
|
2005-10-25
#72 |
||
|
I am using the template Nutrox provided. I'm not doing anything myself. I'm just downloading Nutrox file and dragging the index_mx.htm file on top of my IE logo in the dock and the browser is blank. If I drag it onto Mozilla or Safari its fine and I can see the flash, but IE on luck. |
|
|
2005-10-25
#73 |
||
|
ohh.. Well then. The problem is that mac:IE sux
|
|
|
|
2005-10-25
#74 |
||
|
Another Question
I was taking a look at some of the previous BS award winners today, and one of them made me curious about another technique used with a background in flash. If you visit Leventhumps.com and resize your browser window the background doesn't scale, but yet it hides the outer area of the image. How do they do that? Do they start with a 1600 x 1200 image assuming that would be the maximum resolution, and if it is wider then the black background becomes visible? I just thought it was a pretty cool technique and figured someone on this thread might have done it, or understand it. |
|
|
2005-10-25
#75 |
||
|
Thats just a large centered image.
|
|
|
|
2005-10-25
#76 |
||
|
Can this be done?
This is a great thread. I finally got my head around this. Question though. Is there a way to have a MC centered both horizontal and verticle in the screen. Then change it to where that mc is aligned to the top of the screen and still centered vertically? Thanks a ton for everyones help on this thread already!! |
|
17 Creative Assets
|
2005-10-25
#77 |
||
|
Re: Can this be done?
Originally posted by freeskier Yep, you just need to think about how you create your reposition() function.This is a great thread. I finally got my head around this. Question though. Is there a way to have a MC centered both horizontal and verticle in the screen. Then change it to where that mc is aligned to the top of the screen and still centered vertically? Thanks a ton for everyones help on this thread already!! If you create a new Flash movie and then run the following code you can click on the black-box movie clip to switch it's vertical alignment... ActionScript Code:
|
|
|
|
2005-10-25
#78 |
||
|
Thanks a ton Nutrox! I'll give it a go.
|
|
|
|
2005-10-25
#79 |
||
|
Sorry back to my problem of IE on Mac, I got it working, I think it must be the embed tag that IE needs Anyway haven't worked out why this works, but if anyone has the same problem here is the html Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>centered_mx</title>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="author" content="" />
<meta name="copyright" content="" />
<style type="text/css">
body {
margin:0px;
padding:0px;
overflow:hidden;
height:100%;
}
object {
width:100%;
height:100%;
}
</style>
</head>
<body>
<object WIDTH="100%" HEIGHT="100%" id="centered_mx">
<param name=movie value="centered_mx.swf">
<embed src="centered_mx.swf" quality=high scale=noscale bgcolor=#FFFFFF width="100%" height="100%" name="centered_mx"
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
</object>
</body>
</html>
|
|
|
2005-10-31
#80 |
||
|
Hi Nutrox! I got a question for u... The code explaining how to create a tiled bg u posted is only for flash 8? I cant get it to work.... |
|
| <1234>>> | Page 2 of 12 |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|



17 Creative Assets
US pays nutrox.. right ?
J/K
Linear Mode
(with and without px in the Heights)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head> <title>test</title> <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta name="MSSmartTagsPreventParsing" content="true" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <meta name="author" content="" /> <meta name="copyright" content="" /> <style type="text/css"> html, body { margin:0px; padding:0px; overflow:hidden; height:700; } object { width:100%; height:700; } </style> </head><body> <object type="application/x-shockwave-flash" data="Untitled-1.swf" width="100%" height="700"> <param name="movie" value="Untitled-1.swf" /> </object> </body></html>I understand what you mean about the flashscroller