Solved

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

Posted on 2010-11-22
5
551 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can't play a movie website which used to be playable 4 623
Flash player plugin 13 7 324
Flash player 17 install script .bat or .vbs 9 529
Adobe Presenter not Publishing Slide Theme 17 120
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
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 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.

895 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

14 Experts available now in Live!

Get 1:1 Help Now