AS3 :: Flex - Access An Object Inside A Loaded Swf?

Jun 28, 2010

I have two swf, one loads the other using a Loader class, in the loaded swf I have a NetConnection object which I need to access from the host swf, but I can't, if I debug the app, I see the obejct is there, but I can't access it, if I try to set a variable likeloadedSWF = connectorLoader.content (connectorLoader is the Loader object)loadedSWF is always nullIf I debig the app, I see the NetConnection in the loaded SWF, but I can't have access to it, I have try to use Security.allowDomain("*") in both swf to be sure, but nothing, I thought that only doing the allowDomain method I will have access to the loaded SWF objects

View 1 Replies


Similar Posts:


Flex :: Access XML Object In Restlet 2.0 Thats Wrapped Inside A Representation Object?

Jan 7, 2010

I am developing an application with Flex for the GUI and Restlet for the webservices. I have a strange problem. I put my XML as a property on a generic object, and send it as part of a POST request. But in the Restlet webservice, this XML is irretrievable. How do I retrieve it? I tried initialising the received Representation object to a DomRepresentation, but thats not working. If I put the received Representation object into a Form object, then getFirstValue is returning that XML as a string! I noticed that the contentType of the HTTPService was application/www-form-encoded so I set it to application/xml and its not helping either. I use restlet 2.0m6 and here is the code snippet that I use -

[Code]...

View 1 Replies

ActionScript 3.0 :: Cannot Access Flashvars Inside Loaded AS2 SWF

May 25, 2009

I have an AS3 swf which loads and external AS2 swf. Inside the AS2 swf i have the following code which fetches the flashvars passed through html.

flashpar.text = "Params: " + _level0.name;

When i run the AS2 SWF independently passing the param through HTML. It works fine.But when i load the AS2 swf inside AS3 swf. It is not able to fetch the flashvars, which is strange cz if i load the AS2 SWF inside another AS2 swf it works fine. how should i fetch the flashvars inside the loaded AS2 SWF.

View 3 Replies

ActionScript 3.0 :: Cannot Access Flashvars Inside Loaded SWF

May 25, 2009

Here's what i am trying to do. I have an AS3 swf which loads and external AS2 swf. Inside the AS2 swf i have the following code which fetches the flashvars passed through html.

flashpar.text = "Params: " + _level0.name;

When i run the AS2 SWF independently passing the param through HTML. It works fine.

But when i load the AS2 swf inside AS3 swf. It is not able to fetch the flashvars, which is strange cz if i load the AS2 SWF inside another AS2 swf it works fine.

how should i fetch the flashvars inside the loaded AS2 SWF.

View 1 Replies

Actionscript 3 :: Access A Function Inside A Loaded .swf File?

Sep 22, 2010

Is there a way to call a function inside a loaded SWF file?

Basically, I have a .swf file (A) that loads another .swf file (B)...I would just like to treat B as if it was any other instance added to my class .swf "A"...

Have to recast "Loader" with the name of your .swf file class:

Loaded .swf class:

