ActionScript 3.0 :: How To Expose Property Of Loaded SWF

Sep 2, 2010

I'm extending / modifying this tutorial to create a runtime asset loader class. Kinda got it working, but in efforts to streamline it, ran into this issue:
- doc class for external library swf:
ActionScript Code:
package com.b99.runtimeLib {
import com.b99.utils.IRuntimeLibrary;
import flash.display.MovieClip;
[Code] .....
In this case, ASSET_DEF is returning undefined, and isn't showing up as a property during debug. How to expose this property to the loading class?

View 7 Replies


Similar Posts:


Flex :: Expose Component's Existing Events With New Name?

Jan 21, 2010

I created a flex component that hosts several built in (mx) components such as a listbox and combo box. My component relies on external data, and I need to expose events such as ComboBox.enter and List.click to get certain pieces of data.I was wondering if there is any easy way to do this without having to create my own custom event handlers. I'm simply trying to expose these events with different names so that when my component is used, I can do things such as:

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

[code]........

View 4 Replies

ActionScript 3 :: Flash - Expose A Vector As An Enumerable Type?

Mar 8, 2011

I have a class member in an ActionScript 3 class that looks something like this:

private var m_myvect :Vector.<MyType> = new <MyType>[];

I'm exposing it through a getter, like this:

public function get mydata() :Vector.<MyType>

Which doesn't help when I use it like this:

for (var o:Object in inst.mydata)
{
...
}

... because the type of o is not MyType, but Number instead, because it enumerates the vector indices instead of the data.How would I expose only the data within the vector in a way which:Does not expose the data in a way which allows it to be modified?

View 1 Replies

Flash :: Expose A Method In An Interface Without Making It Public To All Classes?

Nov 7, 2009

I have a issue where I'm working with a particular interface for quite a lot of things. However, I have a particular method that I want to be available only to a particular group of classes (basically, an internal method). [code]...

View 4 Replies

Actionscript 3 :: Inside The Library Use Of A Bunch Of Classes/packages - Expose One Of These Classes?

Feb 3, 2012

I am creating a library in AS3. Inside the library I make use of a bunch of classes/packages that need not be exposed to the end user of my lib. I want to only expose one of these classes.

I guess my questions are:

1) How are libraries commonly distributed in AS3?

2) Is there a .jar equivalent in AS3 that developers can include, but will only have access/knowledge of the classes I've declared as public?

View 2 Replies

ActionScript 3.0 :: Using Root Property When Swf's Are Loaded In Other Swf's

Mar 25, 2011

Ive a quick question on using root property when swf's are loaded in other swf's. Is it safe/wise to reference MovieClip(this.root) in packages/classes if the swf will be loaded and placed inside another swf? I read once that root will always refer to maintimeline, and all objects have the same root. So...will the root change in some way if a preloader loads the main swf?

View 5 Replies

ActionScript 3.0 :: Error Accessing Property Of Loaded Swf?

Oct 11, 2010

I am getting the following error when I importmy swf onto my main stage: TypeError: Error #1009: Cannot access a property or method of a null object reference.

at FtScrollBar/set useMouseWheel()
at ButtonsMenu_fla::buttonsScrollingMenu_1/ButtonsMenu_fla::__setProp_sb1_buttonsScrollingMen u_ScrollBarComponent_1()
at ButtonsMenu_fla::buttonsScrollingMenu_1$iinit()[code].....

On it's own the carousel works fine, it's only when I import it that it throws an error, all of the components within the carousel work fine (the images are highlighted on mouse over, the onclick code for the thumbs runs the right functions) it's just the scrolling that doesn't work.I've tried removing the references to stage from the loaded swf but I still get the same errors.I'm fairly new to flash but I'm finding the error messages to be fairly unhelpful at the best of times, I've attached the swf I'm trying to load in in a zip

View 1 Replies

ActionScript 3.0 :: Access Property Of Main Class In Loaded Swf

Aug 28, 2010

i have one main.fla, its document class is main.as. the code in main.as is package.[code]where val is the property of Loading class.so how can i access.

View 2 Replies

Flex :: Keep A Loaded SWFs Stage Property Localized To That Swf?

May 24, 2010

