SwishTalk.com
 

Go Back   SwishTalk.com > >

Reply
 
Thread Tools Display Modes
#1   MC Tween for SM2  
 
eggs-in-Wisconsin's Avatar

Name: 
eggs-in-Wisconsin
Status: Offline
Rank: FlawlessDog
Posts: 286
Mood: Horsefeathers
Old 10-16-2008, 03:53 PM Reply With Quote


Update Notes:
This thread contains multiple versions.

The newest version is here (mc_tween2_oct_21_2008_fullZip.zip [all examples]) <---

and here (mc_tween_oct_21_2008_SM2.zip [filters update])

and the flash8 version, here (updated filtertest.fla and mc_tween2.as)

The rest of these versions have been left here for comparison sake.

================================================== ========================

Ok, this is pretty cool stuff.
Still uses the penner equations, but has been brought together into a very cool library of prototypes.
Works with a couple of the flash8 filters, sound control as well as your basic penner tweens.

Most of the tween engines I've come accross are written in full as2 or higher, with classes, packages and all that, so it was great to find one that works with SWiSHMax2.

I've taken the most impressive flash examples, and made SM2 versions of each, including the original as file and created an external file for sm2(mc_tween2.sm2) and put them into the zipfile posted below.

I think this could be built upon, and really expand on the work already done.
The author has moved on to a as3 version, so I don't think any more updates will be made to this version...unless we can do it.

I haven't done a lot of reading in the docs for this.
I pretty much did what I always do...jump right into the middle of it, and start playing a bit and get the general idea...yadda, yadda, yadda :wave:



Quote:
Just what the hell is MC Tween?

MC Tween is a free library of prototypes that can be used on Flash MX and above (with both AS1 and AS2) to create property tweenings dinamically using several different easing equations - in practical words, creating easing animations via simple and small coding. Also called a tweening extension, MC Tween is just a bunch of actionscript code you can add to your Flash movies via a #include command. You will then have several "new" MovieClip, TextField and Sound methods and functions at your hand.
...more...
http://hosted.zeh.com.br/mctween/

Quote:
================================================== =============================
= MOVIECLIP/TEXTFIELD/SOUND TWEENING PROTOTYPE(s)
-------------------------------------------------------------------------------
=
= MC_TWEEN
= Created to be a helpful tweening extension for mortal users
= Find documentation and examples at the site:
= http://hosted.zeh.com.br/mctween/
=
= By Zeh Fernando
= z [AT] zeh.com.br
= 2003-2006
= Sao Paulo, Brazil
= http://www.zeh.com.br
=
-------------------------------------------------------------------------------
=
= This tweens given movieclip properties from their current values to new values,
= during an specified time. It's inspired by Jonas Galvez's simpleTween method
= and created to be *easy* to non-experienced coders (designers).
=
-------------------------------------------------------------------------------
================================================== =============================
Other disclaimers
-------------------------------------------------------------------------------
All easing equations used here (and a few other auxiliary functions) are
based on Robert Penner's work. To find more information:

http://www.robertpenner.com/easing/

What follows is the equation use's license:
-------------------------------------------------------------------------------
TERMS OF USE - EASING EQUATIONS

Open source under the BSD License.

Copyright © 2001 Robert Penner
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the author nor the names of contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
Home | Using MC Tween | Documentation | Animation Types | Downloads | Examples | Extensions | Author & Disclaimer | Links

I've taken the most impressive flash examples, and made SM2 versions of each and put them into this zipfile.




Attached Files
File Type: zip mc_tween2_for_SM2.zip (293.2 KB, 273 views)
               
__________________

Last edited by eggs-in-Wisconsin; 10-21-2008 at 06:26 PM.. Reason: added full zipfile of examples with updated sm2(as) file
 
View Public Profile Send a private message to eggs-in-Wisconsin Visit eggs-in-Wisconsin's homepage! Find all posts by eggs-in-Wisconsin Add eggs-in-Wisconsin to Your Contacts
#2    
 
pedromau's Avatar

Name: 
pedromau
Status: Offline
Rank: \m/ [ºº] \m/
Posts: 1,537
Mood: weird?!
Old 10-16-2008, 04:27 PM Reply With Quote


Eggs... I must say...
You've become an impressive actionscripter!

You've done awsome things (many hours of work) and shared them with us!!

10/10 for you!!!
Thanks and keep up the good work!

Reezpekt!!!


               
__________________
pEdRomAU
-------------------------------
http://www.theswishdock.com THE SWISHDOCK - Swishmax files from $1!!!
http://www.statiks.net
http://www.kneeldown.net

Last edited by pedromau; 10-16-2008 at 04:30 PM..
 