package src {
import flash.display.MovieClip;
public class LoadedSWF extends MovieClip {

[Code]....

View 2 Replies

ActionScript 3.0 :: Access Movie Clips Inside Loaded SWF?

Feb 9, 2010

So I am loading an SWF like this:

ActionScript Code:
public function layoutLoad(e:Event):void
{
FlashConnect.trace("Display.loadLayout()");

[Code].....

It will compile but I get a "Cannot access a property or method of a null object reference." So I am not targeting right. I did double check my instance name is correct and in the root of the loaded SWF

View 2 Replies

C# :: Access Text Inside Flash Object?

Jul 15, 2011

I've got to access text inside a flash object. The preferred method is via C#, but anything that works will do. The only requirement is that I'll need the resulting information to be transferred back to c# code.Let's take, for example, this page.With fireflashbug, you can easily access individual elements inside flash object and read/change html texts inside each of them.To work, it requires Flash Debugger.How can I do the same from my own code?

View 2 Replies

ActionScript 3.0 :: Access Object Inside A MovieClip From A Class?

Jan 4, 2011

I have a movie clip symbol placed on the main timeline. The class linkage to that movie clip is Sheet. Inside Sheet class, I make a public string call _textRow. Inside the Sheet's constructor, I create a new TextField call values_txt. Inside the Sheet class again, I create a public function call updateTable().

The document class is Main. From the Main.as, I need to call updateTable() function to update the text inside values_txt. And I need to find a way to get to values_txt. That's where my problem lies.

Actionscript Code:
package{//imported stuff herepublic class Sheet extends MovieClip{public var _textRow:String = " Lorem
Lorem again";public function Sheet(){addEventListener(Event.ADDED_TO_STAGE, initSheet);}public function

[Code]....

Basically, I need to run Sheet's updateTable() from Main.as and update the values_txt.text with _textRow string. But I don't know value_txt's target path.

View 9 Replies

ActionScript 3.0 :: Access A Method Inside The Object's Class?

Apr 9, 2010

I created an array of objects and put an event listener  on each of them. My problem is that when the object is clicked, I want  to access a method inside the object's class but I do not know how to  reference its position in the array. This isn't very clear but hopefully  my code will make it clearer.
 
This line is inside  while loops and puts an event listener on every square.
 
[Code].....
 
How can I know which square has been clicked?
 
Note: e.target returns the following error:

ReferenceError: Error  #1069: Property placeChar not found on flash.display.Sprite and there is  no default value.

View 3 Replies

ActionScript 3.0 :: Access A Variable Inside The Layout Object?

Jan 26, 2009

I've made a 'Layout' class and I want to access it from a 'Container' class, but my compiler shows 'access of a possibly undefined property' when I try to access a variable inside the Layout object. Here's the Container class.

Code:
package {
import flash.display.*;
import flash.text.TextField;
import flash.geom.*;

[code]...

View 3 Replies

Actionscript 3.0 :: Access Property X Of An Object Inside An Array?

Sep 1, 2009

I've created a card (that extends movieclip) in flash and after that I've created an array and pushed some cards inside of it. The name of the mcs is already set, but now, I want to add them to the stage and set their x and y position.

Code: Select allvar test:Array = new Array();
var testMC1:Card = new Card();
var testMC2:Card = new Card();

[Code].....

How can I access the property x of this card? The next code is wrong, of course, but it gives the idea of what I need...

Code: Select alltest[1].x = 100
// or
test[card3.x] = 100;

View 4 Replies

Flex :: Access To Object Property When The Propety To Access To It's In A String Variable?

Oct 20, 2010

It's too complicate to explain but I'll give you an example

I have an AS3 ResultEvent Object and this object has several propeties which can be accessed by this like:event.result.name or event.result.age and, I have this String variable: eventProperty:String that contains "name" or "age" How do I access to event.result. with the variable?

View 2 Replies

Flex :: Access A View Inside A Tab Navigator When A Tab Is Clicked?

May 19, 2010

I I have a view in Flex 3 where I use a tab navigator and a number of views inside the tab navigator. I need to be know which view was clicked because of it's one specific view then I need to take action, i.e. if view with id "secondTab" is clicked then do something.

I have set it up to be notified, my problem is that I need to be able to know what view it is. Calling tab.GetChildByName or a similar method seems to only get me back a TabSkin object.

<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
width="100%"

[Code].....

View 2 Replies

Flex :: Access The Property Of An Ellipse Inside A Group?

Jan 3, 2012

Let's say I have the following MXML:

<s:Group id="b01">
<s:Ellipse x="267" y="96" width="30" height="28">
<s:stroke>[code]....

And that I have a dozen more of these groups with different ID's. How can I modify the fill color of each Ellipse using ActionScript? I know I can do something like this:

b01.getElementAt(0).width;

And that will give me the width of the Ellipse. But how can I access the SolidColorStroke color or the SolidColor fill?

View 2 Replies

Flex :: Access Properties Of Component Inside Item Renderer

Jun 1, 2010

I have an Item Renderer having HBox. Now I want to add child in that HBox from my application file using addChild method. Any way around for the same. I am not able to access the properties of HBox inside the item renderer.

View 1 Replies

Actionscript 3 :: Flex : Access The Implicit Event Dispatcher Of A Bindable Flex Object?

Mar 4, 2010

If I create an object like so:

class Foo {
[Bindable] public var property: String;
}

The class Foo has an implicit event dispatcher to handle property change events. How can I access that without making Foo explicitly extend EventDispatcher?

View 1 Replies

Flex :: Access A Function From Loaded Swf-file?

May 6, 2010

i load in ActionScript a swf file. So far no Problem, but I didn't found a way to access one of it's functions, the best thing would be if I could access the main function in the mxml part of the swf.

Here is the code of the main-mxml file that belongs to the swf that should load and access another swf[code]...

View 2 Replies

Actionscript 3 :: Flash CS3 Swf Loaded Inside Flex (Bitmap)?

Aug 21, 2009

I have loaded a SWF which is created in Flash CS9 (AS3). I'm having problem passing Bitmap (or BitmapData) from the flex app to the loaded SWF.

Invoking of other functions in the loaded from Flex works, but when I try to pass a Bitmap to the loaded SWF, nothing happens. Here's a sample code:

[Code]...

View 2 Replies

Flex :: Handling Event Inside Loaded Swf In MATE?

Sep 12, 2011

Can I handle an event inside a loaded swf file(using swf loader) using MATE when my main application fires the event ? i want to make a remote service call based on the data i get from the main applications event , and then populate my loaded swf .

View 1 Replies

Flex :: Access The Public Properties And Methods Of A Loaded SWF

Mar 18, 2011

How would you go about calling the public properties and methods of a SWF you load in actionscript?

I have been using stackoverflow for years to answer my programming questions so I wanted to give back by writing a guide to an issue I had a lot of trouble figuring out. This is my first user guide so tell me if there is anything I can do to improve it.

View 3 Replies

Actionscript :: Call Functions Inside The Swf File Loaded In SwfLoader Of Flex App?

Nov 18, 2010

I have a swf file sample.swf which has its actionscript class in Main.as. This Main.as has various objects declared as public in it. For instance lets consider an object myData of class MyData (in MyData.as).

I am loading this swf file in my AIR app using swfLoader. I want to know how do I access myData.func() using swfLoader.loaderInfo.content.

View 2 Replies

ActionScript 3 :: Flex - How To Access Object Declarations

Apr 4, 2012

I would like to iterate through an object's validators. Validators must be declared in a declarations tag. How does one scroll through declarations? If one cannot, is there a better of locating all validators other than scrolling through all properties of an object?

View 2 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

Flex :: Data Access Object Or Inline Methods?

Jan 28, 2011

I am still very new to Actionscript and have an okay working knowledge of Flex. I am working on an AIR application that runs a SQLite database underneath. The database is only 3 tables (projects, items and types). I was wondering if Actionscript best practices are to use a data access object or layer to store all of my database functions or to just run them inline as needed. I would assume an access layer would be best for interacting with the database for usability, but I can't seem to find much documentation for SQLite in AIR.

View 1 Replies

Flex :: Flash Player 10.1 Crash On Shared Object Access

Jun 14, 2010

since updating my Flash Player plugin from 10 to 10.1, I'm seeing a weird crash when accessing shared objects. Flex Builder's debugger pops up and prints a stack trace like this:

undefined
at flash.net::SharedObject$/getLocal()
at my.code::MyClass$/load()[/my/path/to/my/MyClass.as:27]
(...)

This happens when calling SharedObject.getLocal("someString") for the second time for the same string, though it doesn't always crash. When using another browser on the same machine (not configured as the preferred debugging browser in Flex Builder), Flash Player remains silent. The code is wrapped in a try/catch(Error) block which does not catch this error. I'm using Flex SDK 3.5 and Flex Builder 3 on Mac OS X 10.6.3.

View 4 Replies

Flex :: Cannot Access A Property Or Method Of A Null Object Reference

Sep 4, 2010

I try to do preloder in Flex for my project written in Flash. I make this with the help of this site link text My Flash project have next source in main class called Game

stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUp);
private function keyDown(event:KeyboardEvent) {

[Code]....

Flex application work but Flash application does not react to button presses

how I can make preloader and work buttons together

View 2 Replies

Flex :: Draw A Circle Inside Border Container Using Graphics Object?

Apr 5, 2011

My basic requirement is to draw a circle inside a BorderContainer with the layout set to BasicLayout.I run this method in the CREATION_COMPLETE event of the BorderContainer object.[code]I know I must be missing something VERY basic here. Can I just draw like this OR should I draw in some other event? I know that I can create a Ellipse object and easily add it to the border container but I would like to know how I can do this using the graphics object.

View 3 Replies

Flex :: Access An Object In A Mxml File In The Constructor Of A Class That Extends It?

May 12, 2010

I have extended an mxml component with an actionscript class. I'm trying to access a component in the mxml file using the id (in order to add an event listener) but I cant seem to do it.

I get:

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

View 1 Replies

Flex :: Error - Cannot Access A Property Or Method Of A Null Object Reference

Aug 8, 2010

I am building a AS3 only project and got runtime error that said "Cannot access a property or method of a null object reference."

Here is my code:

main.as
public class videoMain extends Sprite{
private var videoPlayer:Player;
public function videoMain (){

[code]....

View 1 Replies

ActionScript 3.0 :: Flex - Cannot Access A Property Or Method Of A Null Object Reference?

Jan 23, 2009

TypeError: Error #1009: Cannot access a property or method of a null object reference have a mxml file that has actionscript inside of it, I'm trying to call a function in a button outside of this actionscript in the same mxml file. I'm calling the public function cancel(); like this click="cancel();" but i'm getting an error 1009 that I can't access a property or method of a null object reference

Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox

[code].....

View 5 Replies







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