Does anyone know of a workaround for loading an AS3 swf into an existing AIR/Flex (Flex 3) application and having the loaded SWF retain its own reference to its stage (not the loader's stage)?

I've tried the loadForCompatibility property on SWFLoader, but that isn't giving me the behavior I'm wanting. The loaded swf still has the main AIR app's stage set.

View 1 Replies

ActionScript 3 :: Flash Bugs When Accessing Property In Loaded SWF

Apr 10, 2011

I try access to (MySWF(movieClip)).id but I get a weird message error:
1120: Access of undefined property aslider
Which is defined in MySWF.init. If I remove (MySWF(movieClip)).id program works perfect! Isn't this weird especially as I have added
addEventListener(Event.ADDED_TO_STAGE, init);
in MySWF constructor to ensure that aslider is on the stage.

In main:
private var idMySWF:int;
public function loadMySWF(event:MouseEvent) {
idMySWF = 1;
var myLoader:Loader = new Loader();
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
[Code] .....

View 3 Replies

ActionScript 3.0 :: Assigning The Value Of A Property In An Externally Loaded SWF To A Local Var?

Mar 13, 2009

A have a external SWF file that contains an instance of an object that will be used across multiple projects. It's accessible as a public property of the external SWF.When I load the external SWF file using the Loader class everything comes in fine but when I try to assign the value of that property, which traces out as an instance of the correct object, to a local variable the local variable is always null.Below is a dumbed down sample of what I'm trying to accomplish:# Object Class

Code:
package com.derrickcurry
{

[code].....

View 1 Replies

ActionScript 3.0 :: Control The Property Of An Object In Main Stage From A Loaded Swf Timeline

Oct 11, 2010

i have a UILoader that loads an image from an xml list when you click its thumbnail ( in its thumbnails mc on mainstage aswell) thing is, i have another UILoader on the layer above that loads in a swf ( a slideshow that fades in and out the pictures when they change to the next, with all the coding on frame 1, frame 2 only has a stop and some code for when the mouse is idle for 5 secs it goes back to frame 1) so when you go to "portraits" it takes you to frame "x" where the slideshow ( loaded external swf ) starts playing automaticly right, if i click any thumbnail the slideshow goes to frame 2 ( wich is perfect and the mouse idle thing i wanted works great ) the ONLY THING IS

after the slideshow runs by default for the first time ( i enter the category portraits ) and i click any thumbnail ( moving slideshow swf to frame 2 enabling mouse idle event ) and the mouse is idle ( so it does the event and starts playing the slideshow again ( goes back to frame 1 ) ) I CANT MAKE THE UILOADER OF THE THUMBS IMAGE TO DISSAPPEAR!

View 5 Replies

ActionScript 3.0 :: Get Stylesheet Loaded - Keep Getting "1120: Access Of Undefined Property"?

Nov 28, 2009

I have been trying to get my style sheet to load for 3 days now and I have to say I am at my wits end, does not help that I am a newbie. I have built a flash site at[url].....

I have an action script (3.0) that when you click on a link it calls content to slide in from the left and then clicking on another link the old content slides off and the new content slides in. I have been trying to get style sheets working with my xml which are now working in the editor but I cannot get my style sheet to load in Flash CS4 and Action Script 3. I could not figure out where to put the css code in the action script so have been loading it separately on frame 1 in my movie.I keep getting "1120: Access of undefined property" My code is

//init TextArea component
mover_mc.html = true;
mover_mc.wordWrap = true;[code]..........

To make this a little more complicated I have a layer called content which contains a movie clip called mover_mc and inside this I have a textfield called myText. This is set to be dynamic and multiline. My stylesheet is called sample.css.I load up to mover_mc or the actual text field and when I see examples that have MyCSS do I change this to the name of my style sheet.If I change the stylesheet object to

//Create a new style sheet object
var sample = new myText.StyleSheet();
var sample.load("sample.css");
myText.styleSheet = sample;

I then get an error - 1086: Syntax error: expecting semicolon before dot. I have attached my XML action script, CSS file and one of my xml files as well.

Attachments:
home.xml (612 bytes)
sample.css (653 bytes)
Content.as.zip (1.0 K)

View 4 Replies

ActionScript 2.0 :: _visible Property Onload - Other Movie (menubar.swf) Is Loaded Before First Movie

Jun 27, 2005

I have 2 EXTERNAL movies being loaded with initial load of my site into my main.swf, one of which (movingbg.swf) is being loaded with a preloader. The problem is that my other movie (menubar.swf) is loaded before my first movie. I think I should use the _visible property to solve this and here is what I have so far...

[Code]....

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 :: Changing Value Of DateField.text Property Setting SelectedDate Property To Null?

Jul 26, 2011

Setting the text property of a flex DateField makes the selectedDate property of that DateField go to null.I need to set the text property so that I can use a particular format (DD-MMM-YYYY).

View 2 Replies

Flex :: Binding - Bind Property Of View To Property Of Class Using MATE?

Jan 9, 2011

Lately i discovered MATE (for Flex development) and was wondering: how do i bind a property in a view (actually a navigatorcontent component) to another property in a class so that they stay in synchronization (meaning that whenever the property in the class changes the property in the view also changes).

So if we have a view called Target.mxml and a property targertProp how do we bind it to the class called SourceClass with property SourceProp?

View 3 Replies

ActionScript 3.0 :: Accordion Control - Difference Between SelectedChild Property And SelectedIndex Property?

Sep 16, 2009

What's the difference between selectedChild property and selectedIndex property? I read the documentation, both seems to be setting currect active accordion. selectedChild can be only used in actionscript, but other than this, what's the difference?

View 0 Replies

Flex :: Change The Value Of The Source Property To Destination Property?

Sep 20, 2011

Can we put [Bindable] on functions/methods? I know that bindable is used to change the value of the source property to destination property. But not sure if we can use that for methods. why we cannot put/ if we can then what will be the outcome?

View 1 Replies

Actionscript 3 :: Getting The Value Of A Property Within Another Property Via Square Bracket Notation

Nov 29, 2011

I have a class Inhabitant with a property skin which is of type DisplayObject.

Within Inhabitant I need to access the x and y properties of skin using this method:

this["someProperty"];
Rather than:
this.someProperty;

This is fine with properties defined within Inhabitant but I'm not sure how I could do this for a property of skin. This obviously doesn't work but it might give you an idea of what I'm trying to do:

this["skin.x"];

The reason behind requiring this notation is that I have a function which I can parse a String though that will represent a property:

public function addTokenable(property:String):void
{
if(!isTokenable(property))
_tokenables[property] = true;
}

And then a related getter that will return a representation of this instance of Inhabitant as a String:

public function get token():String
{
_token = "class:" + getQualifiedClassName(this).split("::").join(".");

[Code]....

View 1 Replies

Flex :: Bind A Property To A Flash Property?

Jan 23, 2010

I'm wondering if there is a way I can bind a flex property to flash property?, the flash property is inside a swc file created in flash with the Flex Component Kit for Flash Professional, I can manipulate the flash component as a regular flex component, but I want to bind their properties, is there a way?

View 1 Replies

ActionScript 3.0 :: Property Of A Property

Apr 27, 2009

I can only explain this by an example; so:I have 2 classes and one of them includes the other as a getter/setter property.I need the following code to return the same result:second.first.X = 1; //but it does not. ( ExpectedMethod() is NOT fired. )

View 2 Replies

ActionScript 3.0 :: Cannot Create Property - Error #1056: "Cannot Create Property _ld0 On Tsl"

Jan 28, 2009

[Code]...

I get "Error #1056: Cannot create property _ld0 on tsl." error.

View 4 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 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 3.0 :: External XML Works Loaded Offline Not Loaded Online?

Apr 15, 2009

Code:
var slideNo:Number;
slideNo = 0;
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, showXML);

[code]....

View 3 Replies

Actionscript 3.0 :: Loaded Sound Doesn't Stop / When A New One Is Loaded

May 8, 2009

I have three btns on stage, clicking on each one i want them to load an external mp3.The problem is the previous loaded sound doesn't stop when a new one is loaded so I have all sounds playing at the same time

View 3 Replies

ActionScript 3.0 :: Kill Button On A Loaded Swf That Removes Itself (loaded Swf)?

Jan 21, 2009

I have a swf loading another swf. The loaded swf has a button (mc) whose purpose is to unload (kill) itself (the swf).

View 3 Replies







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