History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: SDK-18465
Type: Bug Bug
Status: Closed Closed
Resolution: Not a Bug
Priority: B B
Assignee: Matthew Finitz
Reporter: Matthew Finitz
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Flex SDK

mx.states.Transition - AutoReverse Causes EffectEnd To Be Raised Prematurely

Created: 12/16/08 05:40 PM   Updated: 01/08/09 05:20 PM
Component/s: Spark: Effects
Security Level: Public (All JIRA Users )

Severity: Incorrectly Functioning
Reproducibility: Every Time
Discoverability: Medium
Found in Version: SDK Gumbo Iteration 9
Milestone: SDK Gumbo Iteration 10
Affected OS(s): All OS Platforms - All
Steps to Reproduce:
Steps to reproduce:
1. Run the pasted app.
2. Click the "->S2" button. Wait ~1.5s (+1s move, +.5s (half of the) fade).
3. Click the "->S1" button.
 
 Actual Results:
 The button raises effectEnd when it begins autoReversing (visually conveyed by a change in height of the target button).
 
 Expected Results:
 The button should raise effectEnd after the reversal completes (after the move is reversed, but not after the initial startDelay since that should be ignored).
 
 Workaround (if any):
 
 APP:
<?xml version="1.0" encoding="utf-8"?>
<Application
xmlns="http://ns.adobe.com/mxml/2009"
xmlns:Stateful="Stateful.*"
layout="absolute"
backgroundColor="0xFFFFFF" backgroundGradientColors="[0xFFFFFF, 0xFFFFFF]"
creationComplete="{this.currentState='State1'}">

<states>
<State name="State1"/>
<State name="State2"/>
</states>

    <transitions>
        <Transition id="s1s2" fromState="State1" toState="State2" autoReverse="true" effect="{s_Move}"/>
        <Transition id="s2s1" fromState="State2" toState="State1" autoReverse="true" effect="{s_Move}"/>
    </transitions>
        
    <Declarations>
        <Sequence id="s_Move"
         duration="2000"
         target="{target}"
         startDelay="1000" effectEnd="{target.height=50}">
            <Move />
            <Fade />
        </Sequence>
    </Declarations>
    
    <VBox
     x="0" y="0"
     width="80">
     <Button width="100%" label="->S2" click="{this.currentState='State2'}"/>
     <Button width="100%" label="->S1" click="{this.currentState='State1'}"/>
    </VBox>
    
    <Button id="target"
     x.State1="100" x.State2="200"
     y.State1="100" y.State2="200"
     alpha.State1="1" alpha.State2=".25"
     />
</Application>

 
Language Found: English
Bugbase Id: none
Triaged: Yes
Regression: No
QA Owner: Matthew Finitz
Resolved by: Chet Haase
Participants: Chet Haase and Matthew Finitz
Browser: Internet Explorer 7.x
JDK: Sun 1.5.x


 All   Comments      Sort Order:
Chet Haase - [01/08/09 05:18 PM ]
There's an erroneous assumption here that 'effect_end' should not be sent out on a reversing effect. But that's not the case. Whenever an effect ends, the event is sent out. In this case, the first effect is ended early to get ready to start the second/reverse effect. But ended it is, so the effect_end event is sent out and the height changes appropriately. If the desire is to not perform some operation unless/until the object reaches a certain point in the animation, then a different mechanism than handling effect_end should be used instead.

Matthew Finitz - [01/08/09 05:20 PM ]
Given my new understanding of the symmetrical design model, this is absolutely correct. Closing as NAB.