CS3 : Sizing A Preloader To The Size Of The Movie Loading?

May 29, 2009

I have a preloader(as3) that is working great, I use FlashVars to pass it what movie it is loading, then it loads that movie, and shows it on the stage after loaded. I would like to make this a bit more dynamic. Right now I can use the same preloader for any movie so long as the movie and the preloader is the same size. I would like to pass the size of the movie im loading to the preloader with flashvars just like im passing it the file path for the movie itself. Here is how im passing the movie:

var swfLocation = this.loaderInfo.parameters.flashPath;
var myRequest:URLRequest = new URLRequest(swfLocation);

now i just access the variable wherever i want to say load the movie

I tried:

var swfHeight = this.loaderInfo.parameters.flashHeight;
var swfWidth = this.loaderInfo.parameters.flashWidth;
stage.stageHeight = swfHeight;
stage.stageWidth = swfWidth;

then in my flashvars i have a value of flashPath=<?=path?>&flashHeight=<?=height?>&flashW idth=<?=width?> (passing these to the embed and object using php btw)

View 2 Replies


Similar Posts:


Document/Stage Size ::- Sizing To Contents Not Making Sense?

May 31, 2009

I have a Flash CS4 document and I am attempting to resize the stage to accomodate its current contents.When I do so, the stage becomes *much larger* than the apparent contents, and I am trying to figure out why. I have literally examined every frame of the animation, and selected every individual object to see if the selection bounds indicate a rogue "large object"...but none indicate this...what sort of things about the contents might cause this that I am missing?

View 7 Replies

ActionScript 3.0 :: Dynamically Sizing A Group Of Textfields Based On Font Size?

Oct 24, 2009

I have made a UI control which contains a bunch of TextFields representing the members of an Array. I draw these un a list like in a combo box's drop down. Currently I hard code the height of the TextFields, iterate through the Array and position the TextFields by adding the hard coded height each time. Simple enough.
But now I would like to put the control in another place where I must use smaller text. So I would like to make the thing general so I can resuse it whenever I want, simply by applying a new TextFormat. My problem is that I want to still be able to position the TextFields accurately regardless of the font size used in the TextFormat. I have tried just creating the TextField, applying the TextFormat, setting the text, and then trying to read the TextField's height, but alas this does not work.
 
what the best way is to find each TextField's height so that I can build my list?

View 3 Replies

ActionScript 2.0 :: Preloader - Size Of Loaded Movie

Feb 27, 2009

I have a main index SWF that preloads an external video SWF... when i test it offline it works fine..when i test it online it doesnt work fine... Weird observation: Online it worked when the external swf was only 10-20 kb But when i tried with bigger file size about 3.5 mb (which is the actual video i want to load), it doesnt work.... on the preloader it says NAN%... Now...could anybody try to explain to me what the hell is going on? I am attaching the Flash files in CS4 and CS3 format...

View 5 Replies

ActionScript 2.0 :: Flash Fluid Layout With Re-sizing And None Re-sizing Movieclip

Mar 30, 2010

I've set the publish settings to 100% width and 100% height and have then added the 'noScale' function into the first frame of my timeline. Here is an idea of what I'm trying to create:

I have three movieclips that are touching the left side of the Stage and want them to touch the left side of the browser but centre vertically. I can do this by adding the 'Stage.align = LC' command, but not sure if this is the right way to go about it.

The movieclip that is on top contains a logo and I want it to have a fixed size. I called the instance name 'logo_mc'.

The movieclip below 'logo_mc' is called 'container_mc' and is a strip of photographs that I need to run from the left to the right side of the browser no matter what the browser size. I need this movieclip to scale proportionally up and down as they viewer resizes their browser so the first photo is touching the left side of the browser and the last picture is touching the right side (without distorting).

The final movieclip is called 'buttons_mc' and is right below the 'container_mc' clip. This movieclip needs to remain a fixed size.

Obviously when the 'container_mc' clip resizes I need the other movieclips to move up and down to stay the same distance above and below the 'container_clip'.

Example of what I am trying to create: [URL]

View 1 Replies

Flash 9 :: Sizing Photos For An Auto-sizing Gallery?

Oct 22, 2008

