Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-28-2006, 03:54 AM   #1
astgtciv
Resu Deretsiger
 
astgtciv's Avatar
 
Join Date: Jul 2005
Location: St-Petersburg, Russia
Posts: 2,329
Post Creation-time Application Event: Stage Object Available

Hi, all,

I was searching for an event dispatched to an mx.core.Application at such a time when the Application has been added to the Display List and the Stage object was available for it (I wanted to register some listeners with the stage object). After trying several UIComponent events:

* "add" is dispatched when the component is added to the display list. However, the stage is not available yet as the display list is not yet redrawn.
* "initialize" is dispatched after that, when the component "has finished its construction. The stage is not available yet.
* "creationComplete" is dispatched after that, when the component has finished its everything. And still, the stage is not available.

I finally found the following Application event:
* "applicationComplete": That's the one I was looking for! The stage object is available.
__________________
overstream.net: add subtitles to online videos (youtube, vimeo, blip.tv...).

Last edited by astgtciv; 07-28-2006 at 04:00 AM.
astgtciv is offline   Reply With Quote
Old 07-28-2006, 02:46 PM   #2
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

Also see:
http://www.senocular.com/flash/actio...geDetection.as
__________________
(6)
senocular is offline   Reply With Quote
Old 07-28-2006, 11:33 PM   #3
astgtciv
Resu Deretsiger
 
astgtciv's Avatar
 
Join Date: Jul 2005
Location: St-Petersburg, Russia
Posts: 2,329
Default

Hi, senocular! I foresee some confusion as Flex 2 classes redefine some core AS3 behaviors (e.g., getChild()). So, I guess we always have to be very clear if Flex is being used in the scope of the discussion or not...

flash.events.Event.ADDED is "dispatched to a DisplayObject when it is added to the Display List" (AS3 LangRef). As opposed to the mx.events.FlexEvent.ADD, which is "Dispatched when the component is added to a container as a content child by using the addChild() or addChildAt() method." (Flex 2 LangRef). Ahha! Not the same thing at all, is it!
__________________
overstream.net: add subtitles to online videos (youtube, vimeo, blip.tv...).
astgtciv is offline   Reply With Quote
Old 07-28-2006, 11:40 PM   #4
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

I have no idea. anything mx... is part of the AS-based mx framework of which I am not familiar. Everything else (flash...) is specific to the player and would be what anything mx... is based on anyway.

I'm actually working on a different version of what I posted above - one which is a little more resilliant.
__________________
(6)
senocular is offline   Reply With Quote
Old 07-28-2006, 11:47 PM   #5
astgtciv
Resu Deretsiger
 
astgtciv's Avatar
 
Join Date: Jul 2005
Location: St-Petersburg, Russia
Posts: 2,329
Default

Wait, what is the "mx framework"? I assumed that all the mx.* packages are simply part of the Flex 2 Libraries. What you are saying is that there is another layer, called "mx framework", interposed between the core AS3 and Flex 2?

You moved to SF, I see How do you like it?
__________________
overstream.net: add subtitles to online videos (youtube, vimeo, blip.tv...).
astgtciv is offline   Reply With Quote
Old 07-29-2006, 12:20 AM   #6
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

by "mx framework" I mean any of the mx classes. Flex is based off of them but they are not specific to Flex. The thing is they are also written in ActionScript so there is nothing about mx that you couldn't do yourself, and maybe even better and more efficiently. I dont know if the Tween thing was asked here, but the mx tween with the mx framework provided with Flex is a beast.

Quote:
Originally Posted by astgtciv
You moved to SF, I see How do you like it?
I've been here for a few months Its ok. It has its ups and downs. Don't know yet if I'm going to stay long.
__________________
(6)
senocular is offline   Reply With Quote
Old 07-29-2006, 04:01 PM   #7
astgtciv
Resu Deretsiger
 
astgtciv's Avatar
 
Join Date: Jul 2005
Location: St-Petersburg, Russia
Posts: 2,329
Default

Right, that's a good way to think about them - the mx.* libraries are there, they implement a certain functionality, we can either use them, or use a 3rd party implementation of the same functionality, or implement it ourselves. The source is distributed with them as well, I believe (at least, in Flex Builder 2 you can hit f3 to view source of a library class).

For the built-in flash classes that's true too, I suppose, to a certain extent, but I guess you are saying that not all of them are pure AS, and sometimes refer directly to internal VM structures as an optimization.

Quote:
It has its ups and downs.
Especially Lombard st.
__________________
overstream.net: add subtitles to online videos (youtube, vimeo, blip.tv...).
astgtciv is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ToolTip component bugs hobbis Components 0 09-22-2005 01:45 PM
Stage size same as screen resolution without onResize event ? spinko ActionScript 1.0 (and below) 0 12-13-2004 08:24 AM
Stage placement vs dynamic creation notsofast Simple Stuff (Newbies) 11 05-03-2002 10:41 AM
Event handling with Listeners - learning from Java robertpenner ActionScript 1.0 (and below) 2 08-08-2001 11:36 PM


All times are GMT. The time now is 04:28 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.