ActionScript 3.0 :: External Swf Loaded Into A Parent Swf

Jul 27, 2010

I have a external swf loaded into a parent swf. It loads fine and plays. I have an EventListener in the external swf, I would like to have trigger a function in the parent swf. Is there a way to do this in AS 3.0?

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Checking On Loaded External SWF Files Into Parent SWF?

Aug 8, 2011

What is the best approach to add and remove sections if I'm using this method for example.

var myLoader:Loader = new Loader();
addChild(myLoader);
var url:URLRequest = new URLRequest("section1.swf"); [code]......

Do I add this to button click events? for every section? and a remove method for the other sections that are not in use? or is there a better way to setup this more reusable and checking correctly if a swf is loaded or not?

View 2 Replies

ActionScript 3.0 :: Enabling Parent Button While External Swf Is Loaded?

Jul 25, 2011

how to load an external swf into my main timeline. As far as I understand this main timeline is the "parent". Hence the loaded, external swf should be the "child" (a quiz).Now the child (a quiz) loads into the flash file and is played properly, but I cannot access the button on the parent anymore. Unfortunately, I really need the home button on the parent to exit the quiz and allow for new navigation within the flash document.

my AS3 Code:

import flash.events.MouseEvent;function onClick611 (event:MouseEvent) :void{  gotoAndPlay("home_einf")}home_btn.addEventListener (MouseEvent.CLICK, onClick611);
import flash.net.URLRequest; import flash.display.Loader;import flash.events.Event; import flash.events.ProgressEvent;

[code]....

View 2 Replies

ActionScript 3.0 :: Dynamic Text In External Swf Invisible When Loaded Into Parent?

Apr 18, 2010

My website is coming along nicely, just starting to add some content and to make it nice and easy for my client to edit their own content i thought I'd make all the text external.

Works fine in the external swf, when I publish that file alone the text shows up perfectly. But when I load this same swf into the parent movieclip (the main website) the text is invisible. I've put in a trace function and the parent MC can output what is in the dynamic box, but it's invisible in the player.

View 9 Replies

ActionScript 3.0 :: Tab Indexing Loop Through Parent, External Child Swf, Back To Parent?

Nov 11, 2009

I have a parent swf which loads many child swfs (though only one is displayed at a time). My intention was to use the loaded SWFs document class to retrieve an array of objects to be assigned a tab index, combine this with the parent's own array of objects and apply sequential tab indices to them all. But what happens is actually that the parent's objects are assigned an index, but the external swf is unaffected. In fact, the external swf retains its automatic tab indexing, when I would expect that having set a value for InteractiveObject.tabIndex, automatic tab indexing would be disabled.

I've seen similar tales elsewhere. Most posts I've read are wanting to load an external swf, give it focus and loop through those objects, then close the swf and return to looping through the parent. However I would like loop through all objects as one. including manipulating the focus manager(s), and basically fiddling with every tab-related property I know.

View 2 Replies

ActionScript 3.0 :: Loaded Swf Tell The Parent Loader To Unload Itself After The Loaded Swf Finishes Playing?

Sep 23, 2010

I have a shell swf that is loading a swf. How do you have the loaded swf tell the parent loader to unload itself after the loaded swf finishes playing?

View 4 Replies

Flash :: Loaded Font Doesn't Show Up When Parent Swf Creates TextField In Loaded Child Swf

Jun 14, 2011

Im working on a project that has a main swf file associated with the document class. It loads XML that provides the text content for the project, then it loads a swf that contains a font in its library, then it loads the first of several content module swfs. When the font swf has inited, I'm registering its library font with Font.registerFont(), and using it in a TextFormat object. After everything is done, I can add code to the document class to create a text field on the stage of the main swf and format it successfully with the TextFormat object, but when I try to do the same thing inside the loaded content module swf, the text doesn't show up there at all.

View 1 Replies

ActionScript 3.0 :: Loaded Font Doesn't Show Up / When Parent Swf Creates TextField In Loaded Child Swf

Jun 15, 2011