I want to put together a flash gallery of photography for my photography business. I am very good at Photoshop design, html, css, javascript but I am a novice with flash. I can use it and use some actionscripting but my knowledge is limited.

I see galleries like this one: [URL]

The images expand and contract perfectly as the browser is resized. I am used to having to size pics for the lowest res screens (I design for 1024 width resos's usually).

What size should I make pictures to work like this... Does flash scale them down / up / either... are there quality issues with letting flash manage the sizing.

View 0 Replies

ActionScript 2.0 :: Movie Size Grows The Preloader Will Stall Before Appearing

Aug 8, 2003

I set up a preloader like the one in the tutorial "Percentage Preloader with Load Bar". It works fine until I try to use it on my big movie. After fooling around with it for a while it seems to be messing up progressively worse as the size of the movie grows. For example, with a very small movie, no worries. As the movie size grows the preloader will stall before appearing, that is if I test it with the ctrl+enter ctrl+enter method it won't show up right away, and when it does it will already be at 5% or so. Finally if I make the movie size even bigger (still only 700kb) the preloader won't show up at all. The only thing I could think of maybe was that the bytes_loaded variable is overflowing?.

View 9 Replies

ActionScript 3.0 :: Unable To Sizing When Loading .swf Into An Html For Viewing Purposes?

Nov 27, 2011

I finished my first as3 project that wasn't Hello World and I wanted to send it to a friend. So I put together an .HTML document to load the .swf file but when I open it as a page the game is larger than the displayed area even though my project is 640X480 and the HTML is set to display that (the .swf displays correctly when opened with the stand alone viewer). I also went into the bin/index.html file in my project and edited the height and width from "100%" to "640" and "480" respectively. I have tried adjusting and changing every parameter and value that I could find to try and fix this issue.

View 2 Replies

IDE :: Moving And Re-sizing Movie Clips?

Feb 6, 2009

I'm trying to re-size and move a movie clip using my keys, and I can do it, but for some reason, if I set a really low value to "speed", it won't move to the right or down, but it will move to the left or up, even if very slowly.

It is as if flash has problems in advancing very low values on the positive x and y axis.

Add this code to the first frame:

stop();
var speed = 0.01;
var grow = 3.6;

[Code].....

View 1 Replies

ActionScript 1/2 :: Frame 1 Size Grows Even Though Preloader Is Small File Size

Jun 24, 2011

I made a preloader for my single scene movie and although the preloader is about 16k, when placed into frame 1 of the movie and tested, the frame is shown to have about 256k, which is larger than the movie it's loading.  I've gone through all the files and made sure that export in frame 1 is not checked and made sure the publish settings also are set to export in frame 1.

View 5 Replies

Movie Streams Before Preloader Finishes Loading It?

Jul 11, 2009

I have created a very basic preloader using flash components 'Loader' and 'ProgressBar". It's job is to load an external swf movie clip/file.

Problem: When the preloader has finished doing it's 'thing', i.e. reaches 100%, it loads/or seeming reveals the external movie already underway i.e. not at the first frame.

I've read a few posts from "Whispers", and have concluded that the problem is that the movie is streaming whilst being loaded. And also that i need to be using "init" in regards to 'listener'.

However i really want to be able to apply this to the code i am using it, as i had just kinda gotten to grips with it (the code).

Is anyone able to tell me what a need to alter to get the preloader to finish loading the movie COMPLETELY before it starts to play.

------------
myProgressBar.mode = "manual";
myProgressBar.setProgress(0, 100);
myProgressBar._visible = true;

[Code]....

View 3 Replies

ActionScript 3.0 :: Loading New Movie - External Preloader

Sep 21, 2010

I like to play external preloader before it's load original movie index.swf. But I have a problem on resizing index movie. Sample files on link [URL].

Here is preload AS3 code:
package{
import flash.display.*
import flash.display.MovieClip;
import flash.net.URLLoader;
import flash.net.URLRequest;
[Code] .....

View 5 Replies

ActionScript 3.0 :: Loading Large SWF Files Into A Movie With A Preloader?

Aug 7, 2009

At the moment, I am loading an external SWF file into my movie. The swf file contains a large FLV video... At the moment, I am using the code below, and the video is being loaded into a movie clip with the label "vid1"

_root.vid1.loadMovie("womanonbike4.swf");

The video loads fine. However, because it is such a large video, there is a delay. Can I PRELOAD the video during the main movie's Preloader?

So, my main movie starts, a preloader loads the entire main movie AND the external SWF file (womanonbike4.swf). Then, when the movie gets to the part of the main movie, where the external file is loaded, it will just play!

View 0 Replies

ActionScript 3.0 :: Preloader For Loading Movie Clips With Buttons?

Feb 3, 2011

I've created a movie clip that contains several buttons that each load a separate movie clip when they are clicked. I would like to create a pre-loader for each of the separate movie clips because they will be rather large files when I finish adding content to them.

Below is the code I used to get the buttons load the movie clips. How to incorporate a pre-loader into this code

Code:
//##### My Code
var myLoader:Loader = new Loader();
addChild(myLoader);//first, the loaded clip is added to the stage wl
myLoader.x = 140;//then it is positioned

[Code].....

View 1 Replies

Actionscript 2.0 :: Preloader For Externally Loading Swf Into A Movie Clip?

Mar 13, 2009

I have a main swf file in that i have an empty movie clip in which i want the external swf to load...i made buttons n i have given gotoAndPlay specific frame function for them and... wen it enters that specific frame i have given loadMovie function in actions layer for that specific frame... but i dont know how to make a preloader for that so that it loads the external swf..

View 2 Replies

ActionScript 2.0 :: [FMX] Preloader Loading External Movie Clips?

Jan 29, 2003

I'm writing a preloader to load external movie clips but my function doesn't seem to be working properly. I call the function and it says that 100% is loaded and makes the movie clip thats showing the out put invisible...thats what supposed to happen except for the going to 100% straight away. the percent is being calculated properly but i think that the function is being executed before the new movie even starts to load...i've tried movieClip.onData but it doesn't seem to work..

Well heres the code

Code:
function loader() {
percentClip._visible = true;
targetClip._visible = false;
percent = 0;

[code]....

View 1 Replies

ActionScript 2.0 :: Connecting Preloader - Once The File Is Done Loading, Put It Away And Load A New Movie?

Mar 30, 2008

I have created a preloader, and I want to tell the action script of the preloader once the file is done loading, put it away and load a new movie, or even a new flash file if i have to.here is the action script i have on the loader right now. Its just numbers counting from 1-100% and a .gif clip that plays but they are not connected in any way.

bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;[code]...

Also, my preloader ends on Frame 3 and movie would start on frame 4.

View 1 Replies

ActionScript 2.0 :: [FMX]: Dynamically Sizing A Movie Clip To Match Character Width

Apr 12, 2003

For my menu on my page, I want to do things dynamically. For the drop down menu, I want to have a box around the link when moused over, that changes depending on the number of characters that are going to be placed on it.

[URL]

See how the "tab" around team is smaller than the menu? But GRAPHICS will be larger, and so on.

I'm parsing an XML file to pull in the data for the menu, so I want to handle this portion dynamically as well.

View 2 Replies

Movie Size In FIREFOX Larger Than REAL SIZE?

May 9, 2009

No matter WHAT I have tried.... a sniffer, no sniffer, stand alone on a webpage by itself.This slash file which is in a popup window 600x400 will not display 600x400 in firefox. It always is 20-40 px larger in both directions. I can't take it anymore!! What the hell is the matter with firefox his file is 6 years old for gosh sakes. It works and has worked online for years... so whats the Firefox problem all the sudden I am begging !If I can find a good flash designer who knows php, js, and html well, I am going to have future projects. But this little gem is a good promotional tool.... but the problem is......... FIREFOX wont display it right ! And why does firefox INSIST on putting the location bar in html popup windows! The window is the right size 600x400.... the flash is not... even with dimension definitions

View 1 Replies

ActionScript 2.0 :: Auto-size Vs. Fixed Movie Size

Jun 15, 2004

I wasn't sure where to put this post. I hope this is the right place.

This is what I want to do:

On screen resolutions up to 800x600, I want my Flash movie to resize to 100% width and height of the browser window. On screen resolutions higher than 800x600, I want the Flash movie to be a fixed size (say 800px x 600px exactly).

View 2 Replies

ActionScript 2.0 :: Auto-size Vs Fixed Movie Size?

Jun 15, 2004

I wasn't sure where to put this post. I hope this is the right place.

This is what I want to do: On screen resolutions up to 800x600, I want my Flash movie to resize to 100% width and height of the browser window. On screen resolutions higher than 800x600, I want the Flash movie to be a fixed size (say 800px x 600px exactly).

Is this possible, and if so, how?

View 2 Replies

Flash :: Get The Maximum Width & Height Size Image When Loading Several Images Before Loading Them Completely?

Mar 23, 2011

I am loading images of different size and then images are scaled and border is drawn for each image as shown in below link,[URL]... I want that border of images to be of the same width and height and for that I need to find out the max width and height size image before loading all the images. Is there any way that I can know the width and height of an image before loading it completely?

View 1 Replies

Actionscript 3 :: SWF Tag And Stage Size In Preloader Code?

Nov 10, 2011

I'm trying to get SWFs frame size from preloader code. Please take a look at the example:

[SWF(width='640',height='480',backgroundColor='0xFF00FF',frameRate='60')]
[Frame(factoryClass="MyPreloader")]
public class Main extends Sprite

[code]......

View 1 Replies

ActionScript 3.0 :: Preloader For Bigger File Size?

Aug 29, 2011

How to add preloader for the bigger file size like 10MB. How long will take to load this size?

How people are managing the bigger file sizes?

View 5 Replies

ActionScript 2.0 :: Creating Circular Preloader That Increase In Size?

Dec 14, 2005

I have an animation that is contained within a movieclip. It is an animation of a car traveling round a globe. The car is set to a circular motion guide. I would like to use this as a preloader. What is the best way to get an animation to play in time proportionally as it is loading. i.e the animation finishes when the site loads. If this is not possible what other methods are there to create circular loaders as opposed to linear bars that increase in size.

View 5 Replies

ActionScript 2.0 :: Preloader - Calculating Size Of TXT File And Image

Apr 29, 2008

How to preload this:
I've made buttons which loads external txt files into textBox (HTML render);
Those txt files contains text and pictures, like <img src="..."> (HTML tags);
Also, there are some links like <a href="asfunction:...>
I've made preloader and it displays bytes total for txt files only. Is it possible to make preloader which will calculate the size of a txt file, and the size of image from image tags inside that txt file?

View 4 Replies

ActionScript 3.0 :: External Swf File Loaded By Preloader: Place And Size?

Feb 22, 2011

i try to implement a preloader for my site but i have the following problems:once the preloader is finished it opens my external swf but this one appears below the preloader and very little in the window (almost smaller than my preloader size)

package classes
{
import flash.display.MovieClip;

[code].....

View 0 Replies

ActionScript 1/2 :: Set Specific Size And Position Of Preloader's Empty Movieclip On Main Stage?

May 1, 2009

it's possible to script an external preloader's empty movie clip to be of a specific size and position on the main stage? here's the script i've got for the preloader so far:
 
var my_pb:mx.controls.ProgressBar;
my_pb.mode = "manual";
this.createEmptyMovieClip("Portfolio", 999);
var my_mcl:MovieClipLoader = new MovieClipLoader();

[code]....

View 2 Replies

ActionScript 2.0 :: Fixed Size Loaded Movie In Fullscreen Movie?

Oct 3, 2007

I have a movie that opens up full screen and load an external movie into it. No problem there but I want the loaded movie to keep its original size and not resize with the full screen movie. In the screenshot, you see how the yellow external movie loads into the fullscreen green movie. The white rectangle is only for size reference (photoshopped it in) and is not in the actual flash movies. The yellow movie is supposed to be 800x125 pixels but resizes with the fullscreen of the green movie.

View 1 Replies

ActionScript 2.0 :: Xml Not Loading After Preloader

May 5, 2007

My xml was loading fine until I made a preloader( not made, did it with a tuto).
The preloader is on frame 1 and the xml + all items on my stage are on frame 3.
I traced the xml but it comes out undefined... What is happening ??Do I miss something else to launch my xml loading ? Here is the code for the preloader in case:

stop();
this.onEnterFrame = function() {
var amount:Number = this.getBytesLoaded()/this.getBytesTotal()*100;

[Code]....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved