Questions using "lmc_tween_as1.as"

I am trying to use prototype from:

http://laco.wz.cz/tween/?page=examples

I am basing my Movie off of the example titled : “changing window witdh, height and tint without disortion”

I am trying to change my MC using this AS:


#include "lmc_tween.as"
$tweenManager.broadcastEvents = true;
window_mc.resizeTo(600,375, 1, "easeoutelastic")

My mc does nothing…

any ideas?

Case

As you have it written :"#include “lmc_tween.as”, you need to publish it as ACTIONSCRIPT 2.0.
Use the “lmc_tween_as1.as” to publish as ACTIONSCRIPT 1.0.

Check this under your publish settings.

Thats my guess

Findal

I have it set for actionscript 2.0 on publish, unfortunately that is not the problem, but thanks for looking and posting :king:

Case

The code from that example does work when published in FLASH MX 2004 and using ACTIONSCRIPT 2.0
I changed the version of the tween as to reflect the 2.0 code
"
// include engine and turn on broadcasting
#include “lmc_tween.as” // changed this
$tweenManager.broadcastEvents = true;
// resize to random size on every mouse press
btn1.onPress = function(){
window_mc.resizeTo(100 + random(400), 100 + random(300), 1, “easeoutelastic”)
}
btn2.onPress = function(){
window_mc.tintTo(random(0xFFFFFF),1)
}
"

The only thing to remember is to install either the .mxp, so you don’t need the actual “lmc_tween.as” in the directory you save the .fla too. Otherwise make sure the “lmc_tween.as” is in the same folder as the .fla you make.

Hope that helps, as these are really usefully once you get the hang of it.

Findal
www.fndzinz.com

PS edit
You line “window_mc.resizeTo(600,375, 1, “easeoutelastic”)” works fine too :slight_smile:

I got it now.
The ‘resizeTo’ is a custom method upon another movieclip, which actually is made up of 9 movieClips. This allows the resizing.
So, unless you are using and altering the example .fla, you are missing a bunch of code and clips for that example and need to get that ‘resizeTo’ command to work. It isn’t actually a part of the tween class “lmc_tween.as” you are using.
For that, check the help page and you can use a combination . ie movieClip.tween([width,height]…or [xScale,yScale]…

You can’t use that example code on your own ‘movieClip’ and have it work, but you could use the example base and create a suitable movieClip for your movie and use that as the resizing window. Load another movie with your content into or on top and away you go.

Neat to see how it handles resizing content rather than just a plain flat color. If it does.

Findal
www.fndzinz.com

Thanks, alot
I’m going to look into that…

I believe you hit the nail on the head :p:

I appreciate the time spent…

Case

Now I’m trying to make a stroke on the organic window…and I don’t know how.

I tried using a

document.setStroke but that seems to do nothing…

I’m going to keep trying, but if anyone knows an easier way, I would love it.

Casey

I found that



drawing.lineStyle


works well.

Case