Actionscript 3 :: Properties Null At Component Drawing Time?

Feb 23, 2012

I have got problem accessing a property of a component. I want to use this property to decide whether to include a particular child component.

For example:
MyMainView.mxml lists this component
<view:AnotherView id="anotherView" aPresenter="{thePresenter}"/>

Now AnotherView.mxml has a property

<fx:Script><![CDATA[

[Code]......

flow of events on creation of a flex component and how I can use the aPresenter property in .

View 1 Replies


Similar Posts:


Flex :: 4 - Null-component - Checking If The Cancel Button Component In The Child Component?

Jun 23, 2011

I have a component "child" which has a cancel button. Now this component is placed in a state called "newChildComp" I also have another component called "parent". In the parent component, i have a button that dispatches an event. Here is the event code:

[Code].....

so, basically,i am checking to see if the cancel button component in the Child component, while i am still in the parent Compoent, was clicked, if it was clicked, call the cancelButtonHandler. The problem is by the time the addNewChild handles the event, that cancel button was still null. My question is how do i solve this without using the itemCreationPolicy on the cancel button?

View 1 Replies

Flex :: Access The One Component Properties Form Other Component With Out Binding?

Sep 21, 2011

I would like to bind two components with out binding and which resides in different MXML.for eg: A.mxml has textinput and B.mxml has a combobox when choose one item in B.mxml selected item should be display in A.mxml textinput.

View 2 Replies

Flex :: Access Component Properties From Extending Component

Jul 29, 2011

I have a component with a public variable declared

[Bindable]
public var mnuSource:String;

When I extend this component, I can reference mnuSource (it compiles) but Runtime complains about the property not being accessible (error 1056).

How do you modify / declare component properties so they are actually available to other components?

View 2 Replies

Flex :: AdvancedDataGridEvent - Properties Come Back Null?

Sep 15, 2010

Yet another woe with the AdvancedDataGrid - this time, with the AdvancedDataGridEvent. It seems that when listening to the ITEM_EDIT_END event, several of the event properties are returned null. I've been getting null for event.column, event.item, etc.

View 2 Replies

Flex - XMLListCollection Properties In Custom Components Always Null?

Dec 11, 2009

I've written the following custom component, SubNavBar.mxml:

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" height="100" width="300"
creationComplete="init()">
<mx:Script>

[Code]...

Whenever the trace function runs in init(), the property menuItems returns null. I don't seem to have this problem with other variable types, like Boolean or String. Is this due to the size of the XMLListCollection object? How can I set up this SubNavBar custom component with XMLListCollection property and bind it to a control in the component?

View 2 Replies

ActionScript 3.0 :: Get Total Time And Time Played From Flash Video Component?

Jul 6, 2009

I've loaded a video into the FLVPlayback component and I'm looking for a way to get the total time and the time played so far and output them to two text fields so the end result would look something like "00:12/00:50".

Right now I'm defining the video by the components inspector but I'm eventually hoping to define this bit by actionscript as well.

View 6 Replies

Actionscript 3.0 :: FLVplayback Component : Add The Time Elapsed And Time Left On The Controls?

Feb 9, 2010

Im using the FLVplayback component for a project im doing. I want to add the time elapsed and time left on the controls (just like how the player on the tutorials on this site works). I dont really want to create my own controls, as im happy with the flv playback component.

View 2 Replies

ActionScript 3.0 :: Error #1009: Null Object Reference Can Not Access The Properties Or Methods

Sep 3, 2009

Load external SWF file, an error: TypeError: Error #1009: Null object reference can not access the properties or methods.

View 0 Replies

Drawing During Run Time

Jul 23, 2009

Does anyone have the code for drawing lines (with smoothing) in an onMouseDown click event?

View 1 Replies

ActionScript 2.0 :: Check A Run-time Drawing?

Jun 19, 2011

I made a run-time drawing board, to draw a specific shape by using movieclips. But I don't know how to check it. For example, if they draw a rectangle, I want a message to show up. How can I check a drawing?

View 1 Replies

ActionScript 3.0 :: X And Y Properties In ScrollPane Component?

Jan 18, 2010

I have a small problem with ActionScript in a SWF file I'm creating. It is a ScrollPane component where I want lo upload multiple buttons with links to Web pages. I have everything prepared, a ScrollPane created and buttons as well (about 30). What I cuden't find is how to locate the buttons on stage with the properties X and Y, how introduce the properties for each of the buttons. I still do not handle well ActionScript and the manual I have is very basic.

View 2 Replies

ActionScript :: Component's Properties Inheritance?

Dec 6, 2010

I'd like to create some kind of component's properties inheritance to create generic behaviors in my component.Imagine I work a lot with textfield based components (counters, animated text... and so on), I'd like my artist to custom these components without being scared by the "update" button. Today, when component's code is updated, my artist has to update every flas using these components, and all of them are re-set to original look (if he had customed font color, or font size by duplicating the component instance, everything is set back to the current look of component).

That's why I'd like to know if there is a way for a component to inherit some of its properties and behaviors from another component class ?

View 1 Replies

Flex :: What Component To Extend For Drawing Application

Jul 28, 2009

I wonder which component to extend in Flex 3 in order to make a drawing stage.

View 1 Replies

Professional :: Drawing In Real Time In A Film

Aug 1, 2010

Drawing in real time in a film

View 6 Replies

ActionScript 3.0 :: Convert A Drawing API To A Bitmap At Run Time?

May 5, 2009

Over the weekend i put together an MP3 player in Flex and just managed to figure out the SoundSpectrum.

It is working as expected.

I am facing problems when it comes to using a bitmap.

Right now, my "Analyser" class pulls the data from SoundMixer.computerSpectrum.

I then use that data with the drawing API to create a simple analyser. You know, just spikes.

Here is the code for that part:

Code:
private function update(e:TimerEvent): void
{
SoundMixer.computeSpectrum(ba, true);
var n:Number = 0;

[Code]....

Ok using common sense here, I am telling flash to take a snapshot of the Analyser and draw it to the bitmapData.

However, i cant seem to get this working. I am not using the dispose() method to clear the bitmap so id expect to see a mess of points (similar to if i removed the g.clear()) but nothing happens.

View 1 Replies

ActionScript 3.0 :: Adding Component Parameters / Properties?

Feb 17, 2009

I've exhausted searches looking for how to add properties to the component properties panel for a custom AS2 and AS3 components.This Adobe Livedoc suggests using Inspectable tags before variables:[URL]I've also tried adding the components via the Component Definition dialog in the library.Both methods work in that they produce an .swc, but neither adds the properties into the Component Properties.

View 1 Replies

ActionScript 3.0 :: Accessing Some Properties Of A Custom Component?

Jan 15, 2009

I have been stuck on this problem for a while, and wonder if anyone knows the answer. It is concerning accessing some properties of a custom component. I marked the problem with the keyword [PROBLEM] in the following snippets of code.

components/State1UI.mxml
--------------------------------
<?xml version="1.0" encoding="utf-8"?>

[code].....

View 0 Replies

ActionScript 2.0 :: Accessing (Nested) Component Properties From Class

Jul 29, 2009

(Actionscript 2 btw - and actually cs4, not that it really makes any difference?) I have a class that instantiates a movieclip from the library, e.g.:
Code:
debugbar:MovieClip = thing.AttachMovie("debugbar", "debugbar_mc", 999);
So attaching it to the where ever "thing" is - could be movie clip or level0 or whatever, doesn't matter as "debugbar" is a private variable of the class. Now the important part - debugbar in the library is a movieclip that contains some components - buttons and textInputs. The problem comes when trying to access these components.

I would have thought that this would work:
Code:
debugbar.input_txt.text = "hello";
In order to set the text of "input_txt", the instance name of a TextInput component on the timeline of the movie clip (put there in author time). However, this does not work. Infact, I cannot access any specific "component" properties - they come back undefined. I can however set and retrieve MovieClip properties for the "input_txt", such as _x. However there is one added strange thing with this too - setting _visible to false doesn't seem to work (however perhaps a component by default overrides this).

I also appear not to be able to add event handlers to the component - at least for the usual component events. I tried casting it to a component, such as:
Code:
var temp:TextInput = TextInput(debugbar.input_txt);
trace(temp);
which gave "temp" as null.
However if you trace the thing itself without casting to what it is, it gives the path to correctly. It almost seems like the components are somehow broken when trying to access them this way - or that they cannot be accessed this way?

The thing is, I was able to access all of this before, when the code to do it was placed on the timeline (frame 1, the only frame) of the debugbar itself, where the components were child instances. This meant I could just reference them directly too - so input_txt rather than debugbar.input_txt , although that is probably largely irrelevant. I need to have it in a class though, as I need to pass in certain objects that need to be accessed by the mc.

View 2 Replies

Actionscript 3 :: Flex4 - Changing Component Properties Of SkinnableComponent?

Jul 26, 2010

Flex 4 separates the visual components into the skins. So how do we access those visual elements from Skinnable component? Here is my code:

<?xml version="1.0" encoding="utf-8"?>
<s:SkinnableComponent xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" skinClass="skins.brushedSkin"

[code]......

View 1 Replies

Flex :: Creating Custom Component With A Drawing For Hero Mobile?

Dec 30, 2010

I'm trying to create a custom component which displays a red rectangle in the middle with the following Flex Mobile project for Android (in Flash Builder 4.5 Burrito) -

MyComp.mxml (has no errors):

<?xml version="1.0" encoding="utf-8"?>
<components:MobileApplication
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code].....

even though I have added c:Program FilesAdobeAdobe Flash Builder Burritosdks4.5.0frameworkslibsmxmx.swc to Flex Build Path (by clicking "Add SWC" button in the project properties dialog).

PS: Power Stackoverflow-users, consider adding a tag for Android-AIR or Flex-Hero or maybe Flex-Mobile

View 1 Replies

ActionScript 3.0 :: Accordion Component Null Reference?

Apr 23, 2010

I've got an mx accordion component that I want to populate at runtime. However, the first box will populate fine, but all the others return null reference so I can't access them. Does this have something to do with which one is currently selected? I'm creating my accordion:

<mx:Accordion x="398" y="207" width="331" height="250" alpha="1.0" borderStyle="solid" borderThickness="0" cornerRadius="10" fontFamily="Arial" color="#000000">
<mx:VBox label="EDITOR'S NOTES" fontSize="10" width="100%" >

[code].....

View 2 Replies

Actionscript 3 :: Change Properties Of An Object In Real-time?

Aug 29, 2011

I have a Sprite object that I called three methods[code]...

View 1 Replies

ActionScript 2.0 :: Global Variable And Properties: One Time Buttons?

Dec 8, 2010

I've been working at this for hours and still no luck what I'm trying to create to have 8 buttons on one frame leading to different scene each. In the scene different things happen and then eventually it leads you back to the first scene without the pressed button there anymoreFirst I tried this:I've been try to do this for a while now and seem to be really stuckIn my movie I have 2 scenes in the first one there is a button that is flashing using tween and alpha. in this scene I'm using this code:

stop();
btn1.play();
btn1.onPress = function()

[code].....

View 5 Replies

ActionScript 2.0 :: Speeding Up The Drawing Methods - Render More Than 50 Lines At A Time

Jun 1, 2003

i'm working on a drawing tool with the flash drawing methods, but my movie starts to slow down. i'm storing the variables in an xml object and then looping through them onEnterFrame. right now i'm limiting the amount of lines that are drawn to 50. anyone have any tips on speeding up the drawing methods. as i understand it they are the same methods that flash uses to draw all it's lines. shouldn't it be able to render more than 50lines at a time.

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

Flex :: Passing Properties To Custom Component In Flash Builder 4

Sep 7, 2010

I'm trying to pass some properties to a component I've created in Flash Builder 4. In my example below I want to pass the "label" property to update the label property of the Button.

// MyApp.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:local="*">
[Code] .....

View 1 Replies

ActionScript 2.0 :: Setting Component Properties Of Dynamically Created Movieclip?

Mar 2, 2008

I created a movie clip symbol with a user interface in it, using the standard components. It contains various components that I draged on the stage. I named the instances (e.g titleLabel). Then I created an ActionScript class for that user interface. Under the linkage properties of the symbol I specified that class. In the class itself, i declared the attribute "var titleLabel:Label". I thought this would be the same instance from the symbol? But: Trying to set the text of the Label AFTER the movie was dynamically added to the parent does not work. I cannot access any properties.

Here is the example:

My Class for the user interface:

Code:
import mx.controls.*;
class Information extends MovieClip {
var titleLabel:Label; //this is the same instance name as in the symbol

[Code].....

View 1 Replies

Flex :: TextArea Component Is Null On ApplicationComplete Event

Jun 11, 2010

I have a weird issue (weird because it is specific to one component) with applicationComplete in a fairly simple application. All the UI components are declared in MXML. I can access them all in applicationComplete, but not a spark.components.TextArea component, named taStatus here; it is null in the handler.[code]...

View 1 Replies

ActionScript 2.0 :: Make Particle Properties Refresh Every Time It Loops?

Mar 24, 2009

How I can make the particle properties refresh every time it loops. In other words, the rotations will be random every time I test the movie, but every time it loops, they remain in their same random positions it chose at the beginning. [code]...

View 3 Replies







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