ActionScript 3.0 :: Stage Access Of Externally Loaded Swf's?

Aug 27, 2009

I have a Flex project where I am loading in 3 external swf's. Each of these swf's represent their own projects, each with its own stage. In each of these sub-projects I reference their stage from within, but this does not work once they are loaded into the Main.

I eventually got the contents to display, realizing that stage will return null unless ADDED_TO_STAGE is complete in externally loaded swf's. Unfortunately the way I did it, I am now adding to the Main's stage instead of the swf's stage.

Code:
public static var mainStage:Stage;
public function Program()
{

[Code].....

I assuming that even though i'm in Program.swf, this.stage is still referring to the parent swf?

View 3 Replies


Similar Posts:


Access Main Swf X,Y From Externally Loaded It?

Jan 7, 2010

I have a site that I'm working on that I am loading an external swf page into a main one. The main one is based on a totally liquid state and stretches the background to fill the browser and the components are relatively position based on browser window dimensions.

Now inside of the main swf I load an external swf through the loader command. This swf has a set dimension and stays centered in the stage.

I am trying to make a button in this swf that loads yet another swf that is stretches the full browser. However I do not know how to access the properties of a main swf from this external one, or if this is even possible.

View 3 Replies

ActionScript 3.0 :: Access Library Of Externally Loaded Swf?

Jan 17, 2010

I have a swf file which contains in its library couple pictures.After it is loaded using preloader I would like to be able to create couple instances of them and add them to the stage

If I use swc approach and import it in library path I can not preload it but instancing is very simple i.e [code]...

View 4 Replies

ActionScript 3.0 :: Access Mc Instance Of Externally Loaded Swf?

Sep 15, 2010

can anybody tall me how to access mc instance of externally loaded swf? in my as3 file i am trying to stop the animation of externally loaded swf. for that i have loaded the swf into mc sau current mc and i am trying to stop the swf by

currentmc.ballmc.stop();

where ballmc is the mc animation of the externally loaded swf.

View 2 Replies

ActionScript 3.0 :: Access Variables Of Externally Loaded Swf?

May 12, 2011

I'm loading external swf's in a main swf, which are contained into a container "thisMC" which is a movieClip.

Now I've got various variables in these external swf's and I want to access these variables into my main swf.

eg - var myString:Variable = thisMC.myNumber;
trace("Whats the value "+myString);

o/p Whats the value undefined.so if myString is a variable that i've defined in the main swf and myNumber is a variable defined in the external swf, if I try accessing it like this , this is what I'm getting.

View 3 Replies

ActionScript 3.0 :: Access MC Instance Of Externally Loaded SWF

Sep 15, 2010

How to access mc instance of externally loaded swf? In my as3 file I am trying to stop the animation of externally loaded swf. For that I have loaded the swf into mc sau current mc and I am trying to stop the swf by
currentmc.ballmc.stop();
Where ballmc is the mc animation of the externally loaded swf.

View 1 Replies

ActionScript 3.0 :: Access Code Of An Externally Loaded Swf?

Nov 17, 2011

I know in AS2 I could do this pretty easily .. But am unsure of the syntax approach of AS3.

I want to have a main movie which will load in an external swf, which has AS code in its timeline. Then I wish to access the functions inside this external swf and control them from the 'controller' swf (the main movie).[code]...

View 4 Replies

ActionScript 3.0 :: Access Textfield Text In Externally Loaded Swf?

Jan 7, 2010

I have an external swf file 'testSWF'loaded into a UILoader 'myLoader2'. The external swf has a textfield 'myText'. I want to retrieve the text from this external swf textfield into another textfield 'parentTextField' in my parent flash file. I can't work out how to do it, and I can't find a simple example.

[Code]....

View 1 Replies

ActionScript 2.0 :: Access Or Attach A Movieclip Of Externally Loaded Swf?

Dec 28, 2006

I'm doing a flash site and it is now in it's critical stage. I have a main movie where i have links to different different sections wich have been loaded usind loadMovie concept. Now i have one requiremnt to access to attach a movieclip from a externally loaded .swf . My problem also will be solved if i can access a purticular scene of a external swf or purticular frame( level) of the loaded .swf.

Note: I want to jump to a purticular frame of one externally loaded movie when i click on button in the _root movie.

View 6 Replies

ActionScript 3.0 :: Accessing Stage Of Externally Loaded Swf?

Jul 22, 2009

I am loading an SWF created in Flash CS4, using the 3d translation tool.The SWF is being loaded into an application being build in as3 in flex builder 3.I can manage to load the movie however the stage has disappeared. All of the objects that exceed the boundaries of the (banner) remain visible instead of being cropped by the stageI attempted to mask the swf before publishing which did not work, and I attempted to programmatically assign a mask once it was imported which also did not work.None of these options threw errors, in most cases they either had no effect whatsoever or the movie simply disappeareI've read numerous posts on this and the answers always seem to be vague.Based on my research I need to access the stage properties of the SWF being loaded, but am unsure how to go about it.Do I need to compile the movie, export a swc and add it to the build path for the project?Do I HAVE to use a document class for the SWF I want to load in order to access it?Do I need to add anything else to the source or build path for the project in Flex Builder?

View 5 Replies

ActionScript 2.0 :: Get The Stage Dimensions Of An Externally Loaded Swf Through Moviecliploader?

Feb 9, 2009

Code:
var container:MovieClip = createEmptyMovieClip("container", this.getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);[code]....

This always traces the width/height of the content of the external crossball.swf file, not its stage dimensions. So let's say crossball.swf has a document size of 200 by 200 pixels and in it is a shape of 115 by 30 it will trace the last as the width/height of 'container'.Is there any way to get the stage dimensions of an externally loaded swf through moviecliploader?

View 1 Replies

ActionScript 3.0 :: Cropping Externally Loaded SWF To Stage Bounds?

Jul 27, 2009

When using the Loader class to load an external SWF into another timeline and then displaying that SWF using addChild on the loader.content, one discovers to one's consternation that elements positioned off the stage of the external SWF are still displayed.To illustrate this with an example: suppose you have a 500x500 pixel "main" SWF, and it loads an external SWF at runtime and positions it in the center of the stage. And suppose that this external SWF's document properties set the stage width to 200 x 200 pixels. However, when authoring this external SWF, we draw a box that's 300 x 300 pixels, so part of this box is actually off-stage.

When you play the external SWF in the standalone Flash player, it is sized correctly at 200 x 200 pixels, and the rest of this box is cropped off.When you load this external SWF into the "main" SWF and use addChild() to put it on the stage, you will see the full 300 x 300 pixel boNow of course, we can simply solve the issue using a mask, but I'm wondering whether there's a more elegant solution that's built in, either to the MovieClip or the Loader or the LoaderInfo classes. Something that says "respect the document bounds of the original SWF" or "crop to stage dimensions".

View 1 Replies

Actionscript 3 :: Externally Loaded Swf To Control Stage And MovieClips And Their Children?

Mar 10, 2012

I have 2 swf files. One is loaded and loading an externally loaded swf into it.Here is the code in the first loaded swf: #1

var logo:Loader = new Loader();
logo.load(new URLRequest("images/Logo.png"));
logo.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadLogo);
function LoadLogo(e:Event):void

