Fx{r} is trying to start the Fx{r} Community! Please join our group on Adobe Groups following this link: http://groups.adobe.com/groups/ab29539ab9.
Fx{r} is now on Twitter too. Follow us @ twitter.com/fx_r!
«
»

ActionScript, Debug, Errors, Flex 3 SDK

Undefined Error in Debug Session Because of Sequence

Andrei Ionescu | 13.10.09 | Comment?

Google Buzz

If you ever got into the following error (see bellow after this paragraph) you must know how you can overcome it.

The error is triggered only in debugging. No trace of it in the normal run. But if you need to debug and get this error it will pause the debug session and even after lots of resume pressed you’ll won’t get over it because is a cyclic error.

undefined
	at flash.events::EventDispatcher/dispatchEvent()
	at mx.effects::Effect/effectStartHandler()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\Effect.as:1310]
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at mx.effects::EffectInstance/play()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\EffectInstance.as:580]
	at mx.effects.effectClasses::CompositeEffectInstance/play()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\effectClasses\CompositeEffectInstance.as:172]
	at mx.effects.effectClasses::SequenceInstance/play()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\effectClasses\SequenceInstance.as:150]
	at mx.effects::EffectInstance/finishRepeat()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\EffectInstance.as:685]
	at mx.effects.effectClasses::SequenceInstance/play()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\effectClasses\SequenceInstance.as:156]
	at mx.effects::EffectInstance/finishRepeat()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\EffectInstance.as:685]
	at mx.effects.effectClasses::SequenceInstance/play()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\effectClasses\SequenceInstance.as:156]
	at mx.effects::EffectInstance/finishRepeat()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\EffectInstance.as:685]
	at mx.effects.effectClasses::SequenceInstance/play()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\effectClasses\SequenceInstance.as:156]
	at mx.effects::EffectInstance/finishRepeat()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\EffectInstance.as:685]
	at mx.effects.effectClasses::SequenceInstance/play()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\effectClasses\SequenceInstance.as:156]
	at mx.effects::EffectInstance/finishRepeat()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\EffectInstance.as:685]
	at mx.effects.effectClasses::SequenceInstance/play()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\effectClasses\SequenceInstance.as:156]
	at mx.effects::EffectInstance/finishRepeat()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\EffectInstance.as:685]
	at mx.effects.effectClasses::SequenceInstance/play()
	[C:\autobuild\3.x\frameworks\projects\framework\src\mx\effects\effectClasses\SequenceInstance.as:156]

The error is triggered by Sequence and the code looks like this…

<mx:Sequence id="movement" repeatCount="0" startDelay="{delay}">
    <mx:Move id="movementUp" target="{this}" duration="{interval}" 
        yTo="0" />
    <mx:Move id="movementDown" target="{this}" duration="{interval}" 
        yTo="{_startYPos}" />
</mx:Sequence>

What’s the problem? After trying different things on the code I noticed that instead of setting the target property of the Sequence I did set up the target of each Move item. So by removing the target from each Move and adding one to Sequence may fix the problem.

Another thing to check is that the sequence is called only once for the target object. If the same effect is called twice or more on the same object and the previous effect did not finished their job a conflict appears. That means that starting the effect on a event that triggers more than once (ex: updateComplete, addedToStage) will end in this error also. Try use creationComplete event instead.

It is important to tell you that the Flex SDK I used to test this are 3.4 and 3.5 from Adobe Nightly Builds.

Hope this helps you.

Share and Enjoy:
  • Twitter
  • Google Buzz
  • LinkedIn
  • Google Bookmarks
  • del.icio.us
  • Digg
  • Sphinn
  • blogmarks
  • Reddit
  • StumbleUpon
  • Facebook
  • DZone
  • FriendFeed
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • Slashdot
  • MySpace
  • Add to favorites




Tags: , ,

This post was written by Andrei Ionescu

Views: 948

related

have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

:

:


«
»