ActionScript 3.0 :: Inspectable Component Property Example ?
Mar 5, 2009
I have having real trouble creating a component with an inspectable property.Does anyone know of an example on the web which shows how to correctly set up a simple movieclip in Flash and then save it to a SWC with an inspectable property ?
View 1 Replies
Similar Posts:
Nov 19, 2007
I have made a SWC that works as it should but im trying to add in a userdefined parameter
Code:
class blah{
var myparameter
[code]....
View 1 Replies
Jul 14, 2010
I have them appearing fine in the component definition panel, but the values entered here seem to be overridden by the component inspector and the var doesn't appear here unless I enter it manually and then there's no way to make it a list.In my class I have:
Code:
[Inspectable(defaultValue="controls", type="list", enumeration="controls,noControls")]
public var controlValue;
[code]...
View 1 Replies
Jun 10, 2011
So I'm writing a Component for our artists to use and I need to be able to point at an XML document. I could have them simply write out the path in a string, but I'd like to allow them to navigate to the source file with a file browser if possible. I've looked through much of the documentation for metadata tags and haven't found anything "reliable"... for instance... [URL]. Lists possible "types" for [Inspectable] metadata, but it doesn't list nearly all of them... I'm currently using a type="Video Content Path" to let them browse to a video file... but I would think that Adobe would also have a type that allowed to browse to any file type, not just a video.
View 1 Replies
Jun 9, 2010
I have two components (lets call them A and B) which have normal inspectable properties (e.g. NAME and AGE) which allow you to enter values via the component inspector. When I type the value for NAME in component B (via the component inspector) I communicate via a singleton class and store this value in a NON INSPECTABLE property located in component A.
When I run the movie, I want to access this non inspectable property within component A; however, it is always null - the value will not persist from design time to runtime. I check that the value is set at design time by tracing the A's non inspectable property once component B has set it - and it does indeed work, so I know component B has managed to set the correct value in A.Basically, what I need to know is, how do you persist properties of a component from design to runtime, without having to make properties inspectable and having to manually type property values via the component inspector?
View 1 Replies
Jun 9, 2010
I have two components (lets call them A and B) which have normal inspectable properties (e.g. NAME and AGE) which allow you to enter values via the component inspector. When I type the value for NAME in component B (via the component inspector) I communicate via a singleton class and store this value in a NON INSPECTABLE property located in component When I run the movie, I want to access this non inspectable property within component A; however, it is always null - the value will not persist from design time to runtime. I check that the value is set at design time by tracing the A's non inspectable property once component B has set it - and it does indeed work, so I know component B has managed to set the correct value in A.
View 2 Replies
Jun 21, 2010
When I create a custom component, I define a property which is array that could accept values from the enumeration, see code below:[code]...
I would like to know how I can pass array of values to my component from MXML application that uses my custom component.
View 1 Replies
Aug 5, 2009
I am working on an enterprise application and creating a base class for some stage components that has knowledge of the class extending it. More specifically, I need a way to loop through the inspectable properties in a class file and place the names of these variables into an array. For example:
Code:
[Inspectable(name="My First Variable", type="String", defaultValue="")]
private var _myVar1:String;
[Inspectable(name="My Second Variable", type="String", defaultValue="")]
private var _myVar2;
[code]....
View 1 Replies
Jun 21, 2010
im currently working on a flash component (first time). I have an instance of my component dragged onto the stage. Played around with changing the different properties i made inspectable - so here it comes: The property (typed object) i would like to change can not be edited in the IDE. I have no plus icon to add a new name-value pair to the list
[Code]....
and a screenshot of my empty panel where i would like to add some data:
View 2 Replies
Feb 25, 2010
Can't seem to bind to data from within a custom component. I've tried BindUtilis and {} but can't seem to fathom it out. Here's what I've got:
I have a class DataModel which has been made bindable
Within Mainn.mxml I have two components: DataGrid (used for testing) & CustomComponent (which extends Canvas)
When the data within DataModel.somelist is updated the DataGrid reflects the changes but the CustomComponent doesn't appear to.
I was expecting to see the trace (CustomComponent.dataProvider) fired whenever this._dataModel.itemList is changed. [code]...
View 1 Replies
Nov 24, 2006
it is a little bit about flex but I have nowhere to ask. so.
Code:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initApp()">
[Code]...
View 6 Replies
Aug 31, 2004
ive got a radiobutton component on my stage named radio1. I need to duplicate it and then change a few properties, but i cant seem to get the path/naming right. This is my code:
Code:
i=2;
radio1.duplicateMovieClip("radio"+i, radio1.getNextHighestDepth(), {_x:20, _y:20});
_root["radio"+i].setLabel("test");
i++
if i use a constant name instead of "radio"+i it works but the ["radio"+i] seems to be the problem, could someone help me with this? (using flash mx)
View 7 Replies
Feb 13, 2011
I have multiple tab loops, where I enable/disable the loops as needed to control the tabbing experience. I'm attempting to set control the tabbing with the tabChildren property on the Movieclip or Sprite containers I have by setting their tabChildren property to true/false. I am trying to set up tabbing that has three distinct tab loops (three different containers), each with their own internal Sprites/Movieclips that have their tabIndex properties set as needed. I am able to properly set tabChildren to false, and back to true. But with the component, once I set it to false, I can't set it to true again.
Tab loop 1: main content (a loaded SWF file)
Tab loop 2: nav bar (previous & back buttons to load different SWFS, and a Help button)
Tab loop 3: a help pop-up window (a Sprite container) with a scrollPane component used to show scrolling content
Things seem to work fine without the ScrollPane component involved in the mix.Have others experienced this inability to control tabChildren like this? And with regards to using components? I am not using the FocusManager class in any capacity, and believe that it only applies to the components (unless I created my own components and implemented IFocusManager, which I haven't).
View 1 Replies
Nov 25, 2009
Is is possible to bind class properties to mxml components ? E.g.: I have a class A.as with a String property nameValue. What I want to achieve is always having the latest value of a mx:Text component in nameValue.
View 2 Replies
Jan 5, 2010
In my custom button component, I want to get a handle on the textField (The internal UITextField object that renders the label) in the Button so I can modify some properties on it. It exists as a protected var in Button.as How can I do that in my mxml component?
View 1 Replies
May 16, 2011
I would like to bind a variable from my ActionScript to a property of a component that is in a ItemRender. But I always get this error:
1120: Access of undefined property currentRoom.
Here is my code
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:solutionItems="com.barco.components.ControlRoomConfigurator.solutionItems.*">
<mx:Script>
[Code]....
I would like to use the object currentRoom in my ItemRenderer component.
View 2 Replies
Aug 3, 2011
I have a custom component of which have a advancedDataGrid inside it. I want thiscomponent to be reusable so need is set the datagid selectionMode as a component property.In mxml i want set property like this:
<comp:MyComp itemDataGridSelectionMode="singleCell" .../>
Inside MyComp actionScript i have a metatag like this:
[Inspectable(enumeration="singleRow, multipleRows, singleCell, multipleCells",
[code]......
View 3 Replies
Jan 30, 2012
I have a custom Flex 4+ component that I am trying to make and have the skin be aware of changes to a custom property. This property will determine the graphic on the button (and some other visual changes) but the data will change constantly as it will be updated by a timer.
I've looked at untold examples and still seem unable to get the syntax correct or discover how things should be separated. I've looked at overriding commitProperties and the PropertyChangeEvent without success. So I have two questions.
1) How can I get a skin to be notified of a bound property when it changes?
2) If the data for a bound property of the component is an object, will binding work properly if a property of the object changes (or would it be better to pass each property separately)?
[Code]...
View 3 Replies
Feb 9, 2012
I created a custom timer component, which basically renders a circle sector, with a default start angle (0) and an end angle:
public class Arc extends FilledElement
{
private var _endAngle:Number = 0;
[code].....
View 1 Replies
Feb 7, 2010
I'm using Flash CS4, as3 and adobe air file. I have an application with 3 scenes, first scene to login, second to set up, and third to see an video. The problem is that, when I put a component in the second or third scene, if a change any property in the component inspector, any property it gives me error. So put the component and I change property by code in as3. But I'm doing things with FLVPlayback component, and now before enter the scene gives me error, the solution will be to get the original properties, but I don't remember, I could install other time Flash CS4, but I can do that for any component, better know the solution.
For example, I have an as file who is the class named p.e. MyMainclass, and in the scene3, I put FLVPlayback, who default values it's the last I used (I don't remember default after installation), if any code in as3, it gives me this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.program::MyMainClass/__setProp___id2__scene3_myvideo1_1()
[com.pro gram.MyMainClass::__setProp___id2__scene3_myvideo1_1:7]
I remove this component, I put another one I never used, it doesn't give me error, I change any property in the object inspector, p.e. color, it gives me error, I change to original property again, and then No Error.
View 1 Replies
May 14, 2010
I would like to know if it is the same to assign properties to my custom component in its own class, or from the parent document. Here I assign the property bottom in my custom component class:
<?xml version="1.0"?>
<mx:LinkButton bottom="20" >
<mx:Script>
Here I assign the property bottom when I use the component in my main MXML file
<myComp:Brick bottom="10"/>
View 2 Replies
Jun 8, 2010
In my application this works:
[Code]...
View 1 Replies
Jul 23, 2010
I have written a piece of code where I have created a custom class containing some of my custom properties.I have used multiple instances of this custom class in my main class and added it to a container.Now I need to access one of my custom property in the main class through container.getChildByName()."custom property", but I am not able to access my custom property using this.I get an error saying
Access of possibly undefined property orientation(this is my custom property) through a reference with static type ..name of my main class.
Is there no way that can i access custom property of components through the getchildbyname method of the parent container ??
View 0 Replies
Jan 18, 2010
I can't change property Color of the component Movie Clip in my program? Compiler didn't found the error but when my program run color Movie Clip doesn't change.
View 5 Replies
Feb 11, 2010
In Flex I've got a component, which is based on a Canvas.It looks like this (I removed the <mx:Script> for better reading):
<mx:Canvas verticalScrollPolicy="off" showEffect="showFX" hideEffect="hideFX" horizontalScrollPolicy="off" creationComplete="doComplete()" xmlns:mx="http://www.adobe.com/2006/mxml" width="63" height="63">[code]....
If I set customComponent.Visible to false, the component gets hidden (as expected). But doesn't trigger the hideFX at all. Am I doing something wrong? Or isn't this the correct way to use hideEffect and showEffect?
View 1 Replies
Feb 1, 2011
how do i get an ordered list using htmltext property of Text component? I tried using this: <ol><li>item</li><li>item</li></ol> but it rendered like an unordered list.
View 2 Replies
Oct 1, 2007
I am trying to use the scroll pane component and I am having a few teething troubles. I have a scroll pane as a child object of a movie clip which is essentially a 'page', if I display this page it works fine and the scroll pane does too. If I then remove this page from the display list, go to another page and come back by readding it to the display list, I get the following error, even though nothing else has changed:
TypeError: Error #1009: Cannot access a property or method of a null object reference.at fl.containers::ScrollPane/fl.containers:ScrollPane::endDrag()
The scroll pane is still visible and works correctly, but ideally I'd like to stop this error.
View 3 Replies
Jun 22, 2011
I have a Custom Component that has a couple of Canvas with some background colors assigned to them. Now i have hard coded the colors, i want to move them to an external css file. So i would like to have the css declaration like this :
[Code]...
My question is if i can define custom style names like dividerRightColor and if so, how can i use that value inside my MXML Component? I have seen examples of using them inside Pure AS components.
View 2 Replies
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
May 20, 2009
is there any way to put scroll of tree component in left side of component or creating a custom scrollbar for tree component
View 13 Replies