I am able to create states fine programatically, even assign transitions to the view, but my transitions don't trigger when i switch from one state to another
var stateArray:Array = (__view.states != null)?__view.states.concat(): new Array();
var nState:State = new State();
nState.name = "Open";
var propw:SetProperty = new SetProperty(__view,"percentWidth",100);
var proph:SetProperty = new SetProperty(__view,"percentHeight",100);;
nState.overrides.push(propw);
nState.overrides.push(proph);
stateArray.push(nState);
nState = new State();
nState.name = "Closed";
var propw:SetProperty = new SetProperty(__view,"width",__collapsedSize);
var proph:SetProperty = new SetProperty(__view,"height",__collapsedSize);;
nState.overrides.push(propw);
nState.overrides.push(proph);
stateArray.push(nState);
var nTransition:Transition = new Transition();
//nTransition.fromState = "Open";
//nTransition.toState = "Close";
var res:Resize = new Resize();
res.target = __view;
res.duration = 400;
nTransition.effect = res;
__view.transitions = __view.transitions || new Array();
__view.transitions.push(nTransition);
__view.states = stateArray;
thanks in advance for any help.
j
--
j:pn
http://www.lennel.org
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.