View Public Profile Send a private message to pedromau Visit pedromau's homepage! Find all posts by pedromau Add pedromau to Your Contacts
#3    
 
eggs-in-Wisconsin's Avatar

Name: 
eggs-in-Wisconsin
Status: Offline
Rank: FlawlessDog
Posts: 286
Mood: Horsefeathers
Old 10-16-2008, 04:41 PM Reply With Quote


All I did was make the introductions between the SwishTalk community,
and Zeh Fernando's mc_tween2 library. Thanks tho

Since SM2 came out, there's a lot more doors open to us.
Much more flash-like and power to spare at a fraction the cost.




               
__________________
 
View Public Profile Send a private message to eggs-in-Wisconsin Visit eggs-in-Wisconsin's homepage! Find all posts by eggs-in-Wisconsin Add eggs-in-Wisconsin to Your Contacts
#4    
 
kasey's Avatar

Name: 
kasey
Status: Offline
Rank: SWiSHer
Posts: 357
Old 10-17-2008, 10:06 AM Reply With Quote


they say eggs in wisconsin makes the best omelettes!:wave: you certainly have the Swish Cheese!!


               
 
View Public Profile Send a private message to kasey Find all posts by kasey Add kasey to Your Contacts
#5    

Name: 
OutCast**NL
Status: Offline
Rank: SWiSHer
Posts: 647
Old 10-17-2008, 11:31 AM Reply With Quote


Nice find,....
I've played around with MC_Tween a few months ago, its actually pretty cool.
However,.. since, at that time, I already created my own Tween engine/ component
with a matching CodeGenerator in max,.. I just stayed with my version.
Cause the CG is actually pretty handy,...
Would be cool if someone created a CG for MC_Tween.....

I also extended the easing types, allowing me to combine different InOut/ OutIn easing effects
like: easeInBackOutElastic, easeOutBounceInQuad etc. Giving me 300+ types of easing.
I would have attached them for you, but my script setup is quite different, so they wont work in MC_Tween
(but creating them is pretty much copy paste,.. )

Tip: If you want to create your own additional easing types, you may want to check out

Timothee Groleau's easing_function_generator



               
 
View Public Profile Send a private message to OutCast**NL Visit OutCast**NL's homepage! Find all posts by OutCast**NL Add OutCast**NL to Your Contacts
#6    
 
eggs-in-Wisconsin's Avatar

Name: 
eggs-in-Wisconsin
Status: Offline
Rank: FlawlessDog
Posts: 286
Mood: Horsefeathers
Old 10-17-2008, 02:05 PM Reply With Quote


Well, thank you.

That's a heck of a good tween engine you've got going there.
I am looking forward to checking it out in greater depth.
I've been spending so much time on the flash forums, I guess I might have
lost touch with what is going on around these parts LOL
I keep checking out those flash forums to see what I can port to SM2.
It's been fun for me, and keeps me learing new things.

This version of mc_tween I posted above required very little modification
to port to SM2, so was pretty easy to do. It is still missing tweens for
the dropshadow, and I see you do have that in yours.
I suspect the AS3 version of mc_tween does have that. I downloaded it
but haven't really looked at it yet.

I'll be glad when SM is able to do some as3 stuff.
I suppose if that happens tho, we'll just skip right over as classes.


               
__________________
 
View Public Profile Send a private message to eggs-in-Wisconsin Visit eggs-in-Wisconsin's homepage! Find all posts by eggs-in-Wisconsin Add eggs-in-Wisconsin to Your Contacts
#7    

Name: 
OutCast**NL
Status: Offline
Rank: SWiSHer
Posts: 647
Old 10-18-2008, 08:46 PM Reply With Quote


Thanks,..

It was a fun project to do,
altough I'm not shure wich part required the most effort,
the Tween engine itself or the CodeGenerator

Most of the scripting for the engine was actually pretty straight forward.
Altough there were a few things a bit tricky.

Quote:
I keep checking out those flash forums to see what I can port to SM2.
It's been fun for me, and keeps me learing new things.
Yes, the new features in swishmax2 certainly open a few doors.

But since it is basicly a flashclone, it will always be behind on flash.
So I'm affraid that by the time swishmax is able to handle as3,
those adobe guys are probly already using as4.
But still its a great prog to work with

Quote:
I suspect the AS3 version of mc_tween does have that.
Not shure about that,..
I downloaded the AS3 version some time ago, but back then it only supported blur filter.
Don't know if there have been any updates since then.



               
 
View Public Profile Send a private message to OutCast**NL Visit OutCast**NL's homepage! Find all posts by OutCast**NL Add OutCast**NL to Your Contacts
#8    
 
