Solved

External movie clip load full-screen within browser (not true full-screen)

Posted on 2010-11-22
5
550 Views
Last Modified: 2013-11-11
I have a splash screen that has two buttons. Depending on what buttons you press, I want an external moving clip to load as large as it possibly can within the browser (liquid/dynamic scaling), but it still also must be proportion.

After the clip loads and plays, it will automatically unload and takes you back to the stage. I can get the clips to automatically unload, but I have no idea how to get them to scale as large as they can be.

Is it script I have to add to to the clip being loaded or to the main stage? I'm lost on this one.
0
Comment
Question by:colorrot
  • 3
  • 2
5 Comments
 
LVL 3

Expert Comment

by:ayanaculis
Comment Utility
I have found that it's easier to add the code to the clip being loaded. Does your loaded MC's have an image background or do you want to just position the elements?
0
 

Author Comment

by:colorrot
Comment Utility
There is no background to the external clip - it's exactly the size of the stage.

Do you know what code I would use for that clip to automatically scale full-screen (within the browser)?

Right now I have a button which opens a new HTML page where it does expand full-screen  and then automatically loads into my main html file containing my main stage swf. I would just like to be able to streamline the whole site so there's only one html file and you don't jump around.

This is what I have in the HTML file that makes the external clip play full-screen right now:

<body bgcolor="#000000" scroll='no' LEFTMARGIN='0' TOPMARGIN='0' MARGINHEIGHT='0' MARGINWIDTH='0'>
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<script language="JavaScript" type="text/javascript">
      AC_FL_RunContent(
            'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
            'width', '100%',
            'height', '100%',
            'src', 'CRS',
            'quality', 'high',
            'pluginspage', 'http://www.adobe.com/go/getflashplayer',
            'align', 'middle',
            'play', 'true',
            'loop', 'true',
            'scale', 'showall',
            'wmode', 'window',
            'devicefont', 'false',
            'id', 'CRS',
            'bgcolor', '#000000',
            'name', 'CRS',
            'menu', 'true',
            'allowFullScreen', 'false',
            'allowScriptAccess','sameDomain',
            'movie', 'CRS',
            'salign', ''
            ); //end AC code
</script>
<noscript>
      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="100%" height="100%" id="CRS" align="middle">
      <param name="allowScriptAccess" value="sameDomain" />
      <param name="allowFullScreen" value="false" />
      <param name="movie" value="CRS.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />      <embed src="CRS.swf" quality="high" bgcolor="#ffffff" width="100%" height="100%" name="CRS" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
      </object>



0
 

Author Comment

by:colorrot
Comment Utility
I been able to make a background movie clip scale liquid within the browser, via using this code:

 
Stage.scaleMode = "noscale";
//----- Background Scale --------
var StageWidth = 950;
var StageHeight = 576;
function scaleBackground()
{
   if (Stage.width > Stage.height) {
      background._width = Stage.width;
      background._yscale = background._xscale;
   } else {
      background._height = Stage.height;
      background._xscale = background._yscale;
   }
   background._x = (StageWidth - background._width) / 2;
   background._y = (StageHeight - background._height) / 2;
}
Stage.addListener(this);
this.onResize = scaleBackground;
scaleBackground();

Open in new window


I'm wondering if I can somehow use a loader or an external movie clip loader the same way. The clip would load on top of everything else, then unload itself. I thought I would of had it in the bag with this code, but I can't seem to get it to work for some reason.
0
 
LVL 3

Accepted Solution

by:
ayanaculis earned 400 total points
Comment Utility
Yes you can, but you have to put the above code into the loaded movieclip
0
 

Author Closing Comment

by:colorrot
Comment Utility
The only thing that should also be noted, is that in line 7:
if (Stage.width > Stage.height) {

should be

if (Stage.width < Stage.height) {

otherwise the clip might get clipped at the top and the bottom .
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Best way to Display MP4 Video 5 306
Does Flash have a Firefox problem? 5 307
IE 11 Flash Player issue 7 228
Action Script coding 1 170
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to how to record live broadcast.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now