| Ultrashock Forums
• Full-Screen Centred Flash |
|||
![]() |
||||
| Search this Thread | Thread Tools | Display Modes |
| 12311>>> | Page 1 of 12 |
|
|
|||||||||||||||||||||||||
![]() |
Ultrashock Member Comments:
17 Creative Assets
|
2005-09-06
#2 |
||
|
|
2005-09-06
#3 |
||
|
Superb Nutrox. The answer and an explanation to boot. That's been on my list of niggling expertise holes for a while now. Thanks for that gen.
|
|
|
|
2005-09-06
#4 |
||
|
yes thanks nutrox for the info
|
|
|
2005-09-06
#5 |
||
|
Nutrox thank you for such a usefull staff. I have a quick question. When I was testing this staff I was confused with the first line of HTML which was created by publishing from flash. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> With this line I had vertical scroller appearing when I've resized window so it will be very short vertically. When I've removed the first line from HTML code that scroller disapeared. Also I'm always having problems in DreamViewer with tables (100% height) so I have always to remove that line from HTML. Could you explain what does this line do? P.S. nutrox thanks again for this staff, now it is very clear to understand how guys are creating web sites like http://matiz2.ru/ |
|
17 Creative Assets
|
2005-09-06
#6 |
||
|
Hi Klin. Here's a basic HTML page that I normally start off with when I create full screen (100% x 100%) Flash sites. You should be able to edit it easily enough to suit your needs... although it might be worth editing in a text edit and not Dreamweaver. Dreamweaver tends to dump a lot of useless code into web pages, which is one of the reasons why I never use it now. Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head>
<title></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:100%;
}
object {
width:100%;
height:100%;
}
</style>
</head><body>
<object type="application/x-shockwave-flash" data="flashMovie.swf">
<param name="movie" value="flashMovie.swf" />
</object>
</body></html>
If you use CSS files (.css) then you might want to shift the style from the <head> into a .css file just to clean things up a bit... but it's not too important with 100% Flash sites. Just let me know if you need help with that if you decide to do it though. Hope that's of some help. |
|
|
2005-09-06
#7 |
||
|
Thank you Nutrox.
|
|
|
2005-09-06
#8 |
||
|
Yeah thanks, that was on my list of things to learn too.
|
|
|
|
2005-09-06
#9 |
||
|
Nutrox !!!! TKS A LOT MEN !!!! I will try it... I'll let you know asap !!! Tks again !!!
|
|
17 Creative Assets
|
2005-09-06
#10 |
||
|
No problem guys, glad I could help out. I've zipped up a small example if you want / need to check it out. It contains the .htm, .fla, and .swf files. Feel free to grab it from here. |
|
|
|
2005-09-06
#11 |
||
|
Tks... Very good idea !!!
|
|
|
|
2005-09-06
#12 |
||
|
Hey Nutrox... Do you know if you can do a repeat background img like html ? 4 x 4 pixels ? Do you know what I mean ? Thank's a lot !!! |
|
17 Creative Assets
|
2005-09-07
#13 |
||
|
Yep, creating a tiled background is quite easy, but to be honest using a 4x4 tile probably isn't the best thing to use because it's too small. With Flash 8 you could simply create a bitmap image within Flash and flood-fill it with your tile... nice easy and quick. With Flash 7 (and lower) you need to create a new movieclip for each tile, and with a 4x4 tile that's going to kill Flash... a 600 x 400 sized stage for example would require 15000 movieclips (nooooooooooooooo!). If you used a larger tile though (50x50 etc) then it should be ok. Anyway, here's a little function that you can use to create a tiled background. ActionScript Code:
I've only just woken up but I think that should work. If you have any problems with it just let me know. |
|
|
2005-09-07
#14 |
||
|
Topic does not concern OOP. Moving to Flash Forum.
|
|
|
|
2005-09-13
#15 |
||
|
So is the is the same way that they set up http://www.bacardilive.com ????
|
|
27 Creative Assets
|
2005-09-13
#16 |
||
|
yes
|
|
|
|
2005-09-13
#17 |
||
|
OK.... now it all akes sense.... but I have a little question. Taking Bacardilive as an example... You have all the main content being loaded into maincontent_mc. Can you then further load more movie clips into that.... Like maincontent_mc loads a clip that has the whole site shell but in that I have seperate panels that need to load in... can you load a movie inside an allready loaded movie.. obviously if you can I imagine that it would have to be at a higher level.. right? thanks |
|
27 Creative Assets
|
2005-09-13
#18 |
||
|
yes, you can load movies inside a loaded movie.
|
|
|
2005-09-13
#19 |
||
|
Yes you can using levels or by replacing mc's
|
|
|
|
2005-09-17
#20 |
||
|
THX A LOT!
|
|
|
|
2005-09-17
#21 |
||
|
With Flash 8 you could simply create a bitmap image within Flash and flood-fill it with your tile...
Could you describe this a little more?
|
|
|
|
2005-09-17
#22 |
||
|
to further probe nutrox's knowledge: is there a simple way to call a function *after* the user has finished resizing the browser window? i.e. instead of calling it repeatedly while the window is being dragged... thanks - this thread has been invaluable. |
|
17 Creative Assets
|
2005-09-17
#23 |
||
|
Originally posted by fr3d The only way I can think of doing that at the moment is like this...to further probe nutrox's knowledge: is there a simple way to call a function *after* the user has finished resizing the browser window? i.e. instead of calling it repeatedly while the window is being dragged... thanks - this thread has been invaluable. ActionScript Code:
Hope that helps. On a side note: If the size of your main content ever changes then you can simply call _root.reposition(); to force everything to the center of the screen. |
|
17 Creative Assets
|
2005-09-17
#24 |
||
|
Originally posted by MYTiX I'll get example together shortly. Could you describe this a little more?
|
|
|
|
2005-09-17
#25 |
||
|
hey - wow. fast post! along the lines of what i had in mind. thanks for putting it into code. very nice. |
|
17 Creative Assets
|
2005-09-18
#26 |
||
|
Bitmap Tile Example
Hi Guys. Here's an example of how to create a tiled bitmap in Flash (as requested by MYTiX). Here's the important part... ActionScript Code:
ActionScript Code:
Hope that's of some use. |
|
|
|
2005-09-18
#27 |
||
|
Thx. I see, you know a lot of these new Flash 8 features. Thx again. |
|
|
|
2005-09-18
#28 |
||
|
Last edited by NDF : 2005-09-19 at 00:37.
'llo there, talking tiled backgrounds - a simple thing that you can do in Flash for as long as I can recall is take a small bitmap, break it up (control>b) and select it with the eye-dropper. You can then center a 1600x1200 rectangle - or whatever size you want - on the stage and use the selected bitmap as the fill colour. |
|
| Mime |
2005-09-18
#29 |
||
|
Great Thread. Thx Nutrox and Co.
|
|
|
2005-09-18
#30 |
||
|
very helpful stuff. Thanx Nutrox!
|
|
|
2005-09-19
#31 |
||
|
Hi, great thread I must say! I was wondering if anyone could give an example how to make two extra mc's in this thread. One that aligns to the top, and one mc that aligns to the bottom of your page.. like on workrocks ?? If possible in the AS code of Nutrox's example zipped Fla! thanx igor |
|
| Mime |
2005-09-19
#32 |
||
|
`workrocks' = Nice Site !
|
|
|
2005-09-20
#33 |
||
|
I was wondering if anyone could give an example how to make two extra mc's in this thread. One that aligns to the top, and one mc that aligns to the bottom of your page.. like on workrocks ?? Anyone If possible in the AS code of Nutrox's example zipped Fla!
|
|
17 Creative Assets
|
2005-09-20
#34 |
||
|
Here's something that might help you out... ActionScript Code:
All three movieclips will be centred horizontally. myHeader_mc will be fixed at the top of the stage, myContent_mc will be centred vertically, and myFooter_mc will be fixed to the bottom of the stage. Hope that helps. |
|
|
2005-09-20
#35 |
||
|
Mennn Thanx Nutrox! This thread is getting better and better..
|
|
|
|
2005-09-20
#36 |
||
|
Igordezign is totaly right... Nutrox !!!! Men apply for teacher !!! This thread is making us learn a lot !!!!
|
|
|
2005-10-02
#37 |
||
|
Last edited by igor : 2005-10-02 at 11:38.
Opening this thread again with another question.. Anyone knows how to include the vertical scrolling(just the html one, like on bacardilive ) into Nutrox's fullscreen flash movie tut. I asked for with the three mc's top center and bottom??? If it's possible.. |
|
17 Creative Assets
|
2005-10-02
#38 |
||
|
Originally posted by igordezign Instead of giving the HTML flash object a height of 100% you just give it a PX value. All of the Stage reposition code etc will still work fine.. the Flash movie can be any size you want.Opening this thread again with another question.. Anyone knows how to include the vertical scrolling(just the html one, like on bacardilive ) into Nutrox's fullscreen flash movie tut. I asked for with the three mc's top center and bottom??? If it's possible.. Code:
<object type="application/x-shockwave-flash" data="movie.swf" width="100%" height="1000px"> <param name="movie" value="movie.swf" /> </object> |
|
|
2005-10-03
#39 |
||
|
Hmm doesnt seem to work like I wanted.. But Thanx! Is it hard to make your own (inside flash) scroller like on subdisc? |
|
17 Creative Assets
|
2005-10-03
#40 |
||
|
Originally posted by igordezign Hmm doesnt seem to work like I wanted.. But Thanx!
You must have something setup wrong then, all you need to do is make the flash movie (HTML object) high enough to contain your content.
Originally posted by igordezign Is it hard to make your own (inside flash) scroller like on It's not too difficult because you just need to scroll a huge movie clip, but it obviously depends on how well you know ActionScript.subdisc? It would be a lot better to use the browser's scrollbar though because (a) it's easier to implement, (b) it will be a lot smoother, and (c) it won't eat up as much CPU as scrolling a massive movie clip does. |
|
| 12311>>> | Page 1 of 12 |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|



466 comments
| 144270 views

17 Creative Assets
Linear Mode
Create a new Flash movie and add a movieclip to the stage (give the movieclip the instance name "mainContent_mc") then add the following code to the first frame of the main timeline...
That code basically tells Flash to resize the stage instead of rescaling it, and it sets up a listener for the Stage which calls the reposition() function whenever the main movie (HTML object) is resized.
Stage.width and Stage.height will return the actual size of the stage, and they are always available to you use.
Hope that helps.