eggs-in-Wisconsin's Avatar

Name: 
eggs-in-Wisconsin
Status: Offline
Rank: FlawlessDog
Posts: 286
Mood: Horsefeathers
Old 10-20-2008, 12:27 PM Reply With Quote


I know what you mean about the work involved in a project like this.
It can take a bit of time to do what you want to with it.

Example:
I wasn't very happy with the fact that this mc_tween didn't have the dropshadow added, nor the fact that some settings in each of the flash
filters were not able to be set in the trigger script, so I desided to see
what I could do about that.

Attached is my updated mc_tween2 sm2 file and the filter test swi

I've shown 2 different ways to trigger each of the animations.
I am a bit happier with this, as all the filter setting are now in place.

Let me know what you think.


Attached Files
File Type: zip mc_tween_oct_20_SM2.zip (31.1 KB, 101 views)
               
__________________
 
View Public Profile Send a private message to eggs-in-Wisconsin Visit eggs-in-Wisconsin's homepage! Find all posts by eggs-in-Wisconsin Add eggs-in-Wisconsin to Your Contacts
#9    

Name: 
OutCast**NL
Status: Offline
Rank: SWiSHer
Posts: 647
Old 10-20-2008, 05:57 PM Reply With Quote


That's indeed a nice addition


               
 
View Public Profile Send a private message to OutCast**NL Visit OutCast**NL's homepage! Find all posts by OutCast**NL Add OutCast**NL to Your Contacts
#10    
 
eggs-in-Wisconsin's Avatar

Name: 
eggs-in-Wisconsin
Status: Offline
Rank: FlawlessDog
Posts: 286
Mood: Horsefeathers
Old 10-20-2008, 06:04 PM Reply With Quote


thanks

Still having trouble with the color change in the dropshadow.
Funny, 'cause the other filter colors change just fine...
I must be missing something


               
__________________
 
View Public Profile Send a private message to eggs-in-Wisconsin Visit eggs-in-Wisconsin's homepage! Find all posts by eggs-in-Wisconsin Add eggs-in-Wisconsin to Your Contacts
#11    

Name: 
OutCast**NL
Status: Offline
Rank: SWiSHer
Posts: 647
Old 10-20-2008, 09:45 PM Reply With Quote


Yes I see,.... only had a quick peek, but so far the script seems to looks ok.
I do recall there were some issues with the filtercolors in the past,
and the bevelcolor also seem a bit buggy to me, so maybe its related.

Another thing,.. when loading the file into swishmax,
it gives an error that the script is too long.



               
 
View Public Profile Send a private message to OutCast**NL Visit OutCast**NL's homepage! Find all posts by OutCast**NL Add OutCast**NL to Your Contacts
#12    
 
browndrake's Avatar

Name: 
browndrake
Status: Offline
Rank: SWiSHer
Posts: 742
Old 10-20-2008, 10:53 PM Reply With Quote


some of you guys are just amazing!

browndrake


               
 
View Public Profile Send a private message to browndrake Find all posts by browndrake Add browndrake to Your Contacts
#13    
 
kasey's Avatar

Name: 
kasey
Status: Offline
Rank: SWiSHer
Posts: 357
Old 10-21-2008, 05:32 AM Reply With Quote


:bee: OutCast**NL will you be providing an offline version of your Code Generator soon? :bee:


               
 
View Public Profile Send a private message to kasey Find all posts by kasey Add kasey to Your Contacts
#14    
 
eggs-in-Wisconsin's Avatar

Name: 
eggs-in-Wisconsin
Status: Offline
Rank: FlawlessDog
Posts: 286
Mood: Horsefeathers
Old 10-21-2008, 10:57 AM Reply With Quote


Quote:
Originally Posted by OutCast**NL View Post
Another thing,.. when loading the file into swishmax,
it gives an error that the script is too long.

LOL
I had the same thing all thru out the development of the Carmex site, too.
That is just a weekness in the internal player in swishmax.
Ctrl + T works fine tho.

I'll keep playing with it, and see if I can find a solution.
I may try to find a solution in tweenmax or tweenfilterlite.
The only problem is converting those classes to prototypes.


               
__________________
 
View Public Profile Send a private message to eggs-in-Wisconsin Visit eggs-in-Wisconsin's homepage! Find all posts by eggs-in-Wisconsin Add eggs-in-Wisconsin to Your Contacts
#15    
 
eggs-in-Wisconsin's Avatar

Name: 
eggs-in-Wisconsin
Status: Offline
Rank: FlawlessDog
Posts: 286
Mood: Horsefeathers
Old 10-21-2008, 03:05 PM Reply With Quote


