Solved

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

Posted on 2010-11-22
5
552 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
ID: 34198460
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
ID: 34201457
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
ID: 34209742
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
ID: 34213330
Yes you can, but you have to put the above code into the loaded movieclip
0
 

Author Closing Comment

by:colorrot
ID: 34307576
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

778 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