Flex :: Can't Pass Data From Child To Child

Jun 25, 2010

I have a parent and 2 children. I am trying to pass data from child1 to child2 but keep getting an error message: 1061: Call to a possibly undefined method through a reference with a static type.

In child1 I have the following code:

[Bindable]
public var TestVar:String='sometext';

In child2 I am trying to get the value of TestVar and then use it as a value to search a mysql database via php.:

var newTestVar:String = child1.TestVar;
if(newTestVar != null){
getResult.token = someService.get_filtered_Paged(newTestVar);

[Code].....

View 4 Replies


Similar Posts:


Actionscript 3 :: Pass Data From Parent Swf To Child Swf?

Jul 22, 2011

I have two swf, A.swf and B.swf: B.swf is a child of A.swf. Each swf has its DocumentClass. Now: I must pass 4 arrays from A.swf to the DocumentClass of B.swf. Which could be the best way? Is a listener in B.swf a good idea? I noticed there's the possibility to send data over the querystring but I would like to avoid this solution, if possible.

View 2 Replies

ActionScript 3.0 :: Multiple Buttons To Open Child Swfs Then Be Able To Close The Child From Within The Child?

Mar 25, 2009

I have a picture on the stage that has multiple items that have hotspots/links over them that should open a child swf on top of the background and show details about the items. then have a button in the child swf itself that removes the child from over the background so the user can click on another item etc.I found this code in someone's post and I am trying to modify it so that works for multiple swf files...it currently works for a single swf.I wan to pass the name of the button in front of the .swf in the URLRequest to have the same name as the instance name of the referring button. But I can't figure it out. Here is the code I am using on the stage

View 2 Replies

Flex :: SWFLoader - Child Apps Couldn't Access Certain Objects That Were Instantiated By Another Child App?

Aug 23, 2010

i have problem with swfLoader in flex, when i close following code in click method i can easly add many swf to main application

<mx:VBox id="content" width="100%" height="100%" ></mx:VBox>
public function doIT():void
{[code]....

when i close adding those swfs in loop i have the same error, it looks like child apps couldn't access certain objects that were instantiated by another child app, so what can i do?

View 1 Replies

Flex :: ViewStack.addChild Adding Multiple Child And Only The Last Child Is Visible?

Mar 10, 2010

var viewStack:ViewStack = new ViewStack();
viewStack.percentWidth = 100;
viewStack.percentHeight = 100;

[Code]....

Its only displaying canVas3 contents not canVas1 and canVas2

View 1 Replies

Flex :: Viewstack - Navigate To The Second Child During Onclick Of A Button Present In The Second Child?

May 10, 2010

I have a component mxml file in which i have a view stack, on click of a button i navigate to the first child, now i need to navigate to the second child during onclick of a button present in the second child. All the childs are component files included within the view stack. How could this be done, Sample code is present below,

[code]...

Now in my offering.mxml file if i try to access navigationViewStack i am getting an error stating 'Access of undefined property navigationViewStack.

View 3 Replies

Child Of Child Movie Clip Are Null In Imported Object From Flex To Flash Right After Being Created?

Dec 16, 2010

I have an Movie Clip in Flash that have subobject of button type which has subobject of input text and movie clips. Right after creation core Moveclip all subobject are set to null, when I expect them to be valid objects.

[Code]...

MC_Core_design was created in Flash and exported to Actionscript. I've done this for button_1 class aswell. The code was written using Flex. When I comment out both lines that result in error I get correct view of the core Movie clip with all subobject. How can I set subobject properties right after object creation?

View 2 Replies

Flex :: Read Dynamic Form Child Data In Flex?

Jul 20, 2010

I created a form dynamically by adding each component in action script,now i want to get back the text/data entered in to that each component dynamically?[code]...

View 2 Replies

Flex :: Adobe Get Child Of Child

Oct 22, 2010

I have a Adobe Flex project in which resides the following layout markup.

[Code]...

But that does not work. In fact, when debugging "b" is always null even though "grid.getElementAt(0)" returns a BorderContainer.

View 1 Replies

ActionScript 3.0 :: How To Pass Value Between Child To Parent

Jul 15, 2009

In Move1.swf I am loading Movie2.swf like below:
ActionScript Code:
var myvalue:Number = 0;
var UploadLoad:Loader = new Loader();
UploadLoad.load(new URLRequest("Movie2.swf"));
UploadLoad.contentLoaderInfo.addEventListener(Event.COMPLETE, endNavListener);
function endNavListener(e:Event):void {
var UploadForm=MovieClip(UploadLoad.content);
stage.addChild(UploadForm);
UploadForm.x=0;
UploadForm.y=0;}

But I am having one variable in Movie1.swf which is called myvalue, I want to assign some value for myvalue from Movie2.swf. So I have coded like
ActionScript Code:
MovieClip(parent).myvalue = 100;
But the value is not passing ....

View 6 Replies

ActionScript 3.0 :: Pass Variables To Child Swf?

Sep 3, 2010

I need a parent swf to pass a variable to a child swf. I have a loader for the child swf[code]...

View 6 Replies

Actionscript 3.0 :: Pass Value As Flashvar To Child Swf?

Oct 1, 2009

Does anyone know how to pass a value to a child swf, loaded into a parent swf, from the parent swf as flashvars?

Have an old AS2 project that accepted flashvars from a HTML file it was in, but now it has to be loaded into an AS3 parent. Just need to know a way to pass some values to the AS2 swf that it is expecting as flashvars.

View 2 Replies

ActionScript 3.0 :: Pass Parameters From Parent To Child Swf?

Sep 8, 2009

I have made a piece of flash that runs on an xml document and now I need to pass a flash variable (via the html swfobject) to the flash to dictate this xml location. The variable is successfully passed if I embed the main swf straight into the swfobject.The problem is I am using a preloader swf to load the main swf onto the page and I can't seem to work out how to pass the variable (from swfobject) from the preloader to the main swf.

View 3 Replies

ActionScript 1/2 :: How To Pass Variable From Child To Parent SWF

Jul 10, 2009

Is it possible to pass a variable from child to parent movieclips. I can pass it from parent to child but not the other way around. I have a main movie which loads a child movie:
loadMovieNum("slides.swf",1);
I want to pass variable from slides.swf to the main movie. Is this possible?

View 2 Replies

ActionScript 3.0 :: Pass A Child From The Constructor To Another Function?

Sep 6, 2010

I'm sure that I'm doing something daft here - I just need to remove a child that's created in the constructor through an event listener.My code is below but does not work. Can someone point me in the right direction please?

public class Main extends Sprite  public function Main()
super();
var rectangleIndex:uint = this.getChildIndex(playerBackground)

[code]......

View 5 Replies

ActionScript 3.0 :: Pass A Variable From Parent To Child?

Nov 10, 2011

Have two swf, A.swf and B.swf: B.swf is a child of A.swf.i want to access the variable of a.swf in b.swf.Is it Possible?

View 9 Replies

ActionScript 3.0 :: How To Pass Parameter To Loaded Child

Dec 16, 2009

I have two movie clips:
1.main.swf
2.inner.swf
I'm adding the inner.swf somewhere in the main.swf using addChild (and it's added successfully).
all I want to do is to pass a parameter to the inner.swf or make the inner.swf reads a root value from main.swf.

View 4 Replies

ActionScript 3.0 :: Pass Vars From External Swf (as Child) To Parent ?

May 4, 2009

My problem is i had 2 swfs parent.swf and child .swf and i loaded the child.swf file in parent.swf using Loader class there is a textbox and a button in child.swf when we enter text in the textbox(say,notepanel_txt) and click on the button(say, mySubmit) the text present in textbox(notepanel_txt.text) is saved in the database using URLLoader and an variable called success(which is String type) must be available to parent. the code is as follows:

parent.fla
----------------
--------------blah... blah...

[code].....

View 4 Replies

Flash - How Parent Pass Text String To Child SWF

Apr 29, 2010

Parent loads Child, and wants to pass text string to Child. How can Parent pass a string
to Child swf?

PARENT.SWF
//LOAD CHILD 'has a symbol on stage called LDR that CHILD loads into'
var loadCHILD:Loader = new Loader();
LDR.addChild(loadCHILD);
var bgURLTxt:URLRequest = new URLRequest("CHILD.swf");
[Code] .....
CHILD.SWF
'has DynamicTextfield called txtBuddy'

View 1 Replies

Flash - How To Pass Variables From One Container MovieClip To Child

Nov 13, 2010

My question is not like the one I read because the context is different: Let's say instead of embedding a flash inside an html page with some flashvars, I want to embed it inside another flash or flex. How to set the flashvars in this case (using ActionScript 3)? So how to embed Flash in another flash and set same variables as it was embedded in html by passing querystring or flashvars.

View 1 Replies

ActionScript 3.0 :: Pass Variable From Parent To Child Swf Via FlashVars?

Jun 19, 2009

I'm passing a number in my HTML through FlashVars to a swf, I load an external swf into that parent swf which needs the variable that I passed.

I can use the variable passed in the parent, but I just can't understand how to attain that value in the child swf.

I've been looking into dispatch event but it seems way overkill. Haven't seen any examples dealing with something so simple.

View 4 Replies

ActionScript 3.0 :: Pass Variables From External Swf (as Child) To Parent?

May 4, 2009

I am new to flash."I am unable to access the variables of child swf in parent swf after an action(button is clicked) is performed in child swf".

My problem is i had 2 swfs parent.swf and child .swf and i loaded the child.swf file in parent.swf using Loader class there is a textbox and a button in child.swf when we enter text in the textbox(say,notepanel_txt) and click on the button(say, mySubmit) the text present in textbox(notepanel_txt.text) is saved in the database using URLLoader and an variable called success(which is String type) must be available to parent. the code is as follows[code]...

View 8 Replies

ActionScript 3.0 :: Can't Swap Child For New Class Instance IF Child Is Exported For Action Script?

Aug 18, 2010

I have a movieClip with one frame on the timeline containing one child whose instance name is "myContent"I am using this function to swap "myContent" with any number of possible class instances.

Code:
function setContentAsClass(c:Class)
{

[code].....

View 2 Replies

ActionScript 3.0 :: Flash Selecting A Specific Child By Mouseclick, Turning Off A Child Within All Non Selected?

Mar 19, 2011

I've used this site as a resource leading up to this, not particularly sure if I worded this correctly I have a class "Block" which is just a square (will be something else later on in the process) I want each block to have controls to add an additional block in either direction so I have another class BlockButtons which has my buttons for each direction.

And another class GlobalVar where I keep all my variables for funsies

[Code]...

View 1 Replies

ActionScript 3.0 :: Access Child Vars/functions Without Adding Code To Child?

Mar 11, 2010

I've seen some discussion on how to load a child swf using swfLoader and accessing it's variables but I am wondering if it is possible to do this without adding any code to the child swf.Either accessing public vars or listening for funciton calls would work fine

View 2 Replies

Actionscript 3 :: Remove A Child At A Point - Error #2025: The Supplied DisplayObject Must Be A Child Of The Caller

Dec 14, 2010

i'm new to AS3 and i was wondering what is the best way to remove a child at a point. i tried Holder.removeChild(Holder.getObjectsUnderPoint(new Point(exampleX, exampleY))[0]); however that returned ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.

View 2 Replies

ActionScript 3.0 :: Parameter Child Must Be Non-null And DisplayObject Must Be A Child Of The Caller?

Jul 22, 2009

a quick low down would be its a gallery on the second frame and I breaks when coming back tot he first frame, all tweens die and such.

the errors are:

TypeError: Error #2007: Parameter child must be non-null.
at flash.display:isplayObjectContainer/removeChild()
at index_779_fla::MainTimeline/imageLoaded()

[code]....

View 1 Replies

ActionScript 3.0 :: DropTarget Parent Child - Removechild Won't Remove A Child

Aug 21, 2010

I have an issue where removechild won't infact remove a child. I think its something to do with my dropTarget.parent issues. The concept of the code is that you drag a source onto a destination. When you drop the source onto the destination you will get a text field that says "Hello" or "Goodbye". The objective i want to achive is that once i drop a source onto the destination, removechild will remove any previouse textfields added. This is proving difficult.

[Code].....

View 3 Replies

ActionScript 3.0 :: Removing Child (a Sprite) Containing (dynamic Textfield) Child?

May 12, 2010

I have created 2 sprites each containing a dynamic text field child. I then add this as a child of the stage. (I have done this in order to make the text clickable with a hand cursor on mouseover)It loads in fine, I just run into problems when trying to REMOVE it the sprite containing the text."ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller."Sections concerned in red:

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

[code]........

View 2 Replies

Flex :: How To Add Child As First Child

Jul 28, 2010

I am adding child as:containerComponent.addChild(newComponent);But, it adds it as last child. How can I add newComponent as first child of containerComponent?

View 2 Replies







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