ActionScript 2.0 :: Custom Component Parameters?

Oct 4, 2010

I'm trying to figure out how to set a custom button component's parameters dynamically using actionscript. Can't seem to find any documentation on this. My custom button component has parameters named "Item ID", "Item Name", and "Item Price".

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Custom Component And Parameters(inspectable)?

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

Actionscript 3 :: Why Won't Visual Elements Display Inside Custom Component Extended From Another Custom Component

Sep 6, 2011

I created a custom MXML component, TurboContent, that extends the NavigatorContent class:

<s:NavigatorContent xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">

[Code].....

In this case, the 'myButton' component never shows up, but all the elements of the base component do (3 buttons and a datagrid).

View 2 Replies

Put Scroll Of Tree Component In Left Side Of Component Or Creating A Custom Scrollbar For Tree Component

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

Flex :: Put Custom Code In A Custom Component In Flash Builder?

Dec 11, 2010

In the main file, I would write[code]...

But if I want the component to have that behaviour innately, where do I write it in the mybutton mxml file to have it reference itself?[code]...

View 2 Replies

Css :: Add Custom Style Property To MXML Custom Component?

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

Flex :: Dispatching Custom Event From A Custom Component?

Sep 8, 2011

I have a custom Flex 4.5 component (to be used in a List) -

Game.mxml (represents a clickable playing table in a card game):
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer [code].......

But I never see the "game clicked: " trace. Does anybody please know why? I'm probably missing something minor, because I can see the "Clicked: 8946" trace.

View 3 Replies

Flex :: Disptaching Custom Event From Custom Component?

Feb 16, 2012

This is similar to the question asked here. I am dispatching custom event "ShopEvent" but i am getting error "Type Coercion failed: cannot convert flash.events::Event@81ecb79 to com.events.ShopEvent"Note: Error is thrown from the parent custom component (3rd code snippet), I have added more details thereThis is my custom event. See the first constant, I copy pasted the event name in custom components.