I'm working on a project that has a main swf file associated with the document class. It loads XML that provides the text content for the project, then it loads a swf that contains a font in its library, then it loads the first of several content module swfs. When the font swf has inited, I'm registering its library font with Font.registerFont(), and using it in a TextFormat object. After everything is done, I can add code to the document class to create a text field on the stage of the main swf and format it successfully with the TextFormat object, but when I try to do the same thing inside the loaded content module swf, the text doesn't show up there at all.

View 7 Replies

Actionscript :: Class Loaded Into Parent Class / Get Parent Variables

Apr 20, 2009

I have a child class that is loaded into the parent class when the swf begins, like so: var myvar = 'hello'; public function Parent() { this.child = new Child(); }; How can I retrieve the variable 'myvar' from within child?

View 1 Replies

Communicate Between Loaded And Parent Swf?

Mar 8, 2009

I started learning the basics of as3.0 a year ago by doing a lot of experiments.. I never read a book or took lessons or something.. I guess i'm still missing important logics when i'm programming. I'm creating my personal flash imagegallery but I can't figure out how to communicate between a loaded swf and its parent swf.

I have a main.swf file with document class main.as which loads external swf files into a movie container. I am also loading a background sound like[code]...

The only work around I was thinking about would be to keep showing the stop/start sound button from the main.swf when a slideshow instance is called.. but then I'll screw up my design I want a second button inside the slideshow that can also stop the main bg sound.

View 1 Replies

ActionScript 3.0 :: Accessing Parent From A Loaded Swf

Jun 8, 2010

Well, I know how to access the loaded swf variables from its parent, but how do I access the parent SWF variables from a loaded SWF?! I'm trying it.. But get no results.

View 6 Replies

ActionScript 3.0 :: Positioning Parent MC In Order To Center Child MC On Parent's Parent MC

Feb 5, 2010

[code]All clips are squared.Ok, on the PlayerPlane, there are little soldiers, which have hotkeys. The effect I'm trying to create is I want to position the GameStage so that the currently selected soldier appears in the center of the GameClicker clip.The GameStage is movable by the player (to scan other areas of the map)by holding the CTRL key, so it's easy to kinda lose track of where your players are.I have tried using localTo Global and globalToLocal techniques, but I think I'm lost on the actual math of getting the GameStage to move the correct distance so that the selected soldier is centered to the GameClicker.[code]

View 2 Replies

ActionScript 3.0 :: Child Swf With Component Loaded In To Parent Swf

Feb 13, 2010

I have an elearning course, a .swf, that loads multiple .swfs as the user progresses through the course. At the end, there is a quiz.

The quiz.swf uses the radiobutton component. I have developed some custom skins to use on the radiobutton component. I have figured out that:
I have to add an instance of a radiobutton in the main .swf for the radiobuttons in the quiz .swf to show.I have to copy the radiobutton intance from the quiz swf library to the main swf library if I want my custom skins to show in the quiz swf While, this works fine. It is not practical. I want the quiz.swf to more modular. So I can pop it in to any course and not have to go back in and add the radiobutton skins to each course.

View 2 Replies

ActionScript 3.0 :: Loaded Swf - Prevent It From Having Access To Parent?

Jun 25, 2009

I want to load an external swf movie into the parent one using for example the UILoader component and I want it to have access only to one object of the parent (the main swf movie). I tried sth like my_uiloader.content.parent = null, but obviously it doesn't work as the parent property is read-only.

View 15 Replies

ActionScript 3.0 :: Substitute A Parent MovieClip With A Loaded One?

Jul 9, 2009

is it possible to load a .swf and play it in such a way, that this loaded clip will become a root effectively substituting a loading clip on top of the hierarchy?
 
Saying this another way round - rather than loading external .swf as a child of a "host" movie I would like it to replace host movie entirely.

View 4 Replies

ActionScript 3.0 :: Get A Loaded SWF To Control Parent Timeline?

Aug 25, 2009

I have a swf that loads an external swf. I want the external swf, (the one that was just loaded), to interact with the timeline of the swf that just loaded it. I've been trying MovieClip(root). or MovieClip(parent). but they give me errors. How should I use as3 in the external swf so that it interacts correctly with the parent?

