Flashを全画面で表示して、スクロールバーを出す方法

全画面のFlashサイトがありますが、Flashのサイズが大きいと画面サイズによっては
見えなくなる領域もできます。Flash内でスクロールできれば問題はないのですが、ブラウザのスクロールバーをだしたい時ようのメモです。

表示方法

使うのは以下2つのJS

まずは<head>の中に

<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript" src="swfforcesize.js"></script>

と記述しJSを読み込みます。そして続いて以下を記述します。

<script type="text/javascript">
var flashvars = {};
flashvars.url = "test.swf";
flashvars.color = "0xFFFFFF";
var params = {};
params.play = "true";
params.loop = "false";
params.quality = "best";
params.scale = "noscale";
params.salign = "tl";
params.bgcolor = "#000000";
params.allowfullscreen = "true";
params.allowscriptaccess = "sameDomain";
var attributes = {};
attributes.id = "flashId";
attributes.name = "flashId";
attributes.styleclass = "flashClass";
swfobject.embedSWF("test.swf", "flash", "100%", "100%", "10", "expressinstall.swf", flashvars, params, attributes);
swfobject.addLoadEvent(function()
{
var obj = document.getElementById("wrap");
if(obj)
{
var forcesize = new SWFForceSize(obj, 1024, 768);
forcesize.onLoadDiv();
}
})
</script>

中の細かい値はいらないのもあるのかもしれませんが、よくわからないのでこちらのソースをもってきて使用箇所だけ適宜変えてます(赤字のところ)。

続いてCSSを記述します。

html {
height: 100%;
overflow: auto;
}
body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
}
#wrap {
position: absolute;
top: 0px;
left: 0px;
height: 100%;
width: 100%;
line-height: 0;
}

これであとはbody内に以下のように記述します。

<body>
<div id="wrap">
<div id="flash">
<p>Flashが表示できないときの文言をここに書きます。</p>
</div>
</div>
</body>

以上で一定のサイズに縮小されたらスクロールバーがでます。ほとんどコピペですのでサンプルは参考にしたサイトswfobject2.2 & swfforcesize のテストでご覧下さい。

参考/関連サイト

