Actionscript 3 :: TileList CreationComplete In Adobe Flex 3.0
Jul 3, 2010
I have made a tile list is Adobe Flex as follows
[Code]...
the problem is the creationComplete event is not fired for each PageImageRenderer, and it is fired only for the tiles visible at start so the rectangles drawn in initComponents() is only drawn for those tiles with valid values, and when I scroll to next row using scrollToIndex() function the rectangles are shown with previous values. and no initComponents() is called for these tiles? however the data.name, data.class are correctly displayed but not the rectangles, why it is so? What is the proper event against which I should call initComponents()?
View 1 Replies
Similar Posts:
Aug 19, 2010
I am using the new Flex4 Spark stuff but I'm stuck at an awful problem. Let me explain a bit of the situation first. I have a container (mx:Canvas) in which I do addElement() of one type instances (DocumentWindow). The document window class is supposed to be the holder for a view according to the type of the document. The DocumentWindow class extends TitleWindow. I also have a task bar which is a mx:Canvas with buttonBar inside so that the windows should be switchable. So in 2 words I got windows holder and a taskbar. The strange thing comes now: When I put a DocumentWindow with type "doc" (which loads swf made by swftools) the window appears in the windows holder and as task on the taskbar.
But if first I open something else - DocumentWindow with type audio or video which causes the DocumentWindow to instantiate different view inside, the window doesn't appear on the screen neither a task button is being shown in the taskBar. I put a trace() on that and it shows that numElements is increasing, the taskBar ButtonBar.dataProvider.length is increased, so the things are there - just that they stay invisible until I open DocumentWindow with type 'doc'? I even tried to make DocumentWindow not to load the view inside because I thought that the only difference is the view... but then even the 'doc' typed DocumentWindow didn't show. A clue may be that creationComplete is never called until a 'doc' view is added.
[Code]...
View 1 Replies
Apr 4, 2011
I'm working with a large flex applications and I have noticed that one of our largest components (with lots of child canvases) takes about 6 seconds between the initialize and creationComplete events. I've been doing some reading and have found that having lots of nested canvases can cause slowdowns, but i'm not sure if this is where the slowdowns would be?
View 3 Replies
May 16, 2011
I didn't get the difference between those two event.What is the difference between them ?
View 3 Replies
Sep 17, 2011
has anyone made a Custom Skin for a TileList component in Flash CS5. I want to change the scrollbar of the TileList, i want the track bar as just a thin white line and the thumb a orange circle, this for a Touch Interface.
View 1 Replies
Jul 26, 2011
I have a creationComplete="myMethod(event)" in my s:Application, and it runs fine on my 3 flex (Flash Builder 4) development machines. However it is not working on the 2 end user machines I tried it on today!
It is not executing the creationComplete at all, but it is running the application and it seems like all the other code is running fine - with the exception of possibly some other creationComplete code for other components in the app.
On my machines I have tested it under IE 8 and 9, FireFox and Chrome - on all 3 machines.
On these two machines it has the problem on both IE 7 and IE 8. I even installed FireFox new and it also has the issue. After installing the latest flash player and deleting all browser history/cookies it still has the problem.
What might cause the creationComplete to not execute?
Update: I tried using initialize() and no difference.
However, I believe I found the line of code causing the problem:
var isDebug:Boolean = new Error().getStackTrace().search(/:[0-9]+]$/m) > -1;
If I comment that out, it works fine. I need that to know if my app is running in development/debug mode or on an end users machine.
View 2 Replies
Nov 12, 2009
I have a simple component I created which I instantiate in my main program like so:[code]I receive the error "Cannot access a property or method of a null object reference" on the second line because newMessage was not fully created prior to hitting the second line of code trying to set my "body" textarea's text. I know I can build a "creationComplete" event handler, but isn't there a simpler way to do this?
View 2 Replies
Feb 2, 2011
I have a component that, once it's all ready, I need to set the state based on a variable I'm reading in from XML. I tried doing it with creationComplete, but it's apparently not ready, as the state isn't being set with elements rendering properly, but the states & rendering work fine if I do a subsequent state change with a click action on some element.
What should I do in this situation to make sure the state gets set at the right time & elements that should appear due to includeIn exist so they can be rendered? initialize instead of creationComplete doesn't seem to do the trick for the first time the component is created. Any successive calls to the component are fine.
View 3 Replies
Mar 7, 2011
I tried to send some services to fetch data in the creationComplete handler. Then I need to process the server raw data before displaying some sub components. Where should I put these kind of code?
View 2 Replies
Apr 30, 2010
I've coded this small snippet to show what I'm not understanding:
[Code]...
Shouldn't I be able to read loaderInfo inside the creationComplete handler? I'm trying to pass a string from the html to my flash component, that's why I have to get loaderInfo working.
View 1 Replies
Dec 17, 2010
In my flex application I use the viewstack.selectedchild() property to change the views.
When I revisit the views by the viewstack.selectedchild() property the initialize method doesnot get invoked..
View 5 Replies
Jan 13, 2011
I have created a flex project on flash builder 4. In the MXML I have
xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init();"
And to check if it runs
[Code]...
View 2 Replies
Sep 8, 2011
I have a spark DataGrid component with several columns and I want to have my application default to descending order on the first column in the DataGrid. I would like to use the built-in default sort that occurs when clicking the top header once. I have no need to sort the ArrayCollection I'm working with or change what the comparators are.I also want any user-generated sorting such as clicking on a different column's header to override the default sorting.
View 1 Replies
Mar 21, 2011
Multiple axis creation via MXML works fine:
http:[url]...
But when I'm trying dynamically create horizontal and vertical axis then I'm getting extra axes. I believe this is Adobe bug. How I can fix this behavior?
<?xml version="1.0" encoding="utf-8"?>
<s:Application
minHeight="600"[code].....
View 2 Replies
Mar 19, 2012
I have the following Application tag code in my widget:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:local="*"
width="100%" height="100%" minWidth="200" minHeight="200" layout="absolute"
creationComplete="init()"
defaultButton="{Send_btn}">
[Code]...
View 1 Replies
Aug 14, 2009
In the code below, the presentedAlbumIndex is used to control the selectedIndex of the TileList. Item "five" is initially selected. Whenever the button is pressed the first item in the array is deleted, and the presentedAlbumIndex is decremented.
In theory, the selected index should stay with "five" every time the button is clicked (until "five" is itself deleted). It works this way for the first button press. However, on the 2nd button press the highlighting changes to "six" for some reason. Also, the TileList selectedIndex is always one behind.
I tried looking into ListBase and monitoring selectedIndex. It looks like the selectedIndex is updated initially to the correct index, but then it reverts back at some point to the correct index+1. I do not know why it's setting back.
It seems it's due to the fact that I am doing a data provider delete and index change in the same operation.
Is there some function in TileList I could override to keep selectedIndex up to date?
Steve
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
[Code]....
View 1 Replies
Sep 1, 2009
In my TileList, I want to select the TileList items on rollover, as opposed to the click event. I already have the TileList setup to allowMultipleSelection = "true".
View 3 Replies
Sep 3, 2009
I have 2 TileList component in my Flex application. 1 tilelist is filled with data much like following xml sample:
<person name="Test">
<likes>Flex</likes>
<likes>PHP</likes>
</person>
<person name="test2">
[Code] .....
data shown is the preference.
The user can click the first tilelist and then the items that person "likes" should be selected in the second tilelist (in other words they lit up). Click event on my first tilelist
private function highlightPreferences(e:ListEvent):void{
trace(e.currentTarget);
//and now I'm stuck
}
View 1 Replies
Apr 7, 2010
I have an associative array that I want to display using TileList. However, it doesn't understand what is being fed to it. All I got is [object] in the TileList.
[bindable]
public var people as array = new array();
private function loadArray():void{
[code].....
View 1 Replies
Nov 3, 2011
I am navigating the items of tile list using next and previous button. I need to highlight the first item in the tilelist by default ( like the first item is being selected by default)
View 1 Replies
Jul 21, 2009
Is there a way to have the TileList component to auto-size to its contents? I have tried setting it 100%, but it seems that won't help. I don't want to hard-code the height because the content will be vary, and I don't want scrollbars to show up.
View 2 Replies
Mar 12, 2010
I'm working for the first time with a TileList and an itemRenderer and I'm having a bit of trouble getting the information from my array collection to display Here's what I've got
private function loadData():void{
var stmt:SQLStatement = new SQLStatement();
stmt.sqlConnection = sqlConn;[code].....
how I go about pulling the information from the array and putting it into labels like username, userjob, userbio ect, Inside the TitleList and itemRenderer.
View 1 Replies
Jul 25, 2010
I have prepared a simple test case for a PopUpButton opening a TileList with black and red entries and it mostly works, but has 2 annoyances. I've searched a lot, tried several variants (added [Bindable] members in my renderer; added color member to the bids array; created my public override set data() method; ...) and has been getting some answers too, but they are way too general.
1) Scrolling "tl2" right-left doesn't work well: the entries are displayed in a mix of red and black. I know the TileList reuses itemRenderer, but how do I fix the problem?
2) In debug-mode I get numerous warnings: warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher)
[Code]...
View 1 Replies
Sep 28, 2010
I'm using the TileList in a Flex 3 website. I need to set the rowCount and columnCount to factors of the total number of items in my array. For example, let's say that there are 15 items in my array. Then, I'd like to set the rowCount to 3 and the columnCount to 5 (3x5=15). Or if I had 16 items in the array, then I'd like to set the rowCount to 4 and the columnCount to 4 (4x4=16). The problem is that the length of the array varies. It's pulled from a database.
View 1 Replies
Sep 28, 2010
I've got a tileList in a Flex 3 website. I want to programmtically turn off the visibility of a tile. So for example[code]...
View 2 Replies
Nov 24, 2010
I want to create a tilelist in which there would be different canvas or vbox etc, and i want to make them drag able.I wrote a code to do this, but the output does not shows anything in a list.
<mx:TileList width="1500" height="1000" dragMoveEnabled="true"
selectable="true" selectionColor="#FFFFFF"
dragEnabled="true" dropEnabled="true"
[code].....
View 1 Replies
Apr 11, 2011
I have tilelist, which is dynamically loaded XML file with pictures,How do I do that would be when you click on a picture in the Label gave her name?
<mx:TileList id="tileList"
alternatingItemColors="[#FFFFFF,#EEEEEE]"
dataProvider="{xmlListColl}"
[code]......
View 1 Replies
Aug 15, 2009
I have a TileList that's loaded with data from Flickr. The tilelist uses an imageRenderer to make a bunch of thumbnails. I'm trying to create a custom drag and drop function, but I want to get the image source of the tilelist mouseEvent target. Here's what the code looks like for the drag handler:
[Code]...
View 1 Replies
Oct 26, 2009
I'm running into an odd issue with itemRenderers inside a TileList.Here is a working example without an itemRenderer: 152.org/flex/
Here is the broken version with an itemRenderer: 152.org/brokenExample/. (I don't have the rep to make both of these a link)Both examples have "View Source" enabled.To see the problem use the broken example, select an album and scroll down one row. Scroll back up and the images will be switched.If you try this on the working example it's fine.This seems to be a widely known bug, but I can't find a solution for it.
UPDATE: I started playing with this example again and found out something else. Turns out you don't have to override the data setter. You can create a new method in the itemRenderer that is set whenever the tile wants to refresh. So the trick is to not rely on the initialize or creationComplete methods.This is what I have for the itemRenderer in the Application.
<itemRenderers:ImageTile img="{data}"/>
This is the code I have in the itemRenderer.
public function set img(value:String) : void {
trace("setting source: " + value);
this.source = value;[code]....
I updated my example to reflex this change.
View 2 Replies
Feb 10, 2010
How to use the horizontal align property of TileList or List in flex? I want to make an align left of my TileList with only 1 column. I know I can use a simple List for that, but this is a requirement.
View 2 Replies