View 3 Replies

Actionscript 3 :: Camera Denied If Loaded In A Parent SWF?

Jan 22, 2010

I have a child SWF file that has the Camera functionality. It works fine if I run the child SWF by itself.

However, when I load the child SWF into a parent SWF, the Camera functionality does not work. Doing some tracing it says that Camera access is denied. That happens without me even clicking on the deny button and in fact the usual security popup does not even show up.

[Code]...

View 1 Replies

ActionScript 3.0 :: Send Info From Loaded Swf To Parent?

Jul 17, 2009

Making the move from AS2 to AS3 and need a little assistance/guidance.

In AS2 I have been using the below to send instructions to parent[code]...

View 2 Replies

ActionScript 2.0 :: Reaching Parent Movie From Loaded Swf?

Jun 29, 2010

I'm trying to reach main movie from loaded swf.I load the swf using this:

ActionScript Code:
var roomloader:MovieClipLoader = new MovieClipLoader();
var roomloadHandler:Object = new Object();
roomloader.addListener(roomloadHandler);[code]...

I tryed _parent and _global. But nothing works.

View 1 Replies

ActionScript 3.0 :: Loaded Swf Telling Parent Swf To Unload Itself?

Sep 23, 2010

I have a shell swf that is loading a swf. How do you have the loaded swf tell the parent loader to unload itself after the loaded swf finishes playing?

View 3 Replies

Actionscript 3.0 :: Calling A Function In A Loaded SWF From A Parent SWF?

Jan 21, 2009

syntax for calling a function (and sending arguments) located in an external SWF from a parent SWF?

View 2 Replies

ActionScript 2.0 :: Telling Parent Movie From Loaded Swf

Jul 7, 2004

I have a parent movie that loads a swf(events.swf) file into a movie clip with an instance name of container. (container.loadMovie("events.swf");) It loads fine and seems to work great.

events.swf has a movie clip inside of it called design_mc that contains the content. In that movie clip I have a button that needs to target the parent movie and tell it to gotoAndPlay("eventsout"); which is on the _root of the parent movie. However, anything I try will not target the parent movie. I've tried _parent, _parent._parent, _root, and even assigning the parent movie this._lockroot = true; . Nothing seems to target the parent movie.

View 4 Replies

ActionScript 3.0 :: Sending Variable Value From A Loaded Swf To Parent Fla?

Apr 17, 2008

I load a swf in my main fla and I want to pass the value of a variable from the loaded swf to the main fla.How can I do this in AS3?

View 5 Replies

ActionScript 3.0 :: Timeline Actions Ignored When Loaded Into Parent Swf

Jan 25, 2009

If I have a movieclip in my library with some animation on the timeline and actions as well (stops, calls to other methods, etc.) and at runtime I add this clip to the display list, everything works as expected. The actions in the timeline of said clip are fired.If however, I load this file into another swf all the actions in the movieclip are ignored.Attached is a demonstration of this behavior. simply runnning Child.swf on it's own will show nothing as there is a stop on the first frame of the attached clip. However run the Shell.swf (which loads Child.swf) and you'll see the animation of the movie clip. There are no calls anywhere telling anything to start playing. What's worse, the method call further down the timeline and the stop and the end of the timeline are also ignored. Compiling these files and looking at the Output window, you'll see the trace from the method "__testCall" is never fired.Is this a bug with the Flash Player?I've had to use addFrameScript as an alternative to actually having the actions on the timeline. lame.

View 3 Replies

ActionScript 3.0 :: Communication From Externally Loaded SWF To Parent

Mar 19, 2009

In short, this is what im trying to do: Communicate from externally loaded swf to main/parent .swf. On my main .swf I have this code on my main timeline to import and center an external .swf:

Code:
import flash.display.*;
import flash.net.URLRequest;
//turn off stage auto resizing
stage.scaleMode=StageScaleMode.NO_SCALE;
stage.align=StageAlign.TOP_LEFT;
[Code] .....

View 1 Replies

ActionScript 3.0 :: Accessing A Parent Instance From A Loaded Swf?

