SOLVED: CMSMS full-browser flash impossible? (no, very easy, actually!)

General project discussion. NOT for help questions.
Post Reply
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

SOLVED: CMSMS full-browser flash impossible? (no, very easy, actually!)

Post by nate22 »

This is something which needs to be fixed. If I am wrong, please tell me, but make sure you try to do it first.
If you follow the details below using CMSMS, you will not be able to fill the browser with your Flash movie. It might fill 100% height, but that is not the same as filling the entire window.

From SWFObject FAQ: http://code.google.com/p/swfobject/wiki/faq

1. How can I create a SWF that will encompass 100% of the browser window?

The following technique is also known as Full Browser Flash:

  1. Set both the width and height of your SWF to 100% in your SWFObject definition
  2. Include CSS to get rid of any default margins/padding and set the height of the html element, the body element and the entire chain of block level HTML elements that your SWF will be nested in to 100%, because Firefox (or: any Gecko based browser) in standards compliant mode (or: using a valid DOCTYPE) interprets percentages in a very strict way (to be precise: the percentage of the height of its parent container, which has to be set explicitly):

     
        html, body, #containerA, #containerB { height:100%; }
        body { margin:0; padding:0; overflow:hidden; }
     

  3. Manage the scaling and alignment of your SWF and the positioning of your SWF's elements, within your ActionScript code, e.g.:

      stage.scaleMode = StageScaleMode.NO_SCALE;
      stage.align = StageAlign.TOP_LEFT;

      stage.addEventListener(Event.RESIZE, resizeHandler);

      function resizeHandler(event:Event):void {
        // center stuff
      }

NOTE: For positioning elements always define a resize handler, because a user can resize the browser window and in Internet Explorer (using the dynamic publishing method) the stage size is only available on first load. When reloading or revisiting a page it will initially be 0, causing the Flash player to keep on triggering the stage.resize event until it receives its current value

Three code examples can be found in the SWFObject test suite:

    * Static publishing: [ http://www.swffix.org/swfobject/testsui ... flash.html ]
    * Dynamic publishing: [ http://www.swffix.org/swfobject/testsui ... flash.html ]
    * Dynamic publishing including min-width, min-height and scrollbars: [ http://www.swffix.org/swfobject/testsui ... h_adv.html ]
Last edited by nate22 on Thu Jun 26, 2008 4:53 pm, edited 1 time in total.
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: CMSMS full-browser flash impossible?

Post by nate22 »

^ and when I said "this is something that needs to be fixed" I wasn't being demanding or bratty.

I meant it more as a tech note.

If I had a clue how to program, I'd probably make a patch and offer it to the community.
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: CMSMS full-browser flash impossible?

Post by kermit »

temporarily remove **ALL** your CSS (default or otherwise) and replace with
http://yui.yahooapis.com/2.5.2/build/reset/reset.css
and see what happens.

for further testing purposes.. and to illustrate your precise problem..
you really do need to provide a working link to your site and/or page...
no one can help you otherwise...
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: CMSMS full-browser flash impossible?

Post by nate22 »

According to the SWFObject FAQ's, the code they supplied is all you need to get full-browser flash. If you copy and paste their code where they tell you to, you should have full-browser Flash. So, the extraneous CSS should not be necessary. But, I will try it anyway. thanks.
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: CMSMS full-browser flash impossible?

Post by nate22 »

Sorry, it wasn't solved after all.

Smarty templates has serious issues with SWFObject full-browser Flash.

I can't tell you any more than that because I don't understand what the problem is well enough. I followed SWFObject instruction line for line.
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: CMSMS full-browser flash impossible?

Post by nate22 »

So I take it nobody here has actually implemented a full-browser Flash page with CMS MS except me?

It's a pretty big problem. Try to convince your clients they don't need the splash page (shouldn't be too hard in this day and age) or make sure it's not part of CMS MS. If CMS MS is in your root directory, you're pretty screwed because the splash needs to be on the index.php page.

The other problem besides general incompatability with CMS MS is if you've got Full-browser Flash, you really don't need any content on that page, but CMS MS defaults to one content block. I've been typing a single space in it just so it will publish. I don't think that it hurts anything, but it sure can't help.
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: CMSMS full-browser flash impossible?

Post by kermit »

new cmsms site template:

Code: Select all

<__html>
<head>
<title>{sitename} - {title}</title>
{metadata}
</head>
</__body>
{content}
<__body>
</__html>
do not associate a stylesheet with this new template. new page for your flash. assign it the above template. put any scripts and junk you need to in the page's metadata. turn the editor (tinymce) off and insert your flash tag (and only that) into the page content.

if this don't work, then you've got other issues besides cmsms.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
viebig

Re: CMSMS full-browser flash impossible?

Post by viebig »

well, its possible!

check http://www.restaurantekinoshita.com.br

fllow the link below this post to my Object Tag, forget about SWFObject
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: CMSMS full-browser flash impossible?

Post by nate22 »

Thanks, you guys! I have been spending way too much time trying to figure this out.

It is nice to see the Object Tag just came out June 17, 2008, so I'm not TERRIBLY behind the times.

I'm going to try both of the above example and if they both work, I'm adding them to my notes for future tuturials.
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: CMSMS full-browser flash impossible?

Post by nate22 »

SOLUTION: (easy as hell, too!)
Kermit , that is the easiest solution I've ever seen, but it does give me a small white border around the whole SWF. I put the {stylesheet} tag back in and added some style to remove all padding and margin and voila! Perfect! You've shown me something I didn't realize was possible-- you CAN remove half the stuff in a default template and it won't break anything.  ;D ;D ;D
Last edited by nate22 on Thu Jun 26, 2008 4:52 pm, edited 1 time in total.
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: CMSMS full-browser flash impossible?

Post by nate22 »

viebig wrote: well, its possible!

check http://www.restaurantekinoshita.com.br

fllow the link below this post to my Object Tag, forget about SWFObject
This worked least of all with nothing showing up whatsoever.

Kermit's version turns out to be simplest. You just have to go and add a style sheet to turn off the white border all around the SWF (padding/margin).
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: CMSMS full-browser flash impossible?

Post by kermit »

nate22 wrote: small white border around the whole SWF.
body of a page has a small margin by default....
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Post Reply

Return to “General Discussion”