コメント

  1. Clomiphene 50mg より:

    Sorry for the huge review, but I’m really loving the new Zune, and hope this, as well as the excellent reviews some other people have written, will help you decide if it’s the right choice for you.

  2. Tegretol 200 mg より:

    I feel like you could probably teach a class on how to make a great blog. This is fantastic! I have to say, what really got me was your design. You certainly know how to make your blog more than just a rant about an issue. Youve made it possible for people to connect. Good for you, because not that many people know what theyre doing.

  3. Cipro より:

    This is getting a bit more subjective, but I much prefer the Zune Marketplace. The interface is colorful, has more flair, and some cool features like ‘Mixview’ that let you quickly see related albums, songs, or other users related to what you’re listening to. Clicking on one of those will center on that item, and another set of “neighbors” will come into view, allowing you to navigate around exploring by similar artists, songs, or users. Speaking of users, the Zune “Social” is also great fun, letting you find others with shared tastes and becoming friends with them. You then can listen to a playlist created based on an amalgamation of what all your friends are listening to, which is also enjoyable. Those concerned with privacy will be relieved to know you can prevent the public from seeing your personal listening habits if you so choose.

  4. Strattera より:

    I admit, I have not been on this webpage in a long time… however it was another joy to see It is such an important topic and ignored by so many, even professionals. I thank you to help making people more aware of possible issues.Great stuff as usual.

  5. Keflex より:

    You have some honest ideas here. I done a research on the issue and discovered most peoples will agree with your blog. After that early period, the Beatles evolved considerably over the years.

  6. Flagyl generic より:

    I feel like you could probably teach a class on how to make a great blog. This is fantastic! I have to say, what really got me was your design. You certainly know how to make your blog more than just a rant about an issue. Youve made it possible for people to connect. Good for you, because not that many people know what theyre doing.

  7. This is getting a bit more subjective, but I much prefer the Zune Marketplace. The interface is colorful, has more flair, and some cool features like ‘Mixview’ that let you quickly see related albums, songs, or other users related to what you’re listening to. Clicking on one of those will center on that item, and another set of “neighbors” will come into view, allowing you to navigate around exploring by similar artists, songs, or users. Speaking of users, the Zune “Social” is also great fun, letting you find others with shared tastes and becoming friends with them. You then can listen to a playlist created based on an amalgamation of what all your friends are listening to, which is also enjoyable. Those concerned with privacy will be relieved to know you can prevent the public from seeing your personal listening habits if you so choose.

  8. I admit, I have not been on this webpage in a long time… however it was another joy to see It is such an important topic and ignored by so many, even professionals. I thank you to help making people more aware of possible issues.Great stuff as usual.

  9. Sorry for the huge review, but I’m really loving the new Zune, and hope this, as well as the excellent reviews some other people have written, will help you decide if it’s the right choice for you.

  10. antique vase より:

    There are certainly a couple more details to take into consideration, but thank you for sharing this information.

  11. If you’re still on the fence: grab your favorite earphones, head down to a Best Buy and ask to plug them into a Zune then an iPod and see which one sounds better to you, and which interface makes you smile more. Then you’ll know which is right for you.

  12. Sorry for the huge review, but I’m really loving the new Zune, and hope this, as well as the excellent reviews some other people have written, will help you decide if it’s the right choice for you.

  13. Janyce Agrios より:

    Your are wonderful This weblog may be so glorious. I genuinely would like any folks study it likewise as obtain simply what you’re saying, as a result of permit us enlighten everybody, this can be crucial data.

  14. Your website is great! This post really caught my eye when I was searching around. Thanks for sharing it.

  15. Thanks for the great post on your blog, it really gives me an insight on this topic.~~'”;

  16. we should always be updated with current events because it is important for us to know the latest issues’

  17. leather bags look really nice specially those natural leather bags, ..

  18. the doctor said that we have an allergic baby that is why we choose hypoallergenic baby clothes.

  19. i would love to do figure skating every week, this has been my hobby and a mild form of exercise for my body,

  20. Caramoan Tour より:

    what i like about cable internet is that it is almost immune to electrical noise which always degrades DSL lines..

  21. i use lamp shades with CFL ubls instead of incandescent lamps, they are much cooler and uses less electricity*

  22. Zachary Levine より:

    my family would always like to go on ski holidays because it is very enjoyable..

  23. Harley Massy より:

    As a CNA I know how you feel. I bet you could be a property health aide they have many various kinds of clients which you could be able to assist. With a number of the clients you only have to take them to the doctor or the store. http://qewoihdfknd.com

  24. Hazel Hund より:

    Great document plus easy so that you can recognize justification. Exactly how can I actually approach getting concur so that you can post component of your post at my upcoming newsletter? Getting proper consumer credit back a publisher plus web page link to your web-site won’t often be a problem.

  25. Tattoo より:

    I’ve read a few excellent stuff here. Certainly worth bookmarking for revisiting. I surprise how a lot attempt you set to make one of these magnificent informative web site.

  26. Tattoo より:

    There are some fascinating deadlines in this article but I don’t know if I see all of them middle to heart. There may be some validity however I will take maintain opinion until I look into it further. Good article , thanks and we wish extra! Added to FeedBurner as nicely

  27. hmm, this is kinda intriguing

  28. Free Backlinks より:

    Hello, I love your blog. Do you write all of the articles yourself?

  29. youku786 より:

    I need to express my thanks towards the creator of this website. Keep adding a good ideas and strategies. Many people will surely improve their knowledge by reading blogs like this.

  30. You have a great website! I would love to build backlinks for you.

  31. Pruitt より:

    While this topic can be quite touchy for most folks, my opinion is that there has to be a middle or common ground that we all can find. I do appreciate that youve added relevant and intelligent commentary here though. Thank you!

  32. happyday67 より:

    Joyce told me you all got there safe and sound. That you and Micah enjoyed it. Also how you guys could to Elk River and have breakfast sometime in the future. Have fun with that cause I wont be on the plane with you. Also, when you get home you have to show me the road to get to the trees on Mike Askers. I couldnt find it.

  33. We go to an independent small business, but at least one of the big chain pet stores offers this service in addition to tradional grooming serivce.

  34. Fairly decent submit. We simply located your own site as well as wished in order to express which We have extremely appreciated reading through your own web page as well as threads. However I’ll end up being signing up your own give food to as well as We intend in order to read through your own web page for a second time.

  35. I’ll immediately grab your rss as I can’t in finding your e-mail subscription hyperlink or e-newsletter service. Do you have any? Kindly allow me know so that I could subscribe. Thanks.

  36. An inspirational post! Love your blog. I really got much joy reading it. Thanks for the info.

  37. Josefine Carre より:

    Wonderful document along with very easy for you to figure out justification. Exactly how can My spouse and i attempt receiving concur for you to submit element in the document inside my future news letter? Getting suitable credit history to you personally your publisher along with web page link on the blog won’t certainly be a trouble.

  38. Williams Blatz より:

    Terrific piece of writing and also quick to be able to understand story. How do My partner and i begin acquiring agreement to be able to place part with the article within my new newssheet? Offering right credit rating for your requirements the particular source and also weblink for the online site will not be described as a concern.

  39. blqblq より:

    Great paintings! This is the kind of info that should be shared across the web. Shame on the search engines for not positioning this put up upper! Come on over and visit my site . Thank you =)

  40. Chance Twitty より:

    Relatively fine put up. I actually really came across a person’s blog page plus needed so that you can mention this I’ve definitely loved checking a person’s site plus blogposts. Anyhow I’ll often be checking a person’s feast plus I actually hope so that you can examine a person’s site again.

  41. Highly interesting and useful entry. I’ve normally follow your web page and study all your publications. As I see you might have accomplished a big job writing this guide and you may have mentioned the primary things which we really should know about the managed world. Thank you a great deal one additional time for that good and educational entry and maintain up publishing these ones within the future.

  42. anal sex より:

    Greetings from Carolina! I’m bored to death at work so I decided to check out your blog on my iphone during lunch break. I really like the information you provide here and can’t wait to take a look when I get home. I’m amazed at how fast your blog loaded on my cell phone .. I’m not even using WIFI, just 3G .. Anyhow, wonderful blog!

  43. Im impressed, I should say. Very hardly ever do I come across a blog thats both informative and entertaining, and let me let you know, youve hit the nail on the head. Your weblog is crucial; the concern is something that not enough men and women are talking intelligently about. Im definitely happy that I stumbled across this in my search for something relating to this issue.

  44. Greetings!What’s up? :p I’m happy that you are still around “the internet” 😛 How did the last Google update affect your site? Just checked your rankings and it seems like you are doing a good job 🙂 Hope you will maintain the quality, just don’t forget about your friends 😉 Bye-Bye :*

  45. Keenan Tassey より:

    Really decent blog post. We simply located ones own site and even wished to help you declare which will We have seriously appreciated examining ones own web site and even discussions. However I’ll end up signing up ones own rss feed and even As i expect to help you read through ones own web site all over again.

  46. niche finder より:

    Great blog!! You should start many more. I love all the info provided. I will stay tuned Top-notch report. Continue to keep up the beneficial work.

  47. Corey Tibbles より:

    It’s some shame you don’t have a relatively contribute button! I’d undoubtedly contribute to that excellent weblog! I just suppose at the moment i’ll take bookmarking not to mention using a Rss towards your Search engine profile. I just take a look forward towards unique upgrades and often will share this unique weblog with the help of your Squidoo crew:

  48. Jeux flash より:

    Hey There. I discovered your blog the use of msn. This is an extremely well written article. I will be sure to bookmark it and return to read extra of your helpful information. Thanks for the post. I will definitely comeback.

  49. Jena Lacz より:

    Pretty superior post. We just discovered ones web page in addition to wanted to help tell you of which We have quite enjoyed reading ones webpage in addition to reports. Anyways I’ll possibly be subscribing ones give in addition to When i wish to help study ones webpage once again.

  50. Wesley Neff より:

    Good subject. I have found a lot a new challenge below. Carry on.

  51. James Zavalza より:

    Fantastic report together with convenient that will realize explanation. How do That i set about gaining permission that will put up element within the content in doing my coming bulletin? Giving good credit ranking to your any article author together with hyperlink into the web page would not manifest as a challenge.

  52. meg43tr44gi joe より:

    The things i have observed in terms of personal computer memory is always that there are features such as SDRAM, DDR and many others, that must match up the technical specs of the mother board. If the computer’s motherboard is kind of current while there are no operating system issues, updating the storage space literally normally requires under an hour or so. It’s among the list of easiest computer system upgrade processes one can consider. Thanks for discussing your ideas in Flashを全画面で表示して、スクロールバーを出す方法|WEB Drawer -WEB制作に関するメモサイト-.

  53. meg43tr44gi joe より:

    I like article Flashを全画面で表示して、スクロールバーを出す方法|WEB Drawer -WEB制作に関するメモサイト-. Thanks for expressing your ideas. I’d personally also like to say that video games have been actually evolving. Modern tools and innovative developments have made it easier to create authentic and fun games. Most of these entertainment video games were not actually sensible when the concept was first of all being tried out. Just like other styles of technological know-how, video games also have had to progress by way of many many years. This is testimony towards the fast growth and development of video games.

  54. Abram Renninger より:

    Enjoy the item approving towards pretty good facts. Simply nondiscriminatory wen upwards! When i often complete definitely definitely not mushrooming/groving/escalating with these although desponding people performed some almost actively buddy-buddy depredate in addition to I’m indubitable a amount of people suavity this fewer regardless.

  55. An intriguing discourse is designer interpret. I think that you should indite solon on this issue, it strength not be a inhibition subject but mostly grouping are not enough to speak on specified topics. To the next. Cheers like your Flashを全画面で表示して、スクロールバーを出す方法|WEB Drawer -WEB制作に関するメモサイト-.

  56. Shoes Clearance より:

    This web site is known as a stroll-through for all of the data you wanted about this and didn’t know who to ask. Glimpse here, and you’ll positively uncover it.

  57. Margarita Tasby より:

    Very fantastic article. As i only just stumbled upon your current blog site and even preferred expressing we need very enjoyed studying your own website blogposts. Anyways I’ll end up following with your blog and even I hope one write-up yet again in the near future.

  58. Is it possible to hide certain blog posts on Blogger? If so, how?. . I know that I can save my post as a draft, or have it scheduled, but what I need is to hide my post for a giveaway but still have certain followers be able to access it through a link.. . So it needs a url in blogger before I actually show all my followers, please help!.

  59. LA Weight Loss より:

    An intriguing communication is couturier annotate. I conceive that you should indite statesman on this message, it mightiness not be a inhibition matter but generally fill are not sufficiency to mouth on such topics. To the succeeding. Cheers like your Flashを全画面で表示して、スクロールバーを出す方法|WEB Drawer -WEB制作に関するメモサイト-.

  60. LA Weight Loss より:

    Excellent goods from you, man. Flashを全画面で表示して、スクロールバーを出す方法|WEB Drawer -WEB制作に関するメモサイト- I have understand your stuff previous to and you are just too fantastic. I really like what you’ve acquired here, really like what you are stating and the way in which you say it. You make it entertaining and you still take care of to keep it wise. I cant wait to read far more from you. This is actually a terrific Flashを全画面で表示して、スクロールバーを出す方法|WEB Drawer -WEB制作に関するメモサイト- informations.

  61. arcopedico より:

    I truly appreciate this post. I’ve been looking all over for this! Thank goodness I found it on Bing. You have made my day! Thx again!

  62. kadry i płace より:

    Does Joomla have a Component that help to create a forum like Yahoo Answers?.

  63. Have eBay suspend your account? I’ve got suspended for absolutely no reason! I misplaced all my revenue, my business has been online centered. I had to find a solution. By the end I am again for real.

  64. Have eBay suspend your account? I am suspended for no reason! I lost all my earnings, my business was online based. I had to discover a solution. By the end I am back again for real.

  65. eurovore より:

    very nice put up, i definitely love this website, carry on it

  66. Hi, You should take part in a contest for one of the best blogs on the web. I will recommend this site!

  67. Wes Lenehan より:

    Hello there! I know this is kinda off topic however , I’d figured I’d ask. Would you be interested in trading links or maybe guest writing a blog post or vice-versa? My site goes over a lot of the same subjects as yours and I believe we could greatly benefit from each other. If you might be interested feel free to shoot me an email. I look forward to hearing from you! Terrific blog by the way!

  68. Love your blog!

  69. free mp3 music より:

    This is my first time I have visited here. I found a lot of interesting stuff in your blog. From the volume of comments on your posts, I guess I am not the only one! keep up the impressive work.

タイトルとURLをコピーしました