[flexcoders] Re: Bug in nested CompositeEffects?

2007-04-25 Thread Matt
This is just a simple example to show the problem. The actual usage is
because I am doing some more complex effects and I'd like the ability
to nest composite effects, but I get the same error in both cases.

--- In flexcoders@yahoogroups.com, Manish Jethani
[EMAIL PROTECTED] wrote:

 Just curious, why are you putting a parallel inside of another
 parallel? Why the extra nesting?
 
 On 4/25/07, Matt [EMAIL PROTECTED] wrote:
  I'm trying to do something that I would consider pretty basic and
  reading the docs it says this should be supported. I created a simple
  test case to show the problem:
 
  obj = new Button();
  var p1:Parallel = new Parallel();
  var p2:Parallel = new Parallel();
  var r1:Rotate = new Rotate();
  r1.angleFrom = 0;
  r1.angleTo = 360;
  r1.duration = 500;
  p2.addChild(r1);
  p1.addChild(p2);
  obj.setStyle('hideEffect', p1);
 
  This is the error it throws when I try to hide the button:
  TypeError: Error #1009: Cannot access a property or method of a null
  object reference.
  at mx.effects::EffectInstance/initEffect()
  at mx.effects.effectClasses::CompositeEffectInstance/initEffect()
  at mx.effects.effectClasses::CompositeEffectInstance/initEffect()
  at mx.effects::Effect/createInstance()
  at mx.effects::CompositeEffect/createInstance()
  at mx.effects::CompositeEffect/createInstances()
  at mx.effects::Effect/play()
  at mx.effects::EffectManager$/::createAndPlayEffect()
  at
 
mx.effects::EffectManager$/http://www.adobe.com/2006/flex/mx/internal::eventHandler()
  at
 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
  at flash.events::EventDispatcher/dispatchEvent()
  at mx.core::UIComponent/dispatchEvent()
  at mx.core::UIComponent/setVisible()
  at mx.core::UIComponent/set visible()
  at jseamless/::translateSetComponentProperty()
  at jseamless/::translate()
  at jseamless/::processServerMessage()
  at jseamless/::processInputStream()
  at jseamless/::incomingData()
 
  Everything works fine as long as I only have one CompositeEffect and
  standard Effect children, but any time I try to nest a CompositeEffect
  within a CompositeEffect this happens.
 
  Accordion to this: You can nest mx:Parallel and mx:Sequence tags
  inside each other. For example, two effects can run in parallel,
  followed by a third effect running in sequence. (referenced from
 
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=behaviors_068_18.html)
  it is valid to have CompositeEffects nested within each other.
 
  Perhaps I'm doing something wrong here?
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 





Re: [flexcoders] Re: Bug in nested CompositeEffects?

2007-04-25 Thread Manish Jethani
This is odd, but it seems like the the target property does not
propogate down to the individual effects. You'll have to set target on
the innermost CompositeEffect explicitly. (If you have time try to
find out why this is happening and perhaps a better solution -- use
the source, Luke!)

On 4/26/07, Matt [EMAIL PROTECTED] wrote:
 This is just a simple example to show the problem. The actual usage is
 because I am doing some more complex effects and I'd like the ability
 to nest composite effects, but I get the same error in both cases.

 --- In flexcoders@yahoogroups.com, Manish Jethani
 [EMAIL PROTECTED] wrote:
 
  Just curious, why are you putting a parallel inside of another
  parallel? Why the extra nesting?
 
  On 4/25/07, Matt [EMAIL PROTECTED] wrote:
   I'm trying to do something that I would consider pretty basic and
   reading the docs it says this should be supported. I created a simple
   test case to show the problem:
  
   obj = new Button();
   var p1:Parallel = new Parallel();
   var p2:Parallel = new Parallel();
   var r1:Rotate = new Rotate();
   r1.angleFrom = 0;
   r1.angleTo = 360;
   r1.duration = 500;
   p2.addChild(r1);
   p1.addChild(p2);
   obj.setStyle('hideEffect', p1);
  
   This is the error it throws when I try to hide the button:
   TypeError: Error #1009: Cannot access a property or method of a null
   object reference.
   at mx.effects::EffectInstance/initEffect()
   at mx.effects.effectClasses::CompositeEffectInstance/initEffect()
   at mx.effects.effectClasses::CompositeEffectInstance/initEffect()
   at mx.effects::Effect/createInstance()
   at mx.effects::CompositeEffect/createInstance()
   at mx.effects::CompositeEffect/createInstances()
   at mx.effects::Effect/play()
   at mx.effects::EffectManager$/::createAndPlayEffect()
   at
  
 mx.effects::EffectManager$/http://www.adobe.com/2006/flex/mx/internal::eventHandler()
   at
  
 flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at mx.core::UIComponent/dispatchEvent()
   at mx.core::UIComponent/setVisible()
   at mx.core::UIComponent/set visible()
   at jseamless/::translateSetComponentProperty()
   at jseamless/::translate()
   at jseamless/::processServerMessage()
   at jseamless/::processInputStream()
   at jseamless/::incomingData()
  
   Everything works fine as long as I only have one CompositeEffect and
   standard Effect children, but any time I try to nest a CompositeEffect
   within a CompositeEffect this happens.
  
   Accordion to this: You can nest mx:Parallel and mx:Sequence tags
   inside each other. For example, two effects can run in parallel,
   followed by a third effect running in sequence. (referenced from
  
 http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=behaviors_068_18.html)
   it is valid to have CompositeEffects nested within each other.
  
   Perhaps I'm doing something wrong here?
  
  
  
   --
   Flexcoders Mailing List
   FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com
   Yahoo! Groups Links
  
  
  
  
 




 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links