Actionscript 3 :: Loader Class: Resize External Swf To It's Original Stage Size?

May 12, 2010

Here is my problem (unfortunatelly didn't find solution @google):I'm loading external swf[AS2] into main swf[AS3] using Loader class. The main swf is 800 x 600 and the external swf is 300 x 200.After adding the external swf to the main swf the external swf expands it's size from 300 x 200 to the main swf's size: 800 x 600.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Resize External Swf To Its Original Stage Size?

May 13, 2010

Here is my problem (unfortunatelly didn't find solution @google or in this forum): I'm loading external swf[AS2] into main swf[AS3] using Loader class. The main swf is 800 x 600 and the external swf is 290 x 247. After adding the external swf to the main swf the external swf expands (scale to) from 290 x 247 to the main swf's size: 800 x 600. How can i prevent this? I want the loaded swf to save it's original stage size.

View 2 Replies

IDE :: Resize External Swf Movie To Stage Size?

Feb 5, 2009

What i try to do, is to make a "wrapper" in Flash, in which other swfs could be embedded. (passing the URL of the external SWF by URL) to attach a link to the swfs. (ClickTag - Issue, maybe someone knows this).In the HTML - Code this would look like this:

Code:
<embed src="wrapper.swf" ...>
<param name="filename" value="path-to-external-swf.swf"/>
<param name="clickTag" value="http://www.example.com"/>

The SWF "wrapper.swf" should load the "path-to-external-swf.swf" an puts a onClick - Event on the whole area.That works just fine, BUT The loaded external SWF should always fit to the stage size (like 100% width and 100% height) .My code looks like this:

Code:
// Variables should be passed by URL
_root.filename = "http://example.com/animation.swf";
_root.clickTag = "http://www.example2.com";[code]....

Code:
mClip._width = Stage.width;

When i click on the swf, the movie fits exactly to the stage width...

View 1 Replies

ActionScript 2.0 :: Changing Original External Swf Size In The Main Movie?

Sep 21, 2006

I have an external swf that loads into my main movie using loadMovie. The original .swf that is being loaded is larger than what I'd like to appear in the main movie. Is it possible to tell the movie clip that the external is being loaded into, to reduce the size of the loaded .swf?

note:
I tried a
scaleContent = true;

View 2 Replies

ActionScript 2.0 :: Flash8 - External Swf To Retain Its Size In The Center Of The 800x600 Original Movie

Mar 11, 2009

My original movie is 800x600 and my external swf is 700x525... I'm using the following script on a keyframe... loadMovieNum("123.swf", 1); ... and under normal circumstances this would work fine... however... I need the 700x525 external swf to retain its size in the center of the 800x600 original movie... right now it's edge to edge and showing what's going on 'offstage' in the external swf! What scripting am I missing? I'm using Flash 8 on a Mac.

View 2 Replies

ActionScript 3.0 :: SWF Sound And Make The Flash Stage The Size Of The Original Screen Capture Video Of 1024 X 768

May 24, 2010

Made a swf [URL] some viewers see and hear fine but others are having sound and size issues and I need some practical answers. SIZE: I make the Flash stage the size of the original screen capture video of 1024 x 768 and right now it is set to

[Code]...

View 2 Replies

ActionScript 3.0 :: Resize Stage According To Browser Size?

Oct 18, 2009

I want it to take the whole screen but i dont want to scale it.The elements on the application will change the position according to the stage size,but i dont know how to change the stage size according to the browser size.

View 1 Replies

ActionScript 3.0 :: Resize Stage To Browser Size?

Apr 14, 2010

I'm wondering how to set my stage to resize relative to the size of the user's browser and keep the main movieclip centered.  But I don't want the stage to scale, I want the physical boundaries to get larger without scaling the content.
 
The reason for this:  I have something that we'll call "snow" falling in the background.  When the browser resizes, I don't want the stage to scale and the snow flakes get bigger or smaller, but have the stage show more area for the snow flakes to fall.  I already have the snow flakes falling outside the current stage boundaries, I'm just wondering how to make the stage boundaries extend dynamically to the size of the browsers.

View 3 Replies

ActionScript 1/2 :: Resize A Movieclip To A Stage Size?

Dec 5, 2011

how can I do to resize the size of my movieClip and the content of my movieClip(swf, jpg) to the stage?

View 5 Replies

Actionscript 2.0 :: Resize A Moviclip To A Stage Size?

Dec 5, 2011

how can I do to resize the size of my movieClip to the stage?

View 2 Replies

ActionScript 3.0 :: Dynamically Resize Stage Within Fixed Browser Size?

Dec 31, 2009

i have searched this and many other forums as well as the doc for the answer to this question. I have a flash movie in which I dynamically create a diagram at runtime. The size of the diagram varies, but I need to display it within a fixed size area on the HTML page. What I would like is for the stage to scroll dynamically based on the size of the diagram, but have no scrollbars at all if the diagram fits within the fixed area in the browser.

View 1 Replies

Actionscript 3 :: Fluid Flash Layouts - Get Main Class To Resize To The Browser Window Size

Nov 23, 2009

I'm trying to get my main class to resize to the browser window size. I'm listening on the stage to Event.RESIZE, updating my width/height to match the stageWidth/stageHeight, and drawing a rectangle to show me how big it is. When I resize, it flashes between a small and big size every other time the event fires. The width and height are correct in both cases, but in the "small" case, everything is in a small box.

[Code]...

View 2 Replies

ActionScript 3.0 :: Accessing A Stage Resize Within A Class

Mar 3, 2009

I have a class and the class must adapt itself whenever the stage resizes.

Now something could look like this, but it won't work:

Code:
package {
import flash.events.Event;
public class ResizeClass {

[Code]....

View 3 Replies

ActionScript 3.0 :: Removing A Loader Class Event From The Stage?

Mar 3, 2010

I know using the UI loader when I needed to remove from the stage I used
 
MovieClip(loaderVideoGallery.content).flvPlayer.stop()
 
this time I need to remove a loader class event loader from the stage[URL]... The scenerio is I have 5 externally loaded .swfs that load on different frames on the timeline. When one is playing and another button event listener is clicked the previous video remains on stage. This happens when I go anywhere else in the timeline so I would think I need (removeChild)
 
Wouldn't this have to go in every button listener? If I went from a frame that loads an swf to the the frame that displays the homepage where text is in the place of where the swf was I would need to always have the remove Child event in all other button event listeners am I correct?

View 26 Replies

ActionScript 3.0 :: Adding Multiple Images To Stage Via The Loader Class?

Dec 28, 2009

I want to move my multiple externally loaded images a little each time they are added to the stage along the x axis via the Loader class. It all works - But HOW do I access the added graphic synatically, so i can change its x pos?! Ive tried picLoader.x ... but that's the Loader - NOT the image...??

Code:
private function setPics():void
{
for(var i:int = 0; i < xItems; i++)

[Code].....

View 2 Replies

ActionScript 3.0 :: Load External Swf Using Loader Class?

Apr 25, 2009

I have a flash rotating banner script that I purchased, and wish to incorporate into my homepage. Instead of creating a page with HTML and adding the banner code as a separate object on the page, I wish to load it as an external swf into a movieclip on my stage. This is what the banner looks like:

[URL]

I have a page that I'm redesigning, it's located at:

[URL]

I have a movieclip named load_banner. Inside the movieclip in its own frame, I put in the following code:

Code:
import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;

[Code]....

However when I test it, the images load off to the right hand side of the screen, not centered in the movie clip like I want...

View 11 Replies

Actionscript 3.0 :: Loader Class Not Visually Showing Loaded Object On Stage?

Jan 23, 2009

I have this code in a class:

Code: Select allpackage com.jhoyt{
import flash.net.URLRequest;
import flash.events.*;[code]....

and I have this code on the timeline of the movie its being loaded into:

Code: Select allimport com.jhoyt.SSIlaunch;
var ssi:SSIlaunch = new SSIlaunch();
addChild(ssi);

I know its loading because I can put trace actions into the addAndPoint function and it gets called. what can I do to make it display?

View 3 Replies

ActionScript 3.0 :: Loader Class Not Visually Showing Loaded Object On Stage

Jan 23, 2009

I have this code in a class:

[Code]...

I know its loading because I can put trace actions into the addAndPoint function and it gets called. what can I do to make it display?

View 1 Replies

ActionScript 3.0 :: Preloader For External SWF Loaded Via Loader Class

Oct 15, 2010

I'm hoping to implement a preloader on a main.swf that measures the bytes etc loaded in an external.swf. My two concerns are that 1) this just isn't possible? 2) I can't have multiple preloaders on the main.swf, which I would if I used one for the external .swf. I intend to try and explain this in the best way I can what I have done so far, as I personally feel this is quite a complex task.

Here's the basics:
I have an external .swf file, being loaded, using the following Action Script (3), in what I shall call, main.swf:

//---loader---
var swfLoader:Loader = new Loader();
addChild(swfLoader);
var swfURL:URLRequest = new URLRequest("nameofswftobeloaded.swf");
swfLoader.load(swfURL);
function loadHandler (event:Event){
var thumbsPanel:MovieClip = event.target.content;
addChild(thumbsPanel);

This works fine. The Action Script I use after this simply allows me to control the external .swf from the main .swf so isn't necessary.. I finish the loader, with this:
"swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadHandler);"
So, this all works fine. However, as the external .swf contains images, it doesn't load instantly. I therefore need some kind of preloader to show how much of the external .swf is loaded. However, I tried placing this in the external .swf itself and it failed miserably - for some reason it basically didn't preload and the completed phase of the preloader just appeared.

View 1 Replies

ActionScript 3.0 :: External SWF Loaded Accessing Loader Class?

Feb 2, 2010

I have a Main.fla (with Main.as as document class) that calls the external SWF (which has its own document class too)

ActionScript Code:
function startLoad() {
mLoader = new Loader();

[Code]....

Another question. Is it possible to do some kind of listener? Example, I call this external swf, and if the user press a button inside this external swf, this button triggers the listener on the Main.as? Something like running an external mini game, and wait for the results/hiscore.

View 0 Replies

ActionScript 3.0 :: Loader Class Pulls In External Information?

Apr 30, 2010

I have a question about the loader class.I was reading some of the documentation on the follow web page:http:[url]....And I didn't get very far before I had my first question about how the loader class pulls in external information:

Quote:The loaded display object is added as a child of the Loader object.

Question one: By "display object" they are referring to your external content (.swf / .jpg / .mp3) correct?

Question two: "is added as a child of the Loader object" Dose this mean that you could define one instance of the loader class, and then have several URLRequests that plug into that one loader class.So in other words can you have multiple forms of content from different directory's being loaded through ONE loader class instance?I'm a visual person so I mapped my current understanding of this process in the follow Img.

View 2 Replies

ActionScript 3.0 :: Custom Loader Class - Loading External SWF In FLA

May 17, 2009

I've been trying to figure this out for the past couple of days and couldn't find a solution and Im sure its something I have completely overlooked on my part. I'm attempting to load in an external swf in my fla file using this custom loader class I created. I keep receiving this error in an attempt to load the swf, which is in the same directory as my fla file that is loading it:

TypeError: Error #2007: Parameter url must be non-null.
at flash.display::Loader/_load()
at flash.display::Loader/load()
at com.proj.load::SWFLoadClass()
at test_fla::MainTimeline/frame1()

Code from SWFLoadClass.as:
package com.proj.load {
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.display.MovieClip;
[Code] .....

Code in fla file:
import com.proj.load.SWFLoadClass;
var l:SWFLoadClass = new SWFLoadClass("colorPicker.swf", 0, 0);
addChild(l);

View 1 Replies

ActionScript 2.0 :: Resize Stage To Dynamically Match External Movieclip Loaded Into Empty?

Nov 15, 2004

Does anyone know how I can resize the stage to match the size of an external graphic/movieclip which is loaded into an empty movieclip

View 3 Replies

IDE :: Forcing The Display Size Of An External Swf On The Stage?

Oct 12, 2009

For my AS3 website, I want to have different buttons at different points in the timeline which load and play external swf videos. These swfs would ideally be displayed on the stage at the actual height and width of the video rather than in a new window.

The swf files themselves will be generated using a third party video player, which wraps itself around an external FLV creating a nice self-contained swf video player (the generated swf contains the player and the video).

The problem is that the third-party video player i'm using ALWAYS displays the loaded swf at the full size of the stage and not the actual size of the swf video. So when the user hits the button to load and play the video, the swf video fills the stage leaving the user no way back to the website.

Also if I use _blank to open it in a new window, it fill the entire browser window.Is it possible to force the width and height at which an external swf is displayed on the stage and if so could some guru give me a code sample to use? It doesn't need to be dynamic according to the swf dimensions, as these will be the same for all videos.

Below is the code I'm using at this point to call the swf:-

var Xpos:Number = 0;
var Ypos:Number = 0;
var swf:MovieClip;
var loader:Loader = new Loader();
var defaultSWF:URLRequest = new URLRequest("swfs/eyesClosed.swf");

[code]....

..it compiles but I don't see the swf at all, whereas if I don't set the width and height it appears. I've changed the width and the height within these variables but the swf never displays unless I remove swfwidth and swfheight from my code.

View 1 Replies

ActionScript 3.0 :: Get An Object To Increase In Size The Lower It Goes Down The Stage And Decrease In Size The High It Moves Up The Stage?

Dec 29, 2009

I'm trying to get an object to increase in size the lower it goes down the stage, and decrease in size the high it moves up the stage.

It only needs to increase or decrease by a small amount. Basically, it's for a game character. To ad realism to his movements, it would be nice to have this feature.

This is where i'm up to so far:

Code:
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;

[code]....

I think I need something like:

if (object moves up)
decrease
else if (object moves down)
increase

View 6 Replies

ActionScript 3.0 :: Show Image Quality As Like Original After Resize

Sep 27, 2011

I am working on a Action Script3 project and I am showing images after resizing. I am using Bitmap and BitmapData manipulation for this but not getting image quality as like original image.

View 4 Replies

ActionScript 3.0 :: External XML Images Display Into MovieClip Using Loader Class?

Jun 19, 2010

I am trying to load images from external XML files, and display on a movieClip name thumb_mc, The following codes will generates a list of buttons using button_mc, my task here is to add a thumbnails to each button from each record of xml.I have added below codes in red, However, what I am getting is the thumbnails are overlapping each other. What should I do to make it display on the thumb_mc on each button?

Code:
public function showXML(e:Event):void {
XML.ignoreWhitespace = true;
xml = new XML(e.target.data);//loading the xml[code]....

View 1 Replies

ActionScript 3.0 :: Loader Class To Load In Multiple External SWFs?

Mar 9, 2009

In AS3 i am using the Loader class to load in multiple external SWFs (AVM1), each of which has a short animation which automatically plays when the swf is I obviously cannot control the timeline of these (i can't use local connection etc) but would like to load in the *.swf files, so they're in memory then add them to the stage when requested. the problem is that if i load them enmass. then use addChild when they are called, they have already played through and animated pre the addChild command.

(I cannot edit the swfs at all, and would rather not load them on demand at runtime)

View 5 Replies

ActionScript 3.0 :: Forcing The Display Size Of An External Swf On The Stage?

Oct 12, 2009

I want to have different buttons at different points in the timeline which load and play external swf videos. These swfs would ideally be displayed on the stage at the actual height and width of the video rather than in a new window.The swf files themselves will be generated using a third party video player, which wraps itself around an external FLV creating a nice self-contained swf video player (the generated swf contains the player and the video).

The problem is that the third-party video player i'm using ALWAYS displays the loaded swf at the full size of the stage and not the actual size of the swf video. So when the user hits the button to load and play the video, the swf video fills the stage leaving the user no way back to the website.Also if I use _blank to open it in a new window, it fill the entire browser window.Is it possible to force the width and height at which an external swf is displayed on the stage and if so could some guru give me a code sample to use? It doesn't need to be dynamic according to the swf dimensions, as these will be the same for all videos.Below is the code I'm using at this point to call the swf:-

var Xpos:Number = 0;
var Ypos:Number = 0;
var swf:MovieClip;[code].....

..it compiles but I don't see the swf at all, whereas if I don't set the width and height it appears. I've changed the width and the height within these variables but the swf never displays unless I remove swfwidth and swfheight from my code.

View 2 Replies

Actionscript :: Flash Game - Pass Loader Class Object To External Swf

Sep 8, 2011

I am really pulling my hair out with this one. Flash game, container swf loads a img using the loader class. The image is the map which will be used on the levels. The problem im having is that I originaly had each level load the map image, convert to a bitmap, and us it to create x and y's for colision detection.

the problem was that the game was loading and sometimes the map image hadent loaded. It also ment that each level was loading the same image and if the above happened on the 3rd, 4th level it was very annoying. So I need a way to load the image in the parent, but have it available to the child, however it must be available as at bitmap to work.

[Code]...

View 1 Replies







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