Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

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

Posted on 2010-11-22
5
Medium Priority
?
560 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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 last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
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.

647 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