Flex :: Spark - Adding Custom Class To Implement Simple Grid?
Apr 13, 2011
To start - its best to say im new to Flex / OOP in general. I have been trying to add a custom class based on StrokedElement in order to implement a simple grid (not like the existing Flex Grids - this would just be for display - not holding elements etc...)
My current class looks like this:
package ui.helpers {
import flash.display.Graphics;
import spark.primitives.supportClasses.StrokedElement;
public class SGrid extends StrokedElement {
public function SGrid() {
[Code] .....
View 1 Replies
Similar Posts:
Apr 13, 2011
How can you display a multi-line column header using the Flex Spark Data Grid for Flex 4.5?
View 5 Replies
Mar 10, 2011
I am trying to implement a simple chat application in adobe flex 3 with php as back-end. I have found few frameworks on net, AMFPHP and WebOrb. But I see that both these frameworks do a polling to the server at regular intervals.
View 4 Replies
Jun 25, 2011
Anyone missed the old simple method for skinning a simple button?
CODE:
The problem im having is that, this method of creating a simple button with skin is being phased out : Infact it is no longer supported in flex 4.5 mobile projects.
So the question: Is there a simple way to perform this, with spark buttons (which is suppose to be the new way to go). As simple as possible.
Basically i only need a button with 2 images : down/over & up. And i want to keep the code as simple as possible : The new skinning methods, seems to really adds way too much lines for something that used to be as simple as the example above.
View 3 Replies
Oct 9, 2009
I need to create a simple multiplication grid where children will fill the grid. Its an empty grid at the begining, when they start the time start as well.Its a grid of 10 x 10. when they enter the last number, the grid should show what they did wrong and the time they spend. It's an idea of how it could work but if anyone has something that looks like this.
View 6 Replies
Jul 1, 2010
I am new to Flex programming. I want to implement a custom toolstrip for an app. This tool strip will include a menu bar (or a customized equivalent) to display the common menu items such as File, Edit, etc as well as a search box. It should be flexible enough to include other menu items such as bookmarks, etc in the future. I have been thinking about mx:Group, s:BorderContainer, mx:HBox, but haven't been able to choose between them. And none of them seem espcially suited to my task as they merely specify layout of other objects. Is there any component which has direct support for such functionality. I have also thought about using mx:MenuBar but I don't know if it will be flexible enough to add non-menu items like search box.
View 2 Replies
Oct 14, 2009
This problem is probably very simple to solve but it is not clear to me. It may simply be that I am doing something incorrectly. I have studied OOP and AS3 for quite a few hours so I am familiar with the concepts but not the flow. This is a project that I put together in order to reinforce what I have been studying.The goal here is to load an instance of a pre-created movieclip to the stage from the library then execute a positioning function in the FLA's timeframe ActionScript and execute a function from within the AS files's class ActionScript to both a resize the movieclip and output a trace.I have two files:smileface.flasmileface.as
View 3 Replies
Nov 14, 2010
have been working on an air app for quite some time and in one of my mx:lists i have a custom renderer written in pure AS (no mxml). it extends the listitemrenderer mx componenet. in it i have overrode the createChildren() function to add some children of my own.
now, fort right-to-left text i want in this itemrenderer, i would like to add a spark:TextArea component in this createChildren() function
is there a way to do so?
this is the itemRenderer:
import flash.text.TextField;
import mx.controls.listClasses.ListItemRenderer;
[Code].....
View 2 Replies
Jan 3, 2011
I'm trying to make a simple flash application providing interface for taking tests as a high school assignment. One of the requirements is to use an XML file as data source.Now, having a List component bound to the XML file with questions consisting of data such as question body, question type (ie. single choice, multiple choice, open, image etc.) and possible answers (where applicable), I was wondering if I could add some additional data (and what is the best possible way to do so) to each question upon its transfer to the List component.
I am trying to achieve two main goals with this: firstly, to mark the questions to which an answer has already been given, like with such code in ItemRenderer class:
<s:Label color="{data.color}" text="{data.label}"/>
Where data.color would be set whenever the user gives an answer to a question.
Secondly, while at it, I thought of such possibility as a great way to store answers given to particular questions. In this case, the Class of the answer object would have been Object, since there has to be many type of questions (where the answer could also be a Bitmap for example).
View 2 Replies
Jan 31, 2012
Firstly sorry for the really lengthy question. I am trying to implement an Org.Chart using spark DataGrid. The data for the Org.Chart does not change and hence I am hard coding the values. I had to implement this Org.Chart as I need to have floating Nodes and also the connecting lines should be drawn a bit different when compared to using an external component. Please find the following image of which Im trying to achieve: Here is the idea:
[Code]...
View 1 Replies
Aug 2, 2011
I want to add two icons on spark button.I am using button skin.But the icons are not coming properly.
<s:HGroup width="100%">
<s:HGroup id="iconContainer" top="1" bottom="1" left="0" right="0"
horizontalAlign="{iconPosition}" verticalAlign="middle">
<mx:Image id="iconImage" source="{icon}" />
[code]....
View 1 Replies
Nov 3, 2010
I am using the standard Flex 3 BubbleChart component and I would like to customize a couple of the grid lines separately from the rest.
I would like to highlight a gridline in the X-direction as well as in the Y-direction to show a quadrant.
Is there any way to customize the look and feel of a subset of gridlines within a Flex chart (i.e. bubble chart)?
View 1 Replies
Jun 7, 2011
I have a Spark list with a customItemRenderer that is taking a good 3 seconds to initialize with just 50 items.
I'm using Flex 4.5, my ItemRenderer is already very optimized, using as little nesting as possible, fxg and so on.
Is anyone having similar issues? I've tried almost everything in the book bar going back to mx.
View 3 Replies
Jan 9, 2012
How can I display an animated SWF in my custom Flex button (I am using the Spark library).
View 1 Replies
Jul 14, 2009
I have created a custom class called SceneNavagation.as which i use to add my navigation to the stage. I was having problems getting the addChild to display my mc on the stage. So I passed the stage instance into my class and used that to attach my movieclips. _stage.addChild();
This worked but Im new to as3 and just wanted to know if this was a good way to do this below is my code.
package com.lessons{
import com.caurina.transitions.Tweener;
import flash.display.*;
[Code]....
View 0 Replies
Nov 23, 2005
For the game I am making, I'm using a self-made sprite managing system.I've got three classes: SpritesManager, SpriteGroup extends Movieclip and Sprite extends Movieclip.The idea is: SpritesManager is holding an object: "mainSprites", SpritesManager also hasa method "newGroup", wich creates a new SpriteGroup in mainSprites.In this way I want to make a system for creating and managing some sort of Movieclip-tree.For example:mainSprites.enemies.badEnemyThe method newGroup in SpritesManager has a param "name" wich is the name of the SpriteGroup to create.Here's where I'm stuck: how do I create a new SpriteGroup referenced to as "name" in mainSprites?
View 6 Replies
Jan 16, 2008
For the game I am making, I'm using a self-made sprite managing system. I've got three classes:
SpritesManager, SpriteGroup extends Movieclip and Sprite extends Movieclip.
The idea is: SpritesManager is holding an object: "mainSprites", SpritesManager also has
a method "newGroup", wich creates a new SpriteGroup in mainSprites. In this way I want to make a system for creating and managing some sort of Movieclip-tree.
For example: mainSprites.enemies.badEnemy
The method newGroup in SpritesManager has a param "name" which is the name of the SpriteGroup to create. How do I create a new SpriteGroup referenced to as "name" in mainSprites?
View 1 Replies
Mar 22, 2011
I've made a custom list itemRenderer with 2 buttons and a label. One button deletes the list entry (and thats not the problem) the second button would change the actual view.how I can change actual view within the itemrenderer ?
View 1 Replies
Mar 14, 2010
I am trying to use BitmapImage spark class instead of mx image class.Image loads the same, fine
<s:BitmapImage id="img" source="sample.jpg">
</s:BitmapImage>
But I have an issue with adding mouse events on it, eg:
img.addEventListener(MouseEvent.CLICK,clicked);
do not trigger any mouse events when clicking on the image
View 1 Replies
Jun 16, 2011
In class Main I am instantiating a custom class NavLabel that creates a textField. With in NavLabel I dispatch a custom event CustomEventWithParams on a reference to class Main that passes the parameter theLabelWidth along with it. from with in class Main i can trace the theLabelWidth for each of the instantiated NavLabel objects. I want to hold those values in an array labelWidthArray and then use them to position the NavLabel objects. how can I do this?
class Main
Code:
package
{
import flash.display.*;
import flash.events.*;
[Code]....
View 2 Replies
Nov 25, 2010
what is the keyword that allow me to implement an abstract class? It was asked in my interview..Can you say it from both java and ActionScript(flex)
View 2 Replies
May 27, 2011
Heres the code:
[Code]....
Unfortunatly, its doesnt reach the eventHandler, when i call the loadCurrentSchem() function. Whats wrong? This is how i call the class:
[code].....
View 1 Replies
Jul 22, 2010
I know actionscript does not allowed private contstructor at any time and But if i want to write a sinlgleton class in action script So how to implement it in actionscript.
Can anyone provide an sample example of a singleton pattern in actionscript?
View 5 Replies
Jan 28, 2011
I use this code to create and show a MessageWindow:
var newTitleWindow:MessageWindow = PopUpManager.createPopUp(contextView,MessageWindow, true) as MessageWindow;
newTitleWindow.text = message;
PopUpManager.centerPopUp(newTitleWindow);
[Code]....
There is no nested components displayed when I run my app.
The debugger shows they are created and visible.
To my "amusement" the components are shown when I replace s:TitleWindow with mx:TitleWindow.
I really want to use spark TitleWindow.
View 1 Replies
May 18, 2009
I have extended a RadioButton into a custom class in order to store some extra info. I want to dynamically add these RadioButtons to the stage to create a dynamic menu box. So I started simple in order to make sure I knew how to do this.Here's the error (I love Flash IDE error reporting):
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at fl.controls::RadioButton/drawLayout()
at fl.controls::LabelButton/draw()
[code]....
View 3 Replies
Jan 31, 2012
I am trying to figure out how to open a pop up window in my Air application, in a secondary Window, instead of the main application window.I am using the ReusableFX components, which include a custom DataGrid with filtering and other capabilities. The filtering feature displays a pop up window via PopUpManager when you click on the top of a column in the grid.
PopUpManager.addPopUp(this, FlexGlobals.topLevelApplication as DisplayObject);
The problem is that the pop up window opens in the main application - I am assuming because of the 'topLevelApplication' reference.So, I need a way to open this window in the current Air "s:Window". I am assuming I need a way to walk up : this.parent.parent or this.owner.owner - though I have tried that and it did not seem to work (it said null reference).OR, is there a way to get the current top most window / component (NOT the main application / window)?
Update:I decided to create a new project for the component, and add in the Air libraries. Now I am able to access the "NativeApplication.nativeApplication.activeWindow" call. That gives me the correct Air window. However, it does not seem to be working:
PopUpManager.addPopUp(this, NativeApplication.nativeApplication.activeWindow as DisplayObject);
My popup does not appear. I am assuming because "activeWindow" is not actually a DisplayObject?(so how do I get the DisplayObject if that's the case?)
View 1 Replies
Nov 4, 2011
I have the following situation:I have an event handler, that displays small messages in my application's statusbar.These messages get passes through by dispatching events from custom components.A simple message could be like "HTTP Error" or so.Now, the main event listener, in the main application file, listens to the event dispatched by any custom component,but seems to refuse listening to events dispatched by custom AS classes.Here is my code for the custom event:
package main.events
{
import flash.events.Event;[code]..
So to sum it all up:
- The event listener listens to the custom event dispatched by any custom component.
- The event listener does not listen to the custom event duspatched by an AS class.
Those who wonder, the event really gets dispatched, that's why I added a trace call.
View 2 Replies
Oct 5, 2010
I'm trying to learn how to use custom events in Flex. I'm following Oliver Merk's tutorial found here: blog
The custom event works if I implement it using MXML in the main app. But, if I use actionscript, then I get error 1119: Access of possibly undefined property ADD_PRODUCT through a reference with static type Class.
My Event:In the events subdirectory, I've got:
[Code]...
View 1 Replies
Oct 7, 2010
I'm trying to create simple custom component with two labels with this MXML:
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="250" height="30">
<mx:String id="result" />
<mx:Label x="5" y="7" id="titleLabel" text="{label}" width="120"/>
<mx:Label x="125" y="7" id="resultLabel" text="{result}" width="120" textAlign="right" color="#A41D00"/>
</mx:Canvas>
It is working well at runtime, bud I have troubles making it working at design-time. How can I make databinding work at the design time? If it is impossible, how should I code the label text assignments?
View 2 Replies
Jan 25, 2010
I couldn't work it out yet...
package components {
public class templateSelection extends VBox {
static public var tempSelectionBag:Dictionary;
[Code]....
I want to have a custom class tempSelection with a Dictionary as a public accessable property of that class. If I use this code, the compiler tells me:
1046: Typ wurde nicht gefunden oder war keine Kompilierungszeit- onstante:Dictionary
Which translates to:
Type was not found or was not a compile-time constant: Dictionary
View 1 Replies