Jul 21, 2010

I have a "MainSWF", that loads and places other SWFs "LoadedSWF". The LoadedSWF has buttons that are supposed to make some layers in the MainSWF visible/invisble. These layers are in a placed navigation bar that is defined as a symbol, was placed on the Main Stage and given the instance name "FlashStageMainNavigation". I have a hard time figuring out how to address the layers in the MainSWF, because it seems I am missing something.

When I use a loop to trace all the child instances on the stage of the MainSWF with:

this.getChildAt(i).name

I get the following info:

instance1 this.name=0
FlashStageMainNavigation this.name=4

When I trace stage.getChildByName(this.name) in MainSWF I get "FSMain", which is the name of my main Class

My assumption was, that I could (from the LoadedSWF) address the Navigationbar in the MainSWF by using something like:

stage.FSMain.FlashStageMainNavigation.visible = false; //or
stage.getChildByName("FSMain").FlashStageMainNavig ation.visible = false; //or
stage.getChildByName("FlashStageMainNavigation").v isible = false;

neither of that worked.

To sum up/rephrase my question: How can I find out, which object instances are placed on the stage and how do I address them from the LoadedSWF?

View 4 Replies

ActionScript 2.0 :: Telling Parent Movie From Loaded Swf?

Jul 7, 2004

I have a parent movie that loads a swf(events.swf) file into a movie clip with an instance name of container.

(container.loadMovie("events.swf");) It loads fine and seems to work great.events.swf has a movie clip inside of it called design_mc that contains the content. In that movie clip I have a button that needs to target the parent movie and tell it to gotoAndPlay("eventsout"); which is on the _root of the parent movie. However, anything I try will not target the parent movie. I've tried _parent, _parent._parent, _root, and even assigning the parent movie this._lockroot = true; . Nothing seems to target the parent movie.

View 4 Replies

ActionScript 3.0 :: How To Call Function Of Parent Object From Loaded SWF

Nov 10, 2009

I have a swf that should be able to load another swf in runtime. Then I would like the loaded swf to call a method of the parent, loader swf, like this:

Code:
parent.closeForm;
But when I compile it, it throws this error:
1119: Access of possibly undefined property closeForm through a reference with static type flash.displayisplayObjectContainer.

I've tried:
Code:
if (parent != stage){
parent.closeForm;
}

So flash won't run this code at compile time, but it always throws that error. Here is the code of the LOADER swf:

Code:
private function loadForm():void {
var loader:Loader = new Loader()
var mRequest:URLRequest = new URLRequest(formPath);
loader.load(mRequest);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onFormCompleteHandler);
[Code] .....

How could I write an expression that should call a function of the LOADER swf without having this compile-time error?

View 14 Replies

Loaded Child Movie Controlling Container Parent

May 14, 2009

i'm a designer trying to step up my flash skills and have a scripting problem that's causing me trouble. essentially i have a child swf loaded into a container in a parent swf and want the child to be able to instruct the parent. to explain in full, the child contains an flv with bespoke video player components. it's container sits in one frame of the parent. when the flv finishes playing, i need the parent swf to move onto another frame.
as it's a controllable flv, it isnt possible to predict the exact length of time the child will need to be present, so it literally needs to tell the parent it's finished playing at that very point.

[Code]...

View 9 Replies

ActionScript 3.0 :: Calling Parent Functions From A Loaded Swf File?

May 29, 2009

I have a main Flash file that loads up other SWF files using Loader objects.  I want to be able to call methods of this main object from within the loaded SWF files.  For instance, I want the loaded file to be able to add an event listener to the stage of the main file.  I've found this example:
 
[URL]

Which appears to do what I want, but I can't figure out how to implement it in my setup.
 
My 'main file' that loads up other SWF's is called 'main.swf' and has a document class Main.
 
My loaded file is called start.swf, and has a document class "Start".

[Code]....

How can I reach the stage from a loaded SWF?  Or at least, how can I call a function in my Main Class from the loaded start.swf file so I can move the functionality I need to the main.swf file?

View 5 Replies







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