Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-13-2009, 06:43 AM   #1
Registered User
Join Date: Oct 2006
Location: Warsaw, Poland
Posts: 13
Question one effect for all components

Hello guys! Its been quite long time since my last post...

Anyway, here's the question: is there a way to assign one effect to all components showing but not thru specifying showEffect property in code?

I mean, it could be quite annoying to specify showEffect for all components when there's hundred different ones on one Canvas.

IE: Canvas with Label, Picture, TextField (or whaterver you may choose).
All components should be displayed one after another with ie. Fade effect fading everything in.

Thanks in advance for helping me out
gutaker is offline   Reply With Quote
Old 10-14-2009, 07:29 PM   #2
Registered User
Join Date: Oct 2006
Location: Warsaw, Poland
Posts: 13
Default solved!

solved it via actionscript portion of code so here it is
public var ar1:Array = new Array();
public function get_elements_names():void
	var s:String = application.childDescriptors;
	var pat:RegExp = /UIComponentDescriptor_/gi;
	s = s.replace(pat, "");
	ar1 = s.split(",");
public function set_effects():void
	for each (var item:String in ar1)
		this[item].setStyle("creationCompleteEffect", ein1);
		this[item].setStyle("removedEffect", eout1);
a little bit of explanation:
its best to put the get_elements_names() function to application preinitialization event, then set_effects() function to initialization event.

the [Bindable] statement is used to populate datagrid for my testing purposes, so its not neccessary.

its obvious, in set_effects() function, you can put whatever effect you want

thats it! hope this will help someone someday
gutaker is offline   Reply With Quote

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

All times are GMT. The time now is 06:57 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.