package com.events
{
import flash.events.Event;

[code]......

View 3 Replies

ActionScript 3.0 :: Custom TreeItemRenderer Removes Custom Component?

Jan 16, 2009

I have created custom TreeItemRenderer in which i am trying to draw colored Hbox bar at each node except root. Intially when i click on root node it opens first child node with bar but when i open leaf node it does not showing bar and removing existing bard from other few child nodes. Its calling itemrenderer on mouseonver eventhough i have disabled.Attaching Code here

package Adodbe.renderers
{
import flash.display.DisplayObject;[code].....

View 0 Replies

Flex :: Make A Custom Component Or Extend The List Component For A 2D Top Down View MAP ?

Nov 11, 2010

I'm building a top view 2D map, that it's objects are stored on the server.The kind of objects are 10 and might be a photo, label, button, lists, mix of them or labels with tooltips.The component must request the "areas" that are missing on screen.An area is 1000x1000 px and is cached in flex.To move in the map, will be like in google maps (drag-and-drop).I should be able to have another list and move objects from one to another using drag-an-drop on objects. Ex.: I grab an objects from a list and I move it on this map, I release the mouse button and the item is placed there.Now the problem is: I build a custom component for this trying to emulate the item renderer for performance and recyclage, implement drag-and-drop on objects and request the areas that are missing?

or

I extend the List component from spark and I add some features as multiple kind of itemrenderers and use recycle on them. Of course it must be able to request the missing areas on the screen and cache it's data.Maybe create a custom layout is needed too.What I need is something that must be really fluid, so the lighter this component is, the better.

UPDATE: *There will be not any object over another.

*I will not use hitTest on bitmaps because all bitmaps are wrapped in another component,as they,for now are itemrenderers.

Anyway I already begin to do this using a class that extends the SkinnableDataContainer and a custom layout. As the layout is not like a grid, is sparse, random items at diferent points(x, y).How to get the localX and localY, relative to item renderer and not to the Spark List, from a DragEvent in Flex 4?

View 1 Replies

Actionscript 3 :: Pass A Variable From Custom Component A Different Component?

Dec 8, 2011

In my custom component (Login), I create and set a variable userName, it is bindable: [Bindable] private var userName:String; userName = txtUsername.text; I need to pass that variable to a different custom component (Overview), here is the code of the viewstack:

[Code]...

I've searched for a way, but I haven't found one that does the trick.

View 1 Replies

Flex :: Pass Parameters To Custom Components?

Oct 2, 2009

I am trying to create a component which can receive an additional value from mxml [code]...

View 6 Replies

ActionScript 3.0 :: Dispatch Custom Event Parameters?

Jun 24, 2010

I'm looking off of this site: [URL]

Followed it closely and still nothing! I dispatch the Event alright from the first .as file and it runs the function featEvent() but that's as far as it gets. (found this out using trace statements)

Custom Event:
ActionScript Code:
package asFiles {
import flash.events.Event;

[Code].....

I believe the error is in the actual featEvent, but can't find where.

View 7 Replies

ActionScript 3.0 :: Set Optional Parameters In A Custom Class?

Feb 24, 2007

Im coding in AS3, and i want to make a class that will recieve optional parameters, but i dont know how to identify these parameters as optional.

I tried writing

Code:
public function mydate([language:String]):void{

like Adobe identifies optional parameters, but it doesnt work

View 6 Replies

Media Server :: FLVPlayback To FMS OnConnect() Custom Parameters

Sep 16, 2010

FLVPlayback custom params
 
How do I pass custom parameters to FMS using a FLVPlayback just likeI can with NetConnection.onConnect()? e.g. Normally I pass custom params to FMS like this:netConnection.connect("rtmp://mydomain.com...", param1, param2, ... .etc); How do I pass param1... etc. to FMS if I'm using an FLVPlayback component?

View 2 Replies

Actionscript 2.0 :: Call Function With Different Parameters Via Right-click Custom

Apr 7, 2009

I have this custom right-click menu. I need to call the reactOnClick() function with a specific parameter when clicking a specific right-menu item. I want to avoid multiplying the function for each right-click item.

Code: Select all//set up the custom right-click menu
rcnMenu = new ContextMenu();
//the value below is here just for testing purposes,
//the actual value could be anywhere between 3 and 13
var numberOfItemsTakenFromXml:Number = 5;

[Code].....

View 1 Replies

ActionScript 3.0 :: Custom Event And Variable Parameters Count?

Mar 18, 2010

is it possible to create custom event with variable arguments count? I ask this because currently I use anonymous functions on events with variable parameters count to pass arguments to appropriate function, i.e:

Code:
addEventListener( MouseEvent.ROLL_OVER, function(evt:MouseEvent):void{mTBGp( pX, pY, l_w, l_h, isDone )}, false, 0, false );
addEventListener( MouseEvent.ROLL_OUT, function(evt:MouseEvent):void{mTBGe( pX, pY, l_w, l_h )}, false, 0, false );

and I don't want to do that because of weakReference.

1. From what I know if I set weakReference to true with anonymous function on in addEventListener GarbageCollector will delete them (and indeed I can see that my code stops to work on random, due to GC "kickin in")

2. When i delete my Object with addEventListener( weakReference = false ) the memory used by addEventListener is not freed ( unconfirmed, please elaborate on that subject also)That's why, from My point of view, usage of custom event is best, but unfortunately I use many addEventListeners with variable parameters count so (in above example 2 listeners. one 5 arg, second 4 arg) is there a way to do something like this? To write event that will take x parameters of any type?

View 6 Replies

Actionscript 3 :: Flex 4 Disptaching Custom Event From Custom Component (why Flex Converting Custom Event To Mouseevent)?

Mar 2, 2012

This is NOT duplicate of my earlier post (its is slightly different)But this is similar issue with similar error but its not the same error The error I am getting now is below while dispatching the custom event from my custom component

TypeError: Error #1034: Type Coercion failed: cannot convert events::MapEvent@a74ab51 to flash.events.MouseEvent.
dispatchEvent(new MapEvent(MapEvent.CLICKED_ON_MAP));

Note: The error in my earlier post is giving below error message

Type Coercion failed: cannot convert flash.events::Event@81ecb79 to com.events.ShopEvent

The difference here are two things, the earlier error is while converting flash event to custom event and now this one is while converting custom event to flash event and secondly, I have no clue why it is trying to convert to the mouseevent where I am just dispatching my custom event with proper listeners.

This is my custome event

package events
{
import flash.events.Event;
import ui.map.MapElement;

[code]...

View 1 Replies

Flex :: Passing Parameters To Component?

Apr 20, 2010

I've got 2 files, my Application and a custom component. In my component I have a httpservice and a string named _requestUrl that is bindable. The httpservice uses this.

<mx:HTTPService id="srv"
url="{_requestUrl}"
result="parseHttpResult(event)"

[Code].....

View 1 Replies

ActionScript 3.0 :: Setting Parameters Of A Component?

Mar 12, 2009

I'm trying to dynamically set some parameters of a component using AS3. The component has a parameter named "imagePath". I want to set this to a variable named "pathVar" This is where i'm at.

Code:
var pathVar
pathVar="images/folder1"
imagePath=pathVar

This clearly isn't working.

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 2.0 :: FLVPlayback - Setting Path In Component Parameters

Oct 4, 2011

I have a video which has an flvplayback inside. I have been using it for others flv. But with these 3 flv, when I set the path in the component parameters, flash shuts down. I have used aftereffects, media encoder to convert them from mov and avi to flv.

View 0 Replies

ActionScript 1/2 :: Passing Video Into Flv Playback Component With Extra Parameters?

Mar 9, 2010

I've been given a video url that I want to pull into an the flvplayback component. The url for the video I've been given is:The problem is when I set the contentPath with the above url the component won't load the video with the extra parameters ?var_log=102|441100001-1|- added as it says the path must end with .flvI am asumming that the video provider needs this extra var/parameter to be called in order to track the number of video requests, in which case I will need to keep this in.

View 2 Replies

Flex :: Send Parameters From A Component To Main MXML Application

Aug 8, 2011

I would like to send variables or parameters from Component to Main (MXML) Application. Like my component is FileUpload.mxml and would like to forward the uploaded file details from FileUpload.mxml to Main.mxml.

I tried the following procedure :

com:FileUpload id="fp"

to get the reference for the FileUpload component, however, I am unable to get the variables from the FileUpload.mxml file.

View 1 Replies

Flex :: Define Custom 'contentGroups' In A Custom Flex 4 Component?

May 12, 2010

The spark panel component for example can be written like this

<Panel title="Skinny">
<child components ... />
<controlBarGroup>
<child control bar components ... />
</controlBarGroup>

[Code]...

The motivation here is that I can now create a couple different skin files to change the look and layout of those subgroups. Reading source of the spark panel, there are some calls within the mx_internal namespace such as getMXMLContent() which is a method of the spark group component, but which I have no access to.

Does the description above make sense? How can I create custom 'contentGroups' in my custom Flex4 component that can use nested mxml child components? Should I approach this a different way?

View 2 Replies

ActionScript 3.0 :: Using Custom SWC Component

Jan 30, 2010

I have writen this SWC component. If I run a test FLA from the same folder where the AS class is, it works. But if I install the component in the components folder and try to instantiate it from somewhere else (any folder but the one where the AS class is) I get the following error: ArgumentError:Error #1063: Argument count mismatch on MyComponent. Expected 0, got 4.

View 1 Replies

Actionscript 3.0 :: Creating Simple Component - Can't Get The Default Parameters "loaded" In The Class ?

Mar 18, 2010

I want to create a simple component in as3, cs4. There are 2 problems I cant solve:

1.)I can't get the default parameters "loaded" in the class for the component so lets say if I have w = 10 in the parameters how can I refer to it in the code?

2.) How can I get the tool with which I can set which corner of the component should stay the same : it looks like this in the default

flash button component
theLinesTool.png (11.82 KiB) Viewed 290 times

View 2 Replies

ActionScript 3.0 :: Creating A Custom Component?

Jun 3, 2009

I am creating a custom Component using ActionScript 3. This Component have some properties that can be changed in the Component Inspector, and in this component i create a text field to show a message that the user define in this panel.
 
So far, works ok. But i want to give a chance to the user choose a font type to this text field, i found in the Component Definition, a option called "Font Name", with this option, you can select a type of font to use.
 
The problem is to recover this font in my Class of the component. I try to use the Font Class, but it seems that this class was not created for this. My question is: What Class i have to use to recover the selected font from the Font Name option. I try this:
 
var newFont:Font = "Arial";
[Inspectable(name="Font name", type = Font, defaultValue = "Arial")]  public function set corPreloader(fonte:Font) {   newFont = fonte;  }  public function get corPreloader():uint {   return newFont;  }

View 3 Replies

Professional :: Create A Custom Component UI In CS5?

Jan 18, 2010

I'm in the process of creating a component for CS4 which uses a custom UI SWF in the component inspector. I read that the component inspector is being removed in CS5 and you will now access component properties in the properties panel. Will developers still be able to create a custom component UI in CS5?

View 7 Replies

Php :: Databinding Between Custom Component In AIR Application?

Jul 31, 2009

In my Main application I used label (like id=firstname) so we can use in main used firstname.text for databinding. But I have created canves custom component and load in main application using viewstack.In canves custom component how can I Bind label(id=firstname).I tried:var username:string = firstname.text but not show undefine firstname.How can I access all label and component in Main application to custom application.

View 1 Replies







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