Ok, I think I got it.
This is the version I would use, unless I post a new one after this one.
I'll leave these older updates above, just so you can see the progression of this project.

notes:
Quote:
(2008) Oct 19-
FlawlessDog.com updates
Added drop shadow. needs some work yet at this point.

(2008) Oct 20-
Changed the filter setup to bring back full control of all settings
This means each filter will have all settings adjustments
Also means each setting will be longer then the original author had it

(2008) Oct 21-
Fixed color transform for droppshadowFilter
Seems there was a syntax error I missed in the attribute names for
dropshadow filter color and alpha settings.
Also, we should note that color transformations do not like easing
equations that bounce in any way, such as the elastic or back equations.


Attached Files
File Type: zip mc_tween_oct_21_2008_SM2.zip (31.3 KB, 429 views)
File Type: zip mc_tween2_oct_21_2008_fullZip.zip (282.2 KB, 1075 views)
               
__________________

Last edited by eggs-in-Wisconsin; 10-21-2008 at 04:46 PM.. Reason: added full zipfile of examples with updated sm2(as) file
 
View Public Profile Send a private message to eggs-in-Wisconsin Visit eggs-in-Wisconsin's homepage! Find all posts by eggs-in-Wisconsin Add eggs-in-Wisconsin to Your Contacts
#16    

Name: 
OutCast**NL
Status: Offline
Rank: SWiSHer
Posts: 647
Old 10-21-2008, 03:41 PM Reply With Quote


Nice, I'll check it out later

Quote:
That is just a weekness in the internal player in swishmax.
Ctrl + T works fine tho.
Ahh ok,... you already knew that
Did read about it somewhere, but so far I never ran into that problem myself.

Quote:
OutCast**NL will you be providing an offline version of your Code Generator soon?
I don't think it will do you much good, as it was designed for OC_Tween, not MC_Tween.
Both engines use a different syntax to trigger the effect, so the code simply won't work for MC_Tween.



               
 
View Public Profile Send a private message to OutCast**NL Visit OutCast**NL's homepage! Find all posts by OutCast**NL Add OutCast**NL to Your Contacts
#17    
 
eggs-in-Wisconsin's Avatar

Name: 
eggs-in-Wisconsin
Status: Offline
Rank: FlawlessDog
Posts: 286
Mood: Horsefeathers
Old 10-21-2008, 06:05 PM Reply With Quote


For those Macromedia Flash8 people interested in the prototype approach,
here is the Macromedia Flash8 as file and updated filtertest.fla

enjoy, and many thanks to Zeh
for posting my work on his site.
MC Tween's website (on the yellow banner at the top of all pages).
http://hosted.zeh.com.br/mctween/


Attached Files
File Type: zip flash8_filtertest_oct_21_2008.zip (36.1 KB, 474 views)
               
__________________
 
View Public Profile Send a private message to eggs-in-Wisconsin Visit eggs-in-Wisconsin's homepage! Find all posts by eggs-in-Wisconsin Add eggs-in-Wisconsin to Your Contacts
#18   MC Tween for SM2  

Name: 
GaryApsey
Status: Offline
Rank: Registered User
Posts: 1
Old 01-30-2009, 02:08 AM Reply With Quote


HI

:cherry: Yes I see,.... only had a quick peek, but so far the script seems to looks ok.
I do recall there were some issues with the filtercolors in the past,
and the bevelcolor also seem a bit buggy to me, so maybe its related.:wave:



www.staffingpower.com


               
 
View Public Profile Find all posts by GaryApsey Add GaryApsey to Your Contacts
#19    
 
pedromau's Avatar

Name: 
pedromau
Status: Offline
Rank: \m/ [ºº] \m/
Posts: 1,537
Mood: weird?!
Old 01-30-2009, 06:53 AM Reply With Quote


Eggz, do you know if the problem with include is already fixed in the new SM2 version?
I can only make it work with 2008.08.12


               
__________________
pEdRomAU
-------------------------------
http://www.theswishdock.com THE SWISHDOCK - Swishmax files from $1!!!
http://www.statiks.net
http://www.kneeldown.net
 
View Public Profile Send a private message to pedromau Visit pedromau's homepage! Find all posts by pedromau Add pedromau to Your Contacts
#20    
 
HAAKOO's Avatar

Name: 
HAAKOO
Status: Offline
Rank: SWiSHer
Posts: 686
Old 01-30-2009, 07:45 AM Reply With Quote




               
__________________
Design That Moves You
 
View Public Profile Send a private message to HAAKOO Find all posts by HAAKOO Add HAAKOO to Your Contacts
Reply

Advertisement:





Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump