Flash :: Accessing CHILD In External Loaded Swf File

Jan 7, 2012

How do I get to the MovieClips within an externally loaded Movie Clip. Lets say I have a movie Called ONE in the swf I just loaded. How can I work with it alpha, position and other properties of the children of this clip? CODE IN MAIN TIMLINE:

[Code]...

Now its loaded I want to change the postino of the clip called ONE in the movie LoadedMC I just created.

View 1 Replies


Similar Posts:


Flash :: Accessing Uza's Global Object From A Loaded External Swf?

Mar 4, 2010

I am using the 1.2 version of Uza's Global singleton (http://www.uza.lt/codex/as3-global-object/). The container swf stores some data and a link to a function in the "global" object.

Then another swf is loaded inside the container, it gets it's global instance with Global.getInstance();, and i suppose i can access the data and function stored in global by the container swf.

This works perfectly on localhost served by a webserver, but when i put the files on my external production server the loaded swf's global appears to not have anything stored by the container.

View 1 Replies

ActionScript 3.0 :: Accessing Child Swfs Loaded In A Movie Clip?

Apr 29, 2010

I am building an interface that loads swfs externally into an array(pre-loader) my code places these swfs into a container movie clip on stage when called.I am trying to access the swf that is now a child of the movie clip so i can rewind, pause, and play the swf.Currently they are loading in just fine, but my code isn't able to touch the swf. The swfs also play all the way through when they are loaded so when i change to the next one of the sequence my swf is already at its end frame.

Here is the code:

Actionscript Code:
stop();//Variable creation-----------------------------------------------------------------var _swfLoader:Loader;var _swfRequest:URLRequest;//creates an array with all the swfs locations inside--------------------------------var _swfPathArr:Array = new

[code]....

View 9 Replies

ActionScript 3.0 :: Accessing Child Swfs Loaded In A Movie Clip

Apr 29, 2010

I am currently building an interface that loads externally loaded swfs into a movie clip on stage. I have no problem loading them in and switching between them. I am, however, having an issue accessing the swf, so that i can rewind, pause, and play the loaded swf.

Here is the code:

ActionScript Code:
stop();
//Variable creation-----------------------------------------------------------------
var _swfLoader:Loader;

[Code].....

View 5 Replies

Flash - Accessing A Button Inside A Loaded Swf File?

Dec 28, 2011

I am trying to access a button inside an external swf file that I loaded. Problem is every time I try to access this button I get an error saying that it's null!

Here is my code:

