Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
a-ok

motionBlur problem

Recommended Posts

Why isn't this working?

 

import com.greensock.*;
import com.greensock.plugins.*;
TweenPlugin.activate([MotionBlurPlugin]);

TweenLite.from(sub31, 0.2, {x:sub31.x+50, motionBlur:true, alpha:0, delay: 0});
TweenLite.from(sub32, 0.2, {x:sub32.x+50, motionBlur:true, alpha:0, delay: 0.1});

 

I get the following error many times.

Property containerClass not found on Boolean and there is no default value.

 

What could be the problem?

Link to comment
Share on other sites

Hey a-ok,

 

I pasted your code into a Flash CS4 project and it worked with no errors.

 

In the documentation http://www.greensock.com/as/docs/tween/ ... lugin.html there is a reference to the containerClass when using Flex and some other stuff that can happen if you are using masks or 3D rotation in the Flash IDE.

 

Check it out. After reading if you still have trouble please post back with more info on your environment and I'm sure someone will help you.

 

Carl

Link to comment
Share on other sites

Hey a-ok,

 

I pasted your code into a Flash CS4 project and it worked with no errors.

 

In the documentation http://www.greensock.com/as/docs/tween/ ... lugin.html there is a reference to the containerClass when using Flex and some other stuff that can happen if you are using masks or 3D rotation in the Flash IDE.

 

Check it out. After reading if you still have trouble please post back with more info on your environment and I'm sure someone will help you.

 

Carl

 

Pretty much all my content is masked so this is useless to me. :(

Link to comment
Share on other sites

if you continue to use layer masks in Flash you are no doubt going to run into more problems when combining actionscript with your masked elements. this is totally beyond a greensock issue and is something inherently wrong with Flash.

 

use ActionScript to mask instead http://www.republicofcode.com/tutorials ... s3masking/

Link to comment
Share on other sites

if you continue to use layer masks in Flash you are no doubt going to run into more problems when combining actionscript with your masked elements. this is totally beyond a greensock issue and is something inherently wrong with Flash.

 

use ActionScript to mask instead http://www.republicofcode.com/tutorials ... s3masking/

 

 

That's a bit too much to ask as I've never had problems with masks until this motionBlur stuff and I don't have the time to change this (will it work on animated/scripted masks?).

 

GreenSock should make it clear that this feature is broken in some cases (in my case in all cases) especially since they're charging $50 for the motionBlur plugin.

Link to comment
Share on other sites

Totally my fault, a-ok - the recent addition of the optional "containerClass" feature in motionBlur caused the problem. I just needed to add one small conditional statement in the code to rectify the problem that caused the errors you mentioned (those would only occur if you used a Boolean value for motionBlur rather than an object like motionBlur:{amount:1, padding:10}). You can get the latest version in your GreenSock account at https://www.greensock.com/account/. Again, my apologies for the confusion/hassle. If you'd like to cancel your membership and get a full refund, just shoot me an e-mail request.

 

And by the way, what Carl said about masks that are applied in the Flash IDE having known problem is true and it has nothing to do with GreenSock stuff. In most common situations you'll be fine. And like I said, the errors you got about containerClass were my fault and are fixed now.

Link to comment
Share on other sites

  • 1 month later...

so glad I used the forum search before posting a question as I was experiencing this exact thing. Thanks for the prompt fix jack!

Link to comment
Share on other sites

  • 2 months later...

Hi

 

I have some issues with MotionBlur...

It's not working and all I am using it's a very basic example :

 

public class Main extends Sprite

{

public function Main()

{

 

addEventListener(Event.ADDED_TO_STAGE, initial);

// Launch your application by right clicking within this class and select: Deubg As > FDT SWF Application

}

 

private function initial(event : Event) : void {

 

var sprite = addChild(new MovieClip())as MovieClip;

sprite.graphics.lineStyle(1, 0x00ff00);

sprite.graphics.beginFill(0x0000FF);

sprite.graphics.drawRect(0, 0, 80, 80);

sprite.graphics.endFill();

sprite.x = 300;

sprite.y = 300;

 

removeEventListener(Event.ADDED_TO_STAGE, initial);

 

TweenPlugin.activate([MotionBlurPlugin]);

 

TweenMax.to(sprite, .8, {x:400, y:300, motionBlur:{amount:2, padding:10}});

 

}

}

Link to comment
Share on other sites

I have some issues with MotionBlur...

It's not working...

I just tried your code and it worked perfectly for me. What happens when you publish? An error? Do you see anything? Just no blur? Are you sure you have the MotionBlurPlugin class? Any chance you could zip up an FLA and post it here so that we can publish it on our end and see the issue reproduced?

Link to comment
Share on other sites

Hi Jack,

 

Thank you very much and sorry if I bother you with that.

 

I realized that in my FDT project there were two swc of your library, of course one without the plugin, so my Class was pointing that one...

 

Sorry for that,

 

Gabriele

Link to comment
Share on other sites

  • 3 months later...

Any idea why I should be getting this similar error cropping up:

 

Occasionally code which was working fine will suddenly and mysteriously start reporting the following error:

ReferenceError: Error #1069: Property mode not found on Boolean and there is no default value.

 

Most often the error occurs on a simple alpha tween call e.g:

TweenLite.to(_ctrl, 1.0, {alpha:0.5});

I am not using any property called 'mode' anywhere in my code.

 

This has happened numerous times and the only way I can get around it (temporarily) is to change my alpha tweens to direct property changes eg

 

_ctrl.alpha = 0.5;

 

which works fine. Typically i will use this for a few hours (or days) then change the functions back to use the TweenLite calls and just as mysteriously, they work.

 

Any ideas?

Link to comment
Share on other sites

I'm baffled - never heard of anything like that before. Maybe you've got a corrupt Flash install or something really weird like that. Can you post a file that consistently reproduces that error? Is there really no rhyme or reason to it? I'd LOVE to see a sample FLA (the simpler the better - no need to post your production files).

Link to comment
Share on other sites

Hi Jack,

 

I am using the greensock.swc in Flash Builder 4.5 so no simple fla to post, and it has lots of asset and back-end database dependencies that would make it impossible for you to run.

I'll try to reproduce the problem it in a small project I can send you.

Link to comment
Share on other sites

It was my bad :(

 

I imported the classes instead of the swc and debugged into them :

I'd used (or tried to use) the overwriteManager in this project and I must have been having a brain-fart when I initialized it because I'd written the code:

TweenLite.overwriteManager = true;

which of course causes it to fail when it reached this line in TweenLite.as:

 

306: _overwrite = (!(Number(vars.overwrite) > -1) || (!overwriteManager.enabled && vars.overwrite > 1)) ? overwriteManager.mode : int(vars.overwrite);

 

It only happened intermittently, because as I changed things around in the code tweens were only occasionally trying to overwrite.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×