ActionScript 3.0 :: Accessing Data In CreateChildren Phase?
Sep 21, 2009
I have a custom itemRenderer based in the TreeItemRenderer. I would like to include a control depending on the object passed to the renderer; but in the createChildren method the data property is null. How to access data in this phase?
View 1 Replies
Similar Posts:
Jun 1, 2011
Do I need to create all objects which i will possible use with itemRenderer in createChildren function, even if the current item must not show some of them ?
View 2 Replies
Mar 16, 2010
I have the following MXML:
<mx:Script>
var someBoolean:Boolean = determineSomeCondition();
</mx:Script>
[code]......
View 1 Replies
Jan 18, 2009
What code would you use so that when a button on the main menu of a site is clicked, it plays the end of the current movie before bringing up the next?
I have a site where each page is contained in a movie, and each movie has 3 parts.
1. Intro
2. Pause where content is kept on page
3. Outro
When a button is picked to go to a new page, I would like the outro to play before loading the next movie. Is there a way to do this?
View 3 Replies
Jan 6, 2011
I created the following action script named "sketch.as" :
package
{
import flash.display.Sprite;
[code]....
View 7 Replies
Nov 18, 2009
I have integrated FlexPMD into my pom.xml file but I need to change the phase & goal in which the plugin is run. Currently it runs in the site phase but I need it to run in the test or compile phase. Is this possible?
[Code]...
View 2 Replies
Jan 10, 2010
Scenario, you have a MC with a nested MC, and that MC has a nested MC. So mc1 contains mc2, and mc2 contains mc3. Pretty simple.I add an event listener to the top most mc (mc1) for a MouseEvent.MOUSE_OVER (that bubbles, unlike ROLL_OVER). Is there a way to get every item that the capture phase moves through?For example, rolling over mc3 fires the event with the target being mc3 and currentTarget being mc1 (as thats where the listener was added). But I want to know about mc2 being rolled over rather than mc3, and because technically mc2 is being rolled over because it contains mc3.I am using this at the moment to traverse back up the list, and check each item. But surely there is a better way.
PHP Code:
mc1.addEventListener(MouseEvent.MOUSE_OVER, f);function f(e:MouseEvent):void { var t:Object = e.target; do switch(t.name) case"mc1": trace("hit mc1");
[code]......
View 7 Replies
Nov 7, 2010
If I have the following code which adds an event listener to the stage, why does it not respond when the capture parameter is set to true. It works fine when it is set to Target and Bubblig (false). My understanding is that all the phases happen...
[Code].....
View 1 Replies
Feb 25, 2009
how can i access for example, the text of a Input text on the stage, from a movieclip?I need that value from the input text inside my movieclip's actionscript.(Actionscript 3)
View 8 Replies
Dec 10, 2008
I am a Flex developer and now I have started learning the fundamentals of iOS, Objective-C, and accessing server-side data. Most of the Flex projects I do are mainly in accessing server-side data with Flex from .Net, Python, and Java since we all know data access in Flex is possible only via 3 ways: Http, Web-service, and Remote Object. Out of these 3, Remote Object is the most reliable, fast and handy.ion is, do we have remote object concept in iOS? I mean is there any interface (like blaze DS, weborb) available on the market forserializing/deserializing Objective-C object type to C#, Java, and python or vice versa?
View 57 Replies
Sep 19, 2010
I have an xml class that loads xml data, I need to access the data from another class. I have imported the xml classinto the new class and created a new instance of it. However when I try to access the xml data it is coming back as null. I understand this is almost certainly because when it is called the xml data hasn't completed it's load. How can I get round this?
[Code]....
View 5 Replies
Jul 1, 2010
I have have a problem loading and accessing data from a value object in my new project.. I load an xml file via a service, which contains title and locations of asset files, I need to be able to access the location of an asset file by specifying the title and retrieiving it from a value object.. I'm using the Robotlegs framework, here's an example of the xml:-
<?xml version="1.0" encoding="utf-8" ?>
<files id ="xmlroot">
<file title="css_shell" location = "css/shell.css" />
[code].....
View 1 Replies
Oct 21, 2011
After reading data from XML source I like to be able to show one random item from data whenever, say, clicked a button. I think I can accomplish this by storing the data into an array and use it from the array. I would like to learn if possible to do it directly from xml without storing it into another array.
var myXMLLoader:URLLoader = new URLLoader();
myXMLLoader.load(new URLRequest("XML_NOTES.xml"));
myXMLLoader.addEventListener(Event.COMPLETE, processXML);
[Code].....
View 2 Replies
Dec 19, 2006
How do I access an array inside an .swf that is loaded using loadMovie?
this.createEmptyMovieClip("controlpanel", 999);
loadMovie("lessons/regulatoryrequirements.swf", controlpanel);
forward_btn.onRelease = function() {
attachMovie(screen_array[0], "currentscreen", 0, {_x:500, _y:360});
};
screen_array is the array I'm trying to access in regulatoryrequirements.swf.
View 1 Replies
Apr 3, 2009
I have stored some basic data in a custom class, imported it into a project, and compiled it into an swf. Now, I want to import that swf into the library of a new, entirely separate flash project, and access the data from the original custom class inside that imported swf.
Here's how I'm trying to go about it (unsuccessfully):
1. Create a custom class 'MyClass.as' with some basic data ("hello world") stored in a property:
Code:
package {
import flash.display.MovieClip;
public class MyClass extends MovieClip{
[Code]....
View 2 Replies
Mar 3, 2010
I'm trying to load data from an external textfile, called "config_flash.txt". It works perfectly if applying the fetched data is done within the same function where the loading is done. However, I would like to use the fetched variables in other parts of the script.
Here's what works:
Actionscript Code:
var varLoader:URLLoader = new URLLoader(new URLRequest("config_flash.txt"));varLoader.addEventListener(Event.COMPLETE,
[code]...
So, basically I want the variables/values defined inside the function to be available anywhere in the script. The error that the second code snippet causes is as follows: "1120: Access of undefined property text1/text2".
View 6 Replies
Jan 2, 2011
I am working on a Flash game that uses 2D polygon collision. It seems to me that I could sketch the 2D collision around my objects using the pen tool, and make it invisible by putting it on a separate guide layer.
how to access the data on that layer - preferably as a set of points - from ActionScript.
View 1 Replies
Oct 14, 2011
I'm trying to access a CheckBoxList component that is defined in a nextLevelRenderer of a FlexDataGrid. How do you do this?
I thought I could use getLevelForItem( arg ) and pass in the selectedItem for the FlexDataGrid, but I'm not getting anywhere with it.
In addition, is there a good place for flexicious tutorials online? I can't find anything.
View 1 Replies
Mar 5, 2008
I have a cs3(AS3) datagrid component and I'm tracking which row the user has selected by using ListEvent.ITEM_CLICK to listen for a selection and then event.rowIndex in the handler function and using this index no to select data from the array which was used with the dataProvider. The problem is this. If the user re-sorts the rows using the column headers, this resets the rowIndex (ie the first entry is always row 0) and so this no longer relates back to my array. Is there a way to directly access some or all of the data in the row the user selects?
View 3 Replies
Jun 24, 2011
I'm wondering if it's possible to access a shared object's data (once it's been changed) without reloading the swf. Specifically, I have two swfs: one changes the data in the so and lets the second swf "know" via a localconnection. I have a function in the second swf that fires via the local connection.[code]This function looks for the new value however it doesn't show the updated value in my textfield unless I refresh the browser. Thoughts?
View 1 Replies
May 28, 2010
I've created several textFields, writing:
ActionScript Code:
for(i=0;i<=10;i++){
this.createTextField("texto"+i,i+1,100,100,100,100);
};
That's O.K. But I can't put a text in them... when I write
ActionScript Code:
for(i=0;i<=10;i++){
["texto"+i].text = 15;
};
It simply doesn't work!
View 4 Replies
Oct 14, 2010
Once a button is clicked in a submenu called SelectChar(a menu class extending my menu base class), it dispatches a custom event carrying an array of variables. This event is then listened for in the main Document Class called Engine, where the value of the passed variable can be used. For testing purposes im only passing 1 arguement in the array.
my Error when trying to trace the passed variable in isolation "trace(e.arg[0]);": 1119: Access of possibly undefined property arg through a reference with static type flash.events:Event.
Okay, i hope that made sense... heres the relevent code:
custom event class: passCharEvent.as
Code: Select allpackage com.asgamer.snipergame
{
import flash.events.Event;
public class passCharEvent extends Event
[Code].....
View 2 Replies
Aug 30, 2006
I began with a class for a movie clip rollover function FigureRollOver. It works marvellously. Three things happen:
1) it loads XML from a file "mod1_fig1.xml" and uses another class, XMLMember, to retool the scoping of the XML so that I can get at it
2) an onload call inside of XMLMember calls the myOnLoad function and transfers the XML into an array.
3) so long as the array is finished building, rolling over a movie clip attaches a new movie clip with the rollover text in it.But I don't want all those functions in one because I need it to be more dynamic, starting with being able to load any old xml file instead of just "mod1_fig1.xml", plus it seems lik overbuilding to have all of that in one class, so I've separated out the loading of the XML and building of the array into its own class, FigureXMLLoader. FigureRollOver is then left to just attach the rollover with text in it, extracted from the array built by the new class.
Problem is, though the array builds inside FigureXMLLoader, I can't figure out how to make it available outside the class. I know that I'm constructing things in the wrong order, and that the array needs to be somehow built inside the class function to be available, but I can't figure out how to do that. A cruddy work-around is to put a function call at the end of the building of the array, which calls yet ANOTHER function on the main timeline of my .swf to put the array I've just built into a new variable.This works, but it's messy. It seems like I should be able to have one line of script in the .swf that generates an array on the main timeline (or just a public array) which I can then access from my FigureRollOver class:
var myRollOvers:Array = new FigureXMLLoader("mod1_fig1.xml");
Here is FigureXMLLoader (see comments in the code for more details) which obviously does not return an array as it is, because of all the working around I've had to do. Note the "testing" variable, which can be traced from the main timeline of the .swf, but I will get "not what I want" because of course the array hasn't been built yet, and never will be, inside of the declaration as it is. How do I get it in there so I can return an array?
View 2 Replies
Jul 18, 2009
I want to extend the dictionary class. Everything works so far except that in some of my methods that need to reference the dictionary's content I make a call like:
this[ key ]
It doesn't like that. It just tells me that there's no property 'key'. Is there a way to way to access the data within this class?Also, I'm using an integer for the key.
Edit: I've found that the same behavior happens when you extend Array.
var myArray : Array = new Array();
trace( myArray[ 0 ] );
var myArrayExtender : ArrayExtender = new ArrayExtender();[code]....
Where in this case, myArray returns "undefined" and myArrayExtender throws error 1069. ArrayExtender is an empty class that extends Array and calls super() in the constructor.
View 1 Replies
Nov 29, 2010
I created a Custom Day Render and I would like to access some custom data that I am providing with in the Flextras Calendar dataProvider. here is the code that I have
<flextras:Calendar
id="calendar"
dayRenderer="com.healthways.healthhonors.itemrenderers.MyAwesomeDayRenderer"
monthHeaderRenderer="com.healthways.healthhonors.itemrenderers.MyAwesomeMonthRenderer"[code]...........
Here is the type of Object that I am creating and storying in an ArrayCollection witch gets passed to the Calenders dataProvider
myArrayCollection = new ArrayCollection([{date:new Date(), data:myObject}])
Here is what what my Day Render looks like
package com.healthways.healthhonors.itemrenderers
{
import com.healthways.vo.DateVO;[code]..............
how to see if a renderer has custom data so that I can do some logic on the renderers creation complete.
View 1 Replies
Mar 3, 2011
Ok, here's my requirement in short-I have a datagrid that is updated every time data update is received. Now, all I want to do is check if the present value in every cell in a specific datagridcolumn is less than the new value then color that particular cell green, if the present value is greater than the new value then color it red, else leave previous color as it is. Simple?Now, the coloring part is important but comes later. As of now, I need to know how to get present cell data in the labelfunction of the datagridcolumn.
// column is a datagridcolumn
column.labelFunction = function(oData:Object)
{
[code]....
View 1 Replies
Jul 3, 2007
I have a flash video player whose playlist is based off an xml list. Now, I need this list to change based on whose accesing the player. So: Client gets a link, clicks on link, player shows their video. Another client clicks on another link, player shows their video,
View 1 Replies
Apr 22, 2011
I am using AIR to make a little installer. How would I go accessing a file in there application data folder for all platforms? When trying to access it directly it works just file.
[Code]....
View 2 Replies
Oct 29, 2008
I'm wondering, is it possible to access shape data with actionscript. I want to draw simple lines with "line tool"somewhere in my movieclip and then to access information about my lines with actionscript to get startX, startY and endX endY of every line.
View 1 Replies
May 23, 2007
I got a music portfolio web site running PHP, MySQL and Flash. There's a page showing all the artists my client worked for and when you click on a song title, this title is passed as a variable to a PHP page then to a Flash page. The Flash page contains an actionscript music player which then looks for the right audio file in the database and plays the song. Everything works great except for the dynamic text field which displays the song title. If the song title contains an apostrophe or a single quote, the Flash dynamic text field then shows the apostrophe.[code]
View 1 Replies