?
Solved

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

Posted on 2010-11-22
5
Medium Priority
?
559 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1600 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses

771 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