public class DocumentClass extends Sprite
{
public var loader:Loader;
public var swfFile:URLRequest;

[Code].....

Now this should work, code-wise I think its correct. The problem is that loader cant find the required button. There is indeed a button in the loaded movieClip with an instance name of "button", I double checked that.

[URL] basically i was just a layer too high and this is why i couldn't access anything..

View 1 Replies

ActionScript 3.0 :: Accessing Child Properties - Dynamically Loaded Photo Is Portrait Or Landscape

Sep 17, 2008

I'm attempting to use "if" statements to determine if an dynamically loaded photo is portrait or landscape. The problem I'm having is when I try "gallery_mc.getChildAt(0).width", it returns 0.

View 10 Replies

Flash :: Accessing A Variable In The First Frame Via An External Action Script File

Dec 12, 2011

Background: I have a project where i need to create multiple objects that consume the same base calss from an external .as file. each of the individual fla files that consume the base class need to pass a variable to the base class so the class can return information specific to the fla.

My question is,if i have an external class path set up, how do i get a variable on the first frame of the movie to be visible to the base class && how do i call upon its value from within the class.

View 2 Replies

ActionScript 3.0 :: Accessing Loaded External Swf?

Mar 30, 2009

I am using a zoom component which i purchased recently to load different external swfs on different button clicks. But instead of loading separate external swfs I would like to load a single swf and go to frame labels - "one", "two", etc. - I've been reading about casting the external swf as a movie clip, but I am confused how this would work with the code I have at the moment.

var image:String="introlocal.swf";
function loadContent () {
var myLoader:Loader = new Loader();

[code].....

View 1 Replies

CS3 : Accessing Data Loaded From External Textfile?

Mar 3, 2010

I'm trying to load data from an external textfile, called "config_flash.txt". It works perfectly if applying the fetched data is done within the same function where the loading is done. However, I would like to use the fetched variables in other parts of the script.

Here's what works:

Actionscript Code:
var varLoader:URLLoader = new URLLoader(new URLRequest("config_flash.txt"));varLoader.addEventListener(Event.COMPLETE,

[code]...

So, basically I want the variables/values defined inside the function to be available anywhere in the script. The error that the second code snippet causes is as follows: "1120: Access of undefined property text1/text2".

View 6 Replies

ActionScript 3.0 :: Accessing Timeline And Variables From External Loaded SWF?

Nov 22, 2011

I'm trying to check for an external swf file being loaded using
event.target.name=="pubResCHETNA" and currentFrame == second frame of scrollPaneGroup movieclip (the scrollPaneGroup movieclip is from a external loaded swf file)

Here is my code:
var currentSWF:MovieClip= new MovieClip();
currentSWF = MovieClip(loader.content);
if(event.target.name=="pubResCHETNA" && ?????? )
How should I place the condition over here?
{
fCbtn.buttonMode=true;
fCbtn is a movieclip reside in second frame of scrollPaneGroup movieclip of "pubResCHETNA.swf".
}

View 6 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 :: Accessing The Url From Which A Swf File Has Been Loaded?

Jan 6, 2009

finding the url of the swf filefrom which it has been loaded? The purpose of the url is, I amloading some flv files using relative path. I just want to achievethe same by appending the relative path to the parent swf url fromwhere the parent was loaded. I am a newbie to AS3

View 5 Replies

ActionScript 3.0 :: When Accessing Local File From Loaded Swf

Jul 9, 2009

I have the following problem when loading a swf file. I have content.swf file located at [URL]. The contetn.swf access a file settings.xml located in the same dir. I load it like this:

_settingsURLRequest = new URLRequest( "settings.xml" );
_settingsLoader = new URLLoader();
_settingsLoader.load( _settingsURLRequest );

Now I have another file loader.swf located at another domain [URL]. The loader.swf file loads content.swf but content.swf search for the settings file at domain2 not domain1. I know that I can use absolute address when loading the settings file but I'm loading a lot of files and I prefer another solution. Is there a way to specify that content.swf should always search for settings.xml in its own domain no matter the fact that its being loaded from onother file in onother domain?

View 2 Replies

ActionScript 3.0 :: Accessing A Movieclip Of Dynamically Loaded Swf File

May 16, 2009

in (swfA.fla) I have this code in frame1

var module1:Loader = new Loader();
var admin = new MovieClip();
addChild(admin);

[Code]....

(my thought here is that 'admin' contains swfB.swf?) - this would seem very simple... but it...

...does not work and gives me this [seriously unhelpful] error:

TypeError: Error #1010: A term is undefined and has no properties.
at swfA_fla::MainTimeline/frame1()

View 7 Replies

Flash :: Clone Shape Loaded From External Swf File

Feb 8, 2010

How can be cloned shape loaded by Flex Action Script 3 from external swf (authored in the Flash CS4)?

View 3 Replies

ActionScript 3.0 :: Prevent Loaded Swf File From Accessing Local Network Files

Nov 2, 2009

I am creating a web page that allows users to upload their own swf files to my web page, which are then used by the main web page as components. This creates a security issue though because I don't want the uploaded swf files to access other files on the server.

when the main webpage starts, it loads whatever third party swf files the user specifies. Is there a way for my main web page to change the security settings of the loaded swf so that the loaded swf is treated like it was loaded from another domain? Or is there another way I can provent these uploaded swfs from accessing local files on the server.

View 5 Replies

Professional :: Can An External Html File Be Loaded Into And Displayed In Flash

Mar 11, 2010

I currently pull an html file into our site via iframe.  (due to various factors, I cannot host the information in the html on our site and need to host it elsewhere).  Is it possible to use a loader or other method to pull this information into flash?

View 2 Replies

ActionScript 3.0 :: Flash Preloader Pause After External File Loaded?

Aug 24, 2010

I have a preloader.swf that loads another swf (main.swf). It all works fine, however I would like the loading bar to stay on 100 (once it gets there) for 2-3 seconds before the main.swf opens, currently as expected from the code below, as soon as it gets to 100% it flicks straight over to the main.swf.

I am using tweener, and I could achieve this easily using the onComplete code to call this.addChild(loader);, however, the problem is, both my preloader and my main swf are liquid layouts, and if I were to call the this.addChild(loader); at the end in its own function, then it throws a

TypeError: Error #1009: Cannot access a property or method of a null object reference.

. The only way to get around this error is to put the this.addChild(loader); so that it loads upfront. After a bit of google research, i found this error occurs due to the stage properties already been set in the preloader.swf (from liquid layout)then once the main.swf loads it tries to set them again...So is there another way i can cause a delay for 2-3 seconds once my preloader hits 100?

Below is my preloader code with liquid layout settings

Code:
//LIQUID LAYOUT
stage.align=StageAlign.TOP_LEFT;
stage.scaleMode=StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, resizeHandlerLoading);

[Code]....

1. using my tweener onComplete method and fixing the error caused by preexisting stage properties

2. Thinking of an alternate way to delay the main.swf from opening straight away (keeping in mind that this.addChild(loader); would need to stay where it is...

PS - here is a link to a person who was getting the #1009 error with preloader and liquid layout, their solution works, but won't allow me to use a tweener delay...[URL]

View 2 Replies

ActionScript 2.0 :: Accessing A Movieclip From External .as File

Sep 1, 2009

I'm trying to make a simple "tamagotchi-alike" application and i have encountered problems when trying to access a movieclip. To describe the situation, at the beginning there is nothing on the stage, then from a class called Kitty I attach a movieclip called mainStage with all the animations.

[Code]...

View 0 Replies

Actionscript 3 :: How Can A Loaded Child Swf 1 Communicate To Next Child Swf, Child Swf 2, Which Is Currently Not Loaded

Oct 14, 2011

I have a parent swf with three buttons: next button, back button, ticker on/off button.I have three child swfs, each with a ticker mc. When I click on ticker button on parent swfit dispatches a custom event which brings ticker MC on stage and thus ticker becomes visible (ticker off button displaces it out of stage by changing the value of ticker_mc.y).

the problem I am facing is when ticker is on and I click next or back button to load next or previous child swf, the ticker goes off. How can I make sure that ticker is on all the time and closes only when I close it. How can a loaded child swf 1 communicate to next child swf, child swf 2, which is currently not loaded, that since the ticker is on on swf 1 so you please keep the ticker on on swf 2 as well?!

I think I know the problem. I have put a default value of ticker_mc = 160 (makes ticker inactive) on every child swf. So, the ticker becomes inactive everytime I load a new child swf. If someone could guide how can I do this, my problem will be solved: When first child swf is loaded, the default value of ticker_mc.y should be 160. I want to hold this value in a variable. When I click ticker active btn, position of ticker_mc changes to 194 so the value of variable should change to 194. When I click next btn, the variable value (160 or 194) should be sent to next child swf and ticker_mc.y should be equal to variable value.

This is the code so far

"Next button"
go_mc.next_btn.addEventListener(MouseEvent.CLICK, playNext);
function playNext(e:MouseEvent):void {
if (swf_no < (clips.length-1)) {

[code]....

View 1 Replies

ActionScript 3.0 :: Accessing Swf File Via External Html Links?

Jul 27, 2009

I have a blog that I insert swf video into via an iframe which references a CS4 published html page from my swf file.  I would like to put html links into each individual blog post to act like a table of contents that someone could use to move to specific frames in my video.

View 3 Replies

ActionScript 3.0 :: Flex Accessing External Class File

Jan 25, 2010

I have downloaded an AS 3 class file, designed to create an MD5 hash from a string. I have put the class file in my /components directory (with / being the root of my Flex project source).[code]...

View 2 Replies

ActionScript 3.0 :: Accessing Random Variables In External .txt File?

Sep 8, 2010

I have a .txt file with 10 variables containing 10 sentences. The variables are named myText1, myText2, myText3, etc.

I want to be able to load one of these sentences at random into a dynamic text box.

My plan was to generate a random number i and concatonate it to the variable name (ie myText + i) then call that in a LoadVars.

However, I am not able to properly reference it.

View 1 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 :: Accessing A MovieClip From An External File That Is Not The Document Class?

Apr 17, 2009

Instead of posting my entire files and such, I'll make a brief example of my situation and my desired outcome.My files consist of my document class entitled Engine.as and another class Abilities.as all within the same folder.On my stage I have a MovieClip with the instance name of item1_mc. On its personal timeline I have 2 frames, one entitled "inactive" and the other "active". Here's a sample of very similar code....

Code:
package
{
import flash.display.MovieClip;

[code]....

How do I access item1_mc? In reality I have 6 different clips and I desire to access much more than frame changes...what's the overall best way to be able to interact with an item placed on the stage via an external .as file that is not the document class?

View 11 Replies

ActionScript 2.0 :: Replace Text Loaded From An External File With Text From Another External File?

Nov 9, 2005

How can I replace text loaded from an external file with text from another external file? Using setInterval and calling the .load from a function or something? In the example below I'm calling an external text file, could this also work with an .xml file with cycling through the children?

[Code]...

View 2 Replies

ActionScript 3.0 :: Accessing Stage Items, Through A SWF File Which Is Loaded Inside The Stage

May 14, 2011

- I have A.fla.

-  A.fla includes buttons, movie clips and also B.swf is loaded in A.fla using a LOADER

- i want to access elements in A.fla, from the actionscript codes inside B.fla to modify those movie clips and buttons based on actions going on in B.swf
 
for instance, lets say there is a button X in A.fla, and there is a button Y in B.fla,  B.swf is loaded into A.fla, and I want the button Y to erase button X when clicked.
 
general question:  accessing elements in a stage, through a SWF file loaded into that stage.

View 2 Replies

Actionscript 3 :: Accessing A Clip Inside Another Clip In A Loaded SWF-File?

Mar 1, 2010

I'm writing a card game in AS3. The artist I'm working with has produced (in Flash CS4) a single swf-file containing all the card graphics and animations. The structure of the fla working file looks something like this:

- Scene
- CardGraphics (Movie Clip)
- CardFront
- CardBack
- CardValueImage (Movie Clip)

In the program I create 52 instances of my Card class, each having a MovieClip instance created from the loaded swf. The idea is to set the frame of the CardValueImage MovieClip to correspond to the Card instance's suit and rank member variables. However, I can't figure out how I access CardValueImage and call gotoAndStop (or whatever method I will need to call).

[Code]...

View 2 Replies

ActionScript 3.0 :: Accessing A Child Inside A Child Inside A Child?

Nov 23, 2011

mHook -> mBottom -> hItemButton -> itemButton[a] -> itemButtonExp[a]

so i press another butoon, and retrieve a number 2, how do i access itemButton[2].itemButtonExp[2]? Coz i need to change the text field in there?

in AS2 i can access it directly by changing itemButtonExp[a].text, but how do i do it in AS3?

View 3 Replies

ActionScript 2.0 :: Create A Preloader (in Flash With The "percent-loaded"-thingie) For An External .html File

Aug 4, 2004

I want to create a preloader (in flash)(with the "percent-loaded"-thingie) for an external .html file that I want to load. Here's my code:

[Code].....

On the "main" frame" I've put a getURL action on a movieclip. Can this work.???? I'm still new at this and a bit confused?

View 6 Replies







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