[code]....

EDIT:I am having major SANDBOX issues now when I make the clip load from an external URL. I am also coding for an ANDROID using FLASH CS5.5. Its not allowing me to use Security.allowDomain("*");

View 1 Replies

ActionScript 3.0 :: Each Frame Has Externally Loaded Text With Associated CSS Error "Cannot Access Property Or Method Of Null Object Reference"

Jun 9, 2011

I have a movieclip with two frames. Each frame has externally loaded text with associated CSS. The first frame works fine. However, when I click the button that takes me to frame 2 I get this error:

[Code]...

View 4 Replies

Flash - How Can The Swf Access Stage Properties From The Swf That Loaded It

Feb 10, 2012

If I have a swf that's being loaded into other peoples' swfs (which I have no control over) is there any way I can get properties from the stage (such as height, width, fullScreenHeight, etc.) or does this have to be exposed by the loading swf?

View 1 Replies

ActionScript 2.0 :: Preloading Flashvars - Ensure That All The Content Being Loaded Externally Is Loaded Before The Transition Plays?

Aug 30, 2005

I am in the process of building a site for an Architect... Jamie Fobert Architects (projects) I am useing transitions between the projects and am loading details/text and images externally through flashvars, php and a mySQL database. Within my transitions I have a a preloader on the forst 2 frames the code is as follows (taken from a Voetsjoeba tutorial):

[Code]....

This works pretty well if the content is within the .swf, but when it is loaded externally it doesnt preload it at all. Does anyone know how I can adapt/improve this preloader? or somehow ensure that all the content being loaded externally is loaded before the transition plays?

View 2 Replies

ActionScript 2.0 :: Externally Loaded Swf Does Not Stay Loaded?

Feb 16, 2006

I am loading an externally loaded swf that uses a mask to transition in. When the user clicks a different button I am doing a gotoAndPlay that goes to a mask that "unloads" the content (it doesnt actually unload the info is just outside of the mask area. As soon As I jump to that section the movie is no longer loaded and just shows the container clip that I had created for it. The Container Clip is never changed and is the same throughout the whole process. The only thing that changes is the mask animation.I have tried both loadClip and loadMovie but no luck on keeping the clip loaded.

EDIT - I have narrowed it down. When I change the mask movieclip the movie unloads for some reason. Is there a way I can keep it loaded?

View 2 Replies

Flash :: Access Dynamically Loaded Movieclip (stage > Scrollpane > Myloader > Movieclip)?

Oct 16, 2011

what I'm trying to do is accessingsnapText = scrollPane.source.textSnapshot;from an external swf. I've tried:

trace("-->: "+scrollPane.source.textSnapshot.getText(0, 1000));
trace("-->: "+myLoader.content.textSnapshot.getText(0, 1000));
trace("-->: "+mc.textSnapshot.getText(0, 1000));

[code].....

View 3 Replies

ActionScript 3.0 :: Access A Sprite On A "loaded" Swf From Parent Stage?

Aug 5, 2009

I am creating a Flash training app that includes a glossary. You click a button and the glossary opens. The glossary loads thus:

PHP Code:

var request:URLRequest = new URLRequest("glossary.swf");
var loader:Loader = new Loader()
loader.load(request);
swfCont.addChild(loader); 

The glossary has a scrollbar, and that scrollbar has this listener (among other things):

PHP Code:

scrollbar.addEventListener(MouseEvent.MOUSE_UP, stopScroll); 

Once the glossary is loaded into my app, if I do a MOUSE_DOWN on the scrollbar and then drag the mouse away from the glossary, onto the parent stage, then when I do a MOUSE_UP on the parent stage, I need to dispatch a new MouseEvent.MOUSE_UP event to the scrollbar in the glossary swf.

How do I access the scrollbar of glossary.swf in my dispatchEvent? In other words, in the following code in the parent:

PHP Code:

stage.addEventListener(MouseEvent.MOUSE_UP, glossarySBMouseUp);
function glossarySBMouseUp(me:MouseEvent):void {
xxx.dispatchEvent (new MouseEvent(MouseEvent.MOUSE_UP));

View 2 Replies

Actionscript 3 :: Stopping An Externally Loaded Swf From "playing" When Another External Swf Is Loaded?

Nov 8, 2011

I have a homepage with five "links" to each swf. Now the first swf I have a custom cursor that hides the mouse. When I click on that link it plays and when I quickly go to the homepage again it hides the mouse there when it's not supposed to do it.

Same with every other link. When I was busy with the first swf and want to go to the last swf of the five, my mouse just disappears! It is almost as if it keeps on "playing" without seeing the swf...

Here is the code that I have so far!

var currentpage:uint = 0;
//one loader object per project:
var loadingobject1:Loader = new Loader();
loadingobject1.x = 445;

[Code]....

View 1 Replies

Resizing Externally Loaded SWF?

Dec 23, 2009

i'm having some "big" issues with what seems like a pretty easy flash concept. But, im pretty green when it comes to coding in flash.

I have a SWF thats being externally loaded into another SWF file (see code below):

on(release) {
loadMovie("test1.swf",_root.dropZone);
}

(If i'm understanding the above code correctly...its loading the SWF into a blank MC i created called dropZone) This part seems to work correctly when tested.

I've got 4 different SWF's that need to be loaded seperatley when its coresponding button is clicked. The issue arises when I import the external SWF file...it resizes itself to the size of the flash stage. I need all the SWFs to be loaded and remain there original size (1257x847) or be scaled to the correct size. Then if I click another button it should load the new SWF and "unload" the old SWF.

View 3 Replies

Loader For Externally Loaded SWF?

Dec 2, 2009

if a loader can be added to let the user know the video is being loaded rather than a blank 20-30 seconds...

View 18 Replies

Xml :: Order Of Externally Loaded Swf?

Feb 10, 2010

I'm loading swf's via an XML file. I'm wanting them to be added onto the stage in the same order that they appear in the XML. The problem that I'm having is that they are added to the stage only when they are fully loaded.

This is my xml (_config.xml)

<campaign>
<component SWFsource="logo.swf"/>
<component SWFsource="gallery.swf"/>

[code].....

View 3 Replies

IDE :: Loader For Externally Loaded SWF?

Dec 2, 2009

I have a fairly chunky swf that I am loading through the loadMovie function. Just wondering if a loader can be added to let the user know the video is being loaded rather than a blank 20-30 seconds...

View 1 Replies

ActionScript 3.0 :: Remove .flv From Externally Loaded .swf?

Aug 7, 2009

With the assistance of a very kind member of this forum, I have got as far as getting an .FLV to load into my API via its own .SWF.

[URL]

click on "Animalia - Verse from the Zoo" to load the VideoPlayer .swf which contains the .FLV

I will add more functionality when I've solved this. Now that I have a Video Player which closes, the next set of hurdles to overcome are these:

Click "Close" with the .FLV playing and the sound keeps playing because the .FLV is still playing. Click "Close" with the .FLV paused and when you call the player back, it plays from the same spot. So, my tiny brain says it's an "add/removeChild" issue. Obviously when happy user clicks "Close" and then re-loads by clicking "Animalia", happy user wants the video to play from scratch. That's what I want, anyway. Not from where it left off after clicking "Close". I've made several attempts at adding a "remove FLV" object to the function and Event Dispatch method, but what I did is wrong because the code I put in removed the .FLV permanently and when you call the player back by clicking on "Animalia", the .FLV does not play at all. I'm going round in circles looking for the correct NetStream/removeChild/unload.nsplay/etc/etc .. AS3 coding and where to put it.

My .FLV video load object on "NewPlayer.swf" is:

var myVideo:Video = new Video(360, 264);
addChild(myVideo);
var nc:NetConnection = new NetConnection();

[Code].....

My questions is:- What is the correct coding to get the VideoPlayer .swf to unload its .FLV completely, SO THAT when a user clicks "Close". Either with or without the .FLV playing, everything closes completely and when re-loaded, the video plays from scratch?

View 2 Replies

ActionScript 2.0 :: Pause Externally Loaded Flv?

Sep 16, 2009

I am externally loading an flv into an empty movie clip container using loadMovie into a main swf. The flv is in a standard flv playback component and works fine on its own. But what I'd like to be able to do is pause the flv when any of the buttons in the main swf are pressed.

View 7 Replies

ActionScript 1/2 :: Control An Externally Loaded SWF?

Jul 26, 2009

I'm working on an flash movie and the interface is a small town (simiar to "doritos.com" and "comcasttown.com") if you reference both the doritos and comcast sites their little movie runs smoothly. I have several elements in the town. For example, one of the elements is an airplane hangar. When you rollover the hanger, I created a movie, the doors open and an airplane flies out of the hangar. I have several little movies throughout the interactive such as this. I created the hangar animation as a seperate swf file. In my main movie I created a button, on rollover it loads the hangar swf into an empty movieclip. When I publish and view the swf it plays slow and choppy. First, is it possible to write actionscript to load the external swf ,but it stops on the first frame of the animation and when you rollover it continues to play.To put it all in a nutshell, I want to create several buttons throughout the movie with loadmovie functions, once the swf movies are loaded I want them to stop on the first frame of the animation and when you rollover loaded swf movie I want it to continue to play the animation. Should actionscript be applied to the swf movies first and preloaded into the main movie. And what will make the movies run smoothly once it's published and viewed in a browser.Also if this makes a difference, I created the animations in after effects, exported them as FLVs imported them into flash and exported them as swf. Again it runs really slow and choppy

View 1 Replies

Previewing Externally Loaded Images?

Jul 30, 2009

I was wondering if there was a way in Flash to preview externally loaded images in Flash while still working.I am loading images externally to keep the file size down on a piece of elearning but now I'm afraid maintenance will be a nightmare since you don't actually see the screens until you publish. I have interactions on the screens so I need to see them for their placement on screen.

View 5 Replies

ActionScript 3.0 :: Externally Loaded SWF Files?

Aug 3, 2010

I have the action script that loads external SWFs on a button click, but I don't know how to make it so that the slides switch after a few seconds on their own as well as on a button click. I know it has to do with a timer - but I have no idea how to do that (i'm super new to AS) Can someone please either tell me what code I need there or direct me to atutorialHere's the code I'm using so far:

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

[code]......

View 12 Replies

Actionscript 3 :: Getting Information From An Externally Loaded SWF?

Mar 30, 2011

So I have an SWF that I've made and I need to appened some instructions to the beginning of the project. I figured the easiest way to do this was to make the animation in a separate SWF then import it to the start of the first one. My problem is that I can't find a reliable way to tell when the first SWF is finished playing. I've googled the heck out of this but I can't seem to find anything that works. For some bizarre reason, no matter what I do the program seems to think that the external SWF only has 2 frames, if I put an ENTER_FRAME listener and trace externalSWF.currentFrame I get "1, 1, 2, 2, 2, 2, 2, 2..." My code looks something like this.

[Code]...

Also, for the record, the external SWF plays properly when I add it as a child. The problem is removing it from the stage when it's done playing. It's interactive so I can't just do a frame count.Edit: So I tried doing a getQualifiedClassName() call on extSwf and I got "Instructions_fla::MainTimeline_Preloader_" which could explain the frame discrepency. How can I have access to the actual timeline?

View 2 Replies







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