Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Flash




Easing On Resize With Caurina



Hi all,

I'm looking to modify my stage listener to include easing using Caurina.
If anyone could be so kind as to help set me on the right track in modifying this?

I'm having trouble since this it needs to resize proportionally.


Code:
var sListener:Object = new Object();
sListener.onResize = function () {
content_mc.container_mc._width = Math.max(Stage.width, 600);
content_mc.container_mc._yscale = content_mc.container_mc._xscale;
}
Stage.addListener(sListener);
sListener.onResize();
Thanks a bunch in adavnce!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Stage Resize With Easing
here is an example of what i am trying to do... I have been stuck for a while tring to create an ease on a mc when the browser is resized... here is an example...

]http://www.dunwoodie-architectureanddesign.co.uk/main.php
[/url]
[URL=http://www.dunwoodie-architectureanddesign.co.uk/main.php




here is my code... How would i ease/bounce on my mc "main"... maybe using laco's custm tween when the browser is resized?


Stage.align = "LT";
// prevent the Flash movie from resizing when the browser window changes size.
Stage.scaleMode = "noScale";


// create a listener object
stageListener = new Object();
// add a methods for it to do certain things when the Stage is resized by our user
stageListener.onResize = function() {

expandTop();
expandBodyText();
}

Stage.addListener(stageListener);

expandTop = function() {


// expand the top banner/header/masthead - whatever you want to call it - to be as wide as the stage

bottom._y = Stage.height - bottom._height - 0;



main._y = Stage.height/2;
main._x = Stage.width/2;



};



stageListener.onResize();

Resize MC With Easing From Center
Hi

I have been creating an XML gallery now got to showing the big images part. I want to create a resizing background (like at http://www.bearfootfilms.com/). I can create the effect but it always resizes from the top left not center.

Any one got any ideas?

I'm using the code:

var VTween = new Tween(picbg, "_width", Strong.easeInOut, 100, currentImage.largepicholder._width+20, 1, true);
var HTween = new Tween(picbg, "_height", Strong.easeInOut, 100, currentImage.largepicholder._height+20, 1, true);

Easing On Resize Problem.
Hello all.

I've searched the forums and found a lot of great threads but i can't make it work.
So please do not redirect me to any threads, just help me if you can.
I've got a full screen flash page and when i resize the page i want my mc's to go
where they are suppose to with easing added.

My site works fine, i just want the different mc's to go in place with easing.
this is the code i use.




ActionScript Code:
Stage.align = "LT";
Stage.scaleMode = "noScale";
 
stageListener = new Object();
stageListener.onResize = function ()
 
{
    mainbar._x = Stage.width / 2 - mainbar._width / 2;
    mainbar._y = Stage.height / 2 - mainbar._height / 2;
   
    left1._x = Stage.width / 2.03 - left1._width / 2;
    left1._y = Stage.height / 2 - left1._height / 2;
 
}

mainbar and left1 are mc's.

Thanx for your time everyone.

Easing Of Mcs On Browser Window Resize
i.m attempting to move the contents of full browser flash with easing on resize

the problem i.m having is establishing a relationship between the stage.width /height with mc, in such a way that mc moves with easing from its natural position - NOT THE CENTER

how would i work this - so any mc i place on stage will move with easing to its next position in relation to browser window resize

can someone provide a working example?

dash._x = Stage.width ;
dash._y = Stage.height ;



var obj:Object = new Object();
obj.onResize = function() {

new mx.transitions.Tween(dash, "_x", mx.transitions.easing.Regular.easeOut, ,(Stage.width), 1, true);
new mx.transitions.Tween(dash, "_y", mx.transitions.easing.Regular.easeOut, ,(Stage.height), 1, true);
}
Stage.addListener(obj);

Mc Resize Via Text Input With Easing
Okies,
Thanks before to tha legends who helped me with an easy problem.

I have a movieclip (flooring) that resizes via text input. Now i want to add easing to that.

I have posted a fla with both easing and text input examples...

any takers??

Thanks....

Easing Of Mcs On Browser Window Resize
i.m attempting to move the contents of full browser flash with easing on resize

the problem i.m having is establishing a relationship between the stage.width /height with mc, in such a way that mc moves with easing from its natural position - NOT THE CENTER

how would i work this - so any mc i place on stage will move with easing to its next position in relation to browser window resize

can someone provide a working example?

dash._x = Stage.width ;
dash._y = Stage.height ;



var obj:Object = new Object();
obj.onResize = function() {

new mx.transitions.Tween(dash, "_x", mx.transitions.easing.Regular.easeOut, ,(Stage.width), 1, true);
new mx.transitions.Tween(dash, "_y", mx.transitions.easing.Regular.easeOut, ,(Stage.height), 1, true);
}
Stage.addListener(obj);

Easing A Resize (Lexicon Helped Me With The Start Up, And Maybe He Can Help Again)
Hi again.

I'm almost finished with my picture-gallery.

But I've been thinking if it somehow is possible to make the resize a little slower - I do believe that it has something to do with an easing,
but I'm not able to figure out, how to include it in the actionscript.

You can see the site here.

And maybe you there can se, what I mean when I say that the resize is a little bit quick.

The actionscript is the following:

Code:
if (!hasrun){
hasrun=true;
bg._width=bg._height=0;
}
// define the function that will resize the movieclip
function sizeTo(endW, endH){
// create the on enterFrame action to resize the movie
picture._alpha=0;
bg.onEnterFrame = function(){
with(this){
// calculate the difference
movew = (endW - _width)/2;
moveh = (endH - _height)/2;
// round movew and moveh (making sure they are no less than 1 in unit size)
movew = (movew>0&&movew<1) ? 1 : (movew<0&&movew>-1) ? -1 : Math.round(movew);
moveh = (moveh>0&&moveh<1) ? 1 : (moveh<0&&moveh>-1) ? -1 : Math.round(moveh);
// resize the mc
_width += movew;
_height += moveh;
// move the gallery-buttons
_parent.gallery_btns._x = _x + (_width/2) + 16 - _parent.gallery_btns._width - 4;
_parent.gallery_btns._y = _y - (_height/2) + 6;
//move the main-buttons
_parent.main_btns._x = _x + (_width/2) + 23 - _parent.main_btns._width - 4;
_parent.main_btns._y = _y + (_height/2) + 18 - _parent.main_btns._height - 4;
//move the logo
_parent.logo._x = _x - (_width/2) - 12;
_parent.logo._y = _y - (_height/2);

// if the mc has finished sizing delete the onEnterFrame action
// and move the black movieclip into poostion then run the function to show it
if (_height==endH && _width==endW) {
_parent.picture._width = endW-98;
_parent.picture._height = endH-15;
_parent.picture._x = _x-42,5;
_parent.picture._y = _y;
_parent.doFadeIn(_parent.picture);
delete onEnterFrame;
}
}
}
function doFadeIn(mc){
mc.onEnterFrame = function(){
if(this._alpha<100){
this._alpha+=10;
} else {
delete this.onEnterFrame;
}
}
}

// call the sizeTo function on the bg movieClip to resize it.
sizeTo(693,376);
stop();


I hope that someone (maybe Lexicon, who was so kind to help me the last time, I was lost)

Thanks in advance

[F8] Easing A Screen Resize And Darkening Corners
i am fairly new to action script and am so intrigued by its possibilities.

i have noticed on some sites that they have an easing animation when the screen is resized, this is so cool!!! an example is peterdemulder.com

i am not sure where to start with this if someone could give a starting block...i think like an elastic tween with a strong ease out would look amazing.

i have also noticed that some sites feature a darkening of the corners of the screen or like a photographic vignette effect that also moves when the screen is resized, i have no clue where to begin with this one if some action script ninja out there has any pointers or files to get me started on...

thanks everybody.

How Do You Add Easing Effects To ReSize Event Listeners?
To clarify, I am looking for an effect similar to:

www.pixeltheory.com

As you can see it is a full browser flash site, but when you resize, it has a bounce ease effect. Anyone know how this could be executed?

Thanks everyone
V

Easing Tween On Resize Of Browser Window
Last edited by Codemonkey : 2006-08-12 at 12:11.
























i.m attempting to reposition contents of swf on resize of browser window with tween class


ActionScript Code:
Stage.align = "TL";
Stage.scaleMode = "noScale";
stageListener = new Object();
stageListener.onResize = function() {
moveIt();
};
Stage.addListener(stageListener);
moveIt = function () {
dash.onEnterFrame = function() {
this._x += ((Stage.width/2)-this._x)/5;
this._y += ((Stage.height/2)-this._y)/5;
};
};

examples -
http://www.jeedub.com/2004
http://www.gskinner.com/site2_5/

Flash Contents Easing X/y On Browser Resize
i have seen this done a few times here and there but i have never seen any code or a tutorial on it

here is an example

www.rigsbydesign.com

just resize the browser and you will see what i am talking about

if anyone could point me in the right direction i would appreciate it

Easing A Movie Clip To The Center Of The Stage On Resize
hey guys!

Im trying to get a movie clip to ease to the center of the stage on window resize:

onClipEvent(load)
{
targetX = Stage.width / 2;
targetY = Stage.height / 2;
}

onClipEvent(enterFrame)
{
targetX = Stage.width / 2;
targetY = Stage.height / 2;
speed = 5;
this._x = this._x + (this.targetX - this._x) / speed;
this._y = this._y + (this.targetY - this._y) / speed;

For some reason it doesnt center properly???

any ideas?


}

Easing Movements On Resize With Full Browser Flash
Im having problems creating easing movemrnts on resize with a full browser flash web page. A great example of this is http://www.dopeawards.com/ but for some reason them only have the easing for the _y value. This is the code I am using. "cover" is the movie clip on stage that i want to have easing properties. but for some reason when I resize the movement is jittery and choppy but it is easing. What will make it a smooth movement?

cover._x = Stage.width / 2;
cover._y = Stage.height / 2;

var coverx = cover._x
var covery = cover._y


var stageL:Object = new Object();
stageL.onResize = function() {

new mx.transitions.Tween(cover, "_x", mx.transitions.easing.Regular.easeOut, coverx,(Stage.width / 2), 1, true);

new mx.transitions.Tween(cover, "_y", mx.transitions.easing.Regular.easeOut, coverx,
(Stage.height / 2), 1, true);

}

Stage.addListener(stageL);



Please Help!!

Easing Movements On Resize For Full Browser Flash
Im having problems creating easing movemrnts on resize with a full browser flash web page. A great example of this is http://www.dopeawards.com/ but for some reason them only have the easing for the _y value. This is the code I am using. "cover" is the movie clip on stage that i want to have easing properties. but for some reason when I resize the movement is jittery and choppy but it is easing. What will make it a smooth movement?


cover._x = Stage.width / 2;
cover._y = Stage.height / 2;

var coverx = cover._x
var covery = cover._y

var stageL:Object = new Object();
stageL.onResize = function() {

new mx.transitions.Tween(cover, "_x", mx.transitions.easing.Regular.easeOut, coverx,(Stage.width / 2), 1, true);

new mx.transitions.Tween(cover, "_y", mx.transitions.easing.Regular.easeOut, coverx,(Stage.height / 2), 1, true);
}

Stage.addListener(stageL);



Please Help!!

Caurina Code
Ive downloaded the caurina code off google so I can try a tutorial out. The tutorial seems fairly easy, but when I try and test the movie an error pops up and the output panel says "1120: Access of undefined property Tweener.
How can this be if my file structure has the FLA and the caurina code within the same folder?

Calling Caurina: How Often?
As I continue to build fla's using as3... I realize that I am calling importing caurina script on a great number of mc animations.

Is this normal or is there a way to have a global call somehow?

Thanks

Caurina Tweener
How do i use caurina to move an object 50px up. something like


ActionScript Code:
Tweener.addTween(e.currentTarget, {y:+50});

How To Write This With Caurina
For some reason my fl.transition.Tween is very choppy and some times it stops before moving to its final destination. I look through the forums and found that people are using third party tween so I am trying to use Caurina which is free.

Now with fl tweener I can easily write this


ActionScript Code:
var tweenVar:Tween = new Tween(mc, Strong.easeInOut,startX, endX,speed, true )

But in Caurina I don't know how to set the startX. Its very important for me to set because my start point is my current postion of mc and I want to write something like

ActionScript Code:
Tweener.addTween(mc,{x:mc.x+100,x:mc.x, time:2,transition:"linear"});

Here I starting my animation from where ever the movie is +100 and stop at where the movie is.

Any idea

Thanks

How To Set Up Caurina Tweener.Plz Help Me
Hi!

I am trying to use caurina tweener in my project but I don't know what to do. I know I have to go to preferences in flash and set some paths so flash can see the caurina library but I dont know how e which path I must put there.

Can You guys help me?

Caurina + Filters
Hey all,
How would I use Caurina Tweener to tween a glow filter on a movieclip?
- TK

PS: I understand how to do the following
Code:

import caurina.tweener.transitions.*
Tweener.addTween(etc);
so I'm not a complete n00b with it.

Caurina Tween On Loaded SWF
Hi all,

I'm using the caurina class and importing on the main timeline of my movie.
I've now tried to tween a MC within a dynamically loaded SWF with no luck.
I've tried importing the class again within the loaded SWF, still no luck.

What am i missing?

thanks a bunch

Tweener(caurina) Vs TweenMaxLite
Hi

Lately i have beeen watching a lot of turtorials and some use Tweener and some TweenMax as tweening engine. I would like to get some input from comunity. Witch one do you think is better, witch one do you use ( if there is another even better do not be shy... ) and why do you think so.

Luka

Importing Caurina... For Nested Mc?
I was wondering if someone could give me clue.

I am building my short flash as3 tweener driven movie.

I have some mcs that have their own animation and they are placed on the stage.

I am finding that flash is requiring me to continually put:


Code:
import caurina.transitions.*
into the beginning of every nested mc timeline.

Am I doing everything right? Seems like this shouldnt be necessary since it is imported on the main timeline already..

Thoughts... help?

Interations In Tweener (caurina)
Hello,
I've created a sort of rotating carousel using Tweener to move the objects. It's works fine using "previous" and "next" buttons to move one object at a time through the loop. However, I also have a row of thumbnails to allow the user to click on, say, item 10, when the current item in the foreground is, for example, item 3, and in that case, it runs a script with a for-loop that iterates the correct number of times to rotate through the carousel to get to that item. It's all working fine, except the loop runs faster than the Tweens can draw up, causing some objects to skip some tweening effects and take short cuts across the screen. Does anyone have any suggestions for getting Tweener to wait for one iteration of the for-loop to finish executing before going on to the next iteration? Thank you in advance!

Caurina Tweener OnComplete Help?
I have been adding simple transitions to a site Im making. They simply scroll up from the bottom on loading. One file uses a scroller I found a link to here on kirupa.com(from some rock band site).

Heres the tweens, non working onComplete and scroller script.


Code:
import caurina.transitions.Tweener
content_mc._alpha = 0;
content_mc._y = 475;
setY = function(mc, newY) { mc._y = newY; }
Tweener.addTween(content_mc, {_y:15, time:2, transition:"easeOut", rounded:true});
Tweener.addTween(content_mc, {_alpha:100, time:1, transition:"linear"});
Tweener.addTween(content_mc, {_blur_blurY:50});
Tweener.addTween(content_mc, {_blur_blurY:0, time:2, onComplete:setY, onCompleteParams:[content_mc, 15]});

fscommand("allowscale", "false");
bar.useHandCursor = dragger.useHandCursor=false;
space = 20;
friction = 0.9;
speed = 4;
y = dragger._y;
top = content_mc._y;
bottom = content_mc._y+mask_mc._height-content_mc._height-space;
dragger.onPress = function() {
drag = true;
this.startDrag(false, this._x, this._parent.y, this._x, this._parent.y+this._parent.bar._height-this._height);
dragger.scrollEase();
};
dragger.onMouseUp = function() {
this.stopDrag();
drag = false;
};
bar.onPress = function() {
drag = true;
if (this._parent._ymouse>this._y+this._height-this._parent.dragger._height) {
this._parent.dragger._y = this._parent._ymouse;
this._parent.dragger._y = this._y+this._height-this._parent.dragger._height;
} else {
this._parent.dragger._y = this._parent._ymouse;
}
dragger.scrollEase();
};
bar.onMouseUp = function() {
drag = false;
};
moveDragger = function (d) {
if ((dragger._y>=y+bar._height-dragger._height && d == 1) || (dragger._y<=y && d == -1)) {
clearInterval(myInterval);
} else {
dragger._y += d;
dragger.scrollEase();
updateAfterEvent();
}
};
up_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, -1);
};
down_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, 1);
};
up_btn.onMouseUp = down_btn.onMouseUp=function () {
clearInterval(myInterval);
};
MovieClip.prototype.scrollEase = function() {
this.onEnterFrame = function() {
if (Math.abs(dy) == 0 && drag == false) {
delete this.onEnterFrame;
}
r = (this._y-y)/(bar._height-this._height);
dy = Math.round((((top-(top-bottom)*r)-content_mc._y)/speed)*friction);
content_mc._y += dy;
};
};
Everything works fine except the onComplete which I simply want to set the _y pos of the mc to 15 after the transitions are complete so that the scroller script doesnt think the mc is at a _y position of 475.

I think I have the syntax for the onComplete and my setY function added correctly. Can anyone see the problem with this? Or another way to acheive what Im looking for?

TIA

Caurina Tween Prob
Hi everyone,

I am using the caurina Tweener class and in onEnterFrame i tween a movie clip. the prob is when i use transition "linear" it is fine but as soon as i use "easeInOutQuad" it jump and is pretty slow (at time:0.5). Is it because it is onEnterFrame or maybe my file get too much in onEnterFrame already???

Please can anybody guide me in that problem

Thanks in advance.

Jerome

Problem With Caurina.transition
Hi guys hope that im the right place and you can help me.
im trying to use the caurina.transitions.Tweener.addTween.
my folder looks like this
www.~~~~~#.com main folder :main fla with swf's to be loaded
:all #.as files
:folder caurina/-/transitions
:com folder
So i think i have my folder organised correctly, however when i got to run my main fla it comes up with errors here is one off them

ImageGallery.as, line27 There is no class or package with the name 'caurina.transitions.Tweener' found in package 'caurina.transitions'.
caurina.transitions.Tweener.addTween(overlay, {_alpha: 70, time: 1});

And it looks like everywhere there is caurina in all my .as files there is this error message.
i appologise if this is a dumb question.
any help would be greatly appreciated.
Many Thanks

Papervision And Caurina Question
I am still a novice with AS 3, and have been experimenting with papervision great white. I have been applying tween animations to a simple plane, but for some reason the transitions are not working. Actually it seems to be slowing the animation down as well. Has anyone else experienced this? Can someone shed some light on this? Thanks!

Importing Caurina... For Nested Mc?
I was wondering if someone could give me another clue.

I am building my short flash as3 tweener driven movie.

I have some mcs that have their own animation and they are placed on the stage.

I am finding that flash is requiring me to continually put:
Code:

import caurina.transitions.*
into the beginning of every nested mc timeline.

Am I doing everything right? Seems like this shouldnt be necessary since it is imported on the main timeline already..

Thoughts... help?

SCROLLBAR : Caurina.transitions
I just followed the scrollbar tutorial here, but when i tested it, it said that definition caurina.transitions could not been found (what is that caurina anyways ? ).
and it also says that my property Tweener in following code is undifined :
Tweener.addTween(content, {y:(-sp*(content.height-masker.height)),

i followed the video tutorial step by step, but still those errors =(
i've been looking for hours for a good tutorial, so please help me

thnx

Where Do I Put My Caurina Tween Package?
Hi there,

This is my first post on the forum.
I've been trying to complete the "Advanced Morphing Button Tutorial" using After Effects and Flash.
I have a very limited knowledge of as2, and I've already heard all the problems with as3.

I looked back on the using the "Tween" tutorial to see if I installed the "caurina" package correctly.
I'm trying to understand what my errors mean...

I typed the as from the morphing tutorial as it was, and named my movieclips correctly....
I think the problem is where I put the caurina package... I don't know if I'm calling it properly in my as....

(I'm on a mac)
HD> Applications>Adobe Flash CS3>First Run> Classes>mx>transitions>caurina
Is this the right place to put my caurina pkg?

And I keep getting these errors when I test my fla-
Code:

**Error** Scene 1, Layer 'actions', Frame 1, Line 1: 1172: Definition caurina.transitions could not be found.
     import caurina.transitions.*;

**Error** Scene 1, Layer 'actions', Frame 1, Line 1: 1172: Definition caurina.transitions could not be found.
     import caurina.transitions.*;

**Error** Scene 1, Layer 'actions', Frame 1, Line 7: 1120: Access of undefined property Tweener.
     Tweener.addTween(ldsbtn1, {_frame:20, time:0.2, transition:"linear"

**Error** Scene 1, Layer 'actions', Frame 1, Line 15: 1120: Access of undefined property Tweener.
     Tweener.addTween(ldsbtn1, {_frame:0, time:0.2, transition:"linear"

Total ActionScript Errors: 4,  Reported Errors: 4

The AS, just as I followed in the tutorial
Code:

import caurina.transitions.*;

butt1.addEventListener (MouseEvent.ROLL_OVER , butt1_ROLLOVER);

function butt1_ROLLOVER (e:MouseEvent):void
{
   Tweener.addTween(ldsbtn1, {_frame:20, time:0.2, transition:"linear"
                });
   }

butt1.addEventListener (MouseEvent.ROLL_OUT , butt1_ROLLOUT);

function butt1_ROLLOUT (e:MouseEvent):void
{
   Tweener.addTween(ldsbtn1, {_frame:0, time:0.2, transition:"linear"
                });
   }
   

Thanks

Caurina Tweener - Trying To Stop It Tweening
Hi,

I have a timer, that calculates 2 seconds and after each 2 seconds it tweens my movie clip using caurina,

what I am trying to do is to stop it tweening,

what I am trying to do is something like this:

Code:
myMC.addEventListener(MouseEvent.MOUSE_DOWN, function() {
countTime.stop();

movieclip._enabled = false; (so that it will stop being moved by caurina)
I know the above line is wrong in actionscript 3


could anyone help me?

How To Convert This Tween To Use Caurina Class?
I can see that the caurina tween is whole lot smoother than the Flash's builtin Tween class, so I thought that I'd give it a try, but I got stuck... and not able to find a good way to convert this to use caurina class... It seems like there isn't a good way to add an event to the tween in caurina... The only usable one I can find is onComplete... Am I correct???

Thanks...

ActionScript Code:
//
var _Tween:Tween = new Tween(txt, "x", None.easeNone, _right, _left - txt.width, _speed, true);
_Tween.looping = true;
_Tween.addEventListener(TweenEvent.MOTION_START, onMotionStart, false, 0, true);
_Tween.addEventListener(TweenEvent.MOTION_STOP, onMotionStop, false, 0, true);
_Tween.addEventListener(TweenEvent.MOTION_RESUME, onMotionResume, false, 0, true);

Caurina TWEENER Transitions Errors
Ok everyone and there mom says this class is so great but I'm pulling my hair out just to get it to import right. Maybe its not great and everyone else is on crack, or I'm missing something.

I imported caurina to my nav class which is imported to my main AS file.

I put this in:


Code:
import com.caurina.transitions.*;
as that is where i have the file located and I have my flash AS 3.0 set to look in that main folder for classes.

I then put this in:


Code:
private function moveBtn1():void {
Tweener.addTween(btn1_mc, {_alpha:100, time:1});
}
The result are these errors:


Code:
1046: Type was not found or was not a compile-time constant: TweenListObj.

1180: Call to a possibly undefined method PropertyInfoObj.

1180: Call to a possibly undefined method TweenListObj.

and BUNCHES more, its so gay, what do I do???

HELP!!

Drop DownFlyout Menu - Caurina
Hi all,

Been trying to wrap my head around this.
What im trying to achieve is a menu that can flyoutdropdown onRollOver using the Caurina Tween Class.

I have gotten it to the point where my menu animates onRollOver and displays the single sub-button i've placed within it, but as soon as i RollOver the sub button the menu flyout closes. :confused:

I've tried placing the button within the flyout bg itself but then i cannot click on any of the buttons.

I've included the source for you to look at.

Many thanks for the help in advance!

Scaling Movie Clip With Caurina
this is regarding the scaling of the movie clip,

i just found out that you can scale the movie clip with caurina transitions class in as2

how could you perform this action in action script3?

Caurina Tweener - Trying To Stop It Tweening
Hi,

I have a timer, that calculates 2 seconds and after each 2 seconds it tweens my movie clip using caurina,

what I am trying to do is to stop it tweening,

what I am trying to do is something like this:

Quote:




myMC.addEventListener(MouseEvent.MOUSE_DOWN, function() {
countTime.stop();

movieclip._enabled = false; (so that it will stop being moved by caurina)





I know the above line is wrong in actionscript 3


could anyone help me?

Caurina Tweener - Trying To Stop It Tweening
Hi,

I have a timer, that calculates 2 seconds and after each 2 seconds it tweens my movie clip using caurina,

what I am trying to do is to stop it tweening,

what I am trying to do is something like this:

Code:
myMC.addEventListener(MouseEvent.MOUSE_DOWN, function() {
countTime.stop();

movieclip._enabled = false;
(so that it will stop being moved by caurina)

I know the above line is wrong in actionscript 3


could anyone help me?

Caurina Tweener Error With RotationY :S
Hy everybody !!

I'm realy stress because I used the 3dflip tutorial posted by Lee and and I also use the preloader tutorial and they work very well separately but my problem is when I use the preloader to load another swf ( named Container) and I load the 3dflip on the Container I open the preloader and it works very well the only problem with all this is the spin button when I click on it Flash give me the next Error:

=============ERROR======================

## [Tweener] Error: The property 'rotationY' doesn't seem to be a normal object property of [object MovieClip] or a registered special property.


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

And I would like to know if someone can help me with this, give me a solution or just explain me why it return me that please help me to resolve this

I hope you could understand my problem I give you also the code I used in my 3dflip I put the same name used by lee to make you easy the problem

Code:

import caurina.transitions.*;

con.vid.spin.addEventListener(MouseEvent.CLICK, cl);
con.tclip.spin.addEventListener(MouseEvent.CLICK, cl);
   
var isTurning:Boolean=false;
   
function cl(e:Event):void
{
   if(!isTurning)
   {
      Tweener.addTween(con, {rotationY:con.rotationY+180,
                         time:1, onComplete:function(){isTurning=false;}});
      isTurning=true;
   }
}
   addEventListener(Event.ENTER_FRAME,loop);
function loop(e:Event):void
{
   if(con.rotationY >90 && con.rotationY < 270)
      con.addChild(con.tclip);
   else
      con.addChild(con.vid);
   if(con.rotationY>=360) con.rotationY =0;
}

Thnx for All

Morpheus.

Caurina Tweening Class - Control Speed Problem
Hi,

I am trying to use the caurina tweening class that can be found here: http://code.google.com/p/tweener/

My problem is that I am not able to control the speed of this tween, because by default the motion starts fast and it stops slowly, like easing in type of a motion,

There is a special file that is included called TransitionCheatSheets and it includes various types of commands to control the easing speed, but i don't understand where to insert these commands,

I am not expert in ActionScript,

I would really appreciate if anyone could advice me on the right direction

Caurina Tweening Class - Control Speed Problem
Last edited by biztaty : 2008-08-05 at 15:21.
























Hi,

I am trying to use the caurina tweening class that can be found here: http://code.google.com/p/tweener/

My problem is that I am not able to control the speed of this tween, because by default the motion starts fast and it stops slowly, like easing in type of a motion,

There is a special file that is included called TransitionCheatSheets and it includes various types of commands to control the easing speed, but i don't understand where to insert these commands,

I am not expert in ActionScript but here is my code:

Code:
import caurina.transitions.*;

Tweener.addTween(air, {time:3,
rotation:30});
i got it from gotoandlearn video tutorial,

what im trying to achieve is a 'straight normal motion' instead of easing in or easing out, for example my cube would rotate in 30 degrees and stop but without easing in or easing out,

I would really appreciate if anyone could advice me on the right direction


also, how do I use onEnterFrame event in AS3?

Caurina Tweeners, Drag&Drop And A Lazy Spline
after gotoandlearn helped me with some drag and drop issues .... there is still one more thing: that lazy spline.
you can drag and drop the dot, wich is connected to a spline. the dot is returning back to its initial position with
the help of the external tweeners, but the spline is moving with a delay, so that the end is to matching to the position of the dot.
the framerate is set to 30fps, wich should be okey. I think the function output should be executed first .... but how can i do that???

http://www.8apr.eu/tw/TweenItBack03.html

Code:

import caurina.transitions.*;

derHIT_mc.addEventListener(Event.ENTER_FRAME, output );   

function output (event:Event):void{
graphics.clear();
graphics.lineStyle(2, 0x000000);
graphics.moveTo( 0, 300);
graphics.curveTo(200, 300, derHIT_mc.x , derHIT_mc.y);
}
   


derHIT_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
derHIT_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);


function pickUp(event:MouseEvent):void {
   if (Tweener.isTweening(event.target))
   {
      Tweener.removeTweens(event.target, {x:400, y:200, time: 4, transition:"easeOutElastic" });
   }
   event.target.startDrag(true);
}

function dropIt(event:MouseEvent):void {
   event.target.stopDrag();
   Tweener.addTween( derHIT_mc, {x:200, y:200, time: 4,
   transition:"easeOutElastic" });
}

derHIT_mc.buttonMode = true;

Question About Tweener Class From "caurina.transitions.*" Package
For those who are familiar with this package and more specifically the Tweener class within this package, is there a way to add arguments to the "onComplete" function you attach to a tween? e.g.


Code:
Tweener.addTween(some_mc, { x:500, time:1, onComplete: someFunction });

public function someFunction():void {
//some code
}
the above is valid, BUT...is there a way to do this:


Code:
Tweener.addTween(some_mc, { x:500, time:1, onComplete: someFunction(arg1:String, arg2:String) });

public function someFunction(argument1:String, argument2:String):void {
//some code
}
?????????????????????????
if this class doesn't support this, does anyone know of a package or class that does support argument passing after a tween is complete?
thx in advance

Resize Flash Movie, Make HTML Page Also Resize?
Hi All Flashkitters

I'm trying to do something that I believe is probably pretty simple and I'm guessing it involves some Javascript along with the Actionscript.

It's like on Fantasy Interactive's website, when you click on different sections of the site, the Flash container movie resizes, and makes the HTML page also resize vertically, to be able to scroll the content. Does anyone know how to acheive this? Its a handy function, I'd love to master it. It opens a big door for building flash sites that can hold real content.

So, anyone can point me in the right direction, I am greatful to.

Dynamic Resize Issue: Resize From Corner, Not Center
Okay. So I just got this little slide show I'm doing to load the next image (i'm still working on making it loop, so if anyone wants to help me with that, too feel free!)

As each new picture is loaded in the slideshow, I have a border that automatically resizes to fit it. Right now it's resizing from the center, is there any way to make it expand out from the top right corner instead of the center (since the orientation of the pictures are different, it looks a bit unnatural for what I'm doing)

Here is the code for my actions layer and if anyone can take a look and tell me what I need to change/add to make this work, I appreciate it!!


Code:
#include "mc_tween2.as"
space = 10;
photo_mc._alpha = 0;
MovieClip.prototype.loadPhoto = function(photo){
photo_mc._alpha = 0;
this.loadMovie(photo);
_level0.onEnterFrame = function(){
// modified the total and loaded so as to round it up
// to smaller number.
var total = Math.round(photo_mc.getBytesTotal()/1024);
var loaded = Math.round(photo_mc.getBytesLoaded()/1024);
if (total != 0 && loaded>=total){
var w = photo_mc._width + space;
var h = photo_mc._height + space;
border.resize(w, h);
delete this.onEnterFrame;
}
}
};
MovieClip.prototype.resize = function(w, h){
//the higher the slower the resize of the border
var speed = 6;
this.onEnterFrame = function(){
this._width += (w - this._width)/speed;
this._height += (h - this._height)/speed;
if( Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1){
this._width = w;
this._height = h;
photo_mc._x = this._x - this._width/2 + space/2;
photo_mc._y = this._y - this._height/2 + space/2;
photo_mc.alphaTo (100, 0.5, "linear")
delete this.onEnterFrame;
}
}
};
image_mc.onLoad = setInterval( nextImage, 7*1000 )
;
-SD

SWF Resize On Browser Resize Causes Nav Buttons To No Longer Work.
Hello. I have a full browser width/height resizing swf. I can't figure out why, but the navigation rollover states no longer work after resizing the browser. My rollovers are handled by a button class linked to each nav button movie clip within the library. Other things of note. I am using the 3 frame AS3 preloading technique which holds all my assets in its own movie clip on frame 3.

My document class only really handles preloading. And a class for all my assets, acting as the "real" doc class is linked to that MC on frame 3.

Here is the URL to the problem:

http://spiritservices.mindgrabmedia.com/stmary/

Thanks in advance.

On Stage Resize, Resize Multiple Copies Of An Object Help
Hey everyone, I'm having some troubles figuring out the code for this. I have 12 button objects that are being created evenly across the stage, and I would like to have them resize on a stage resize event.

Here is my code so far:


Code:

//--------------------------------------
// CONSTRUCTOR
//--------------------------------------
public function BasicFullScreen(){

initVideo();
createButtons();
stage.addEventListener(Event.RESIZE, resizeHandler);

}


//Create Buttons
private function createButtons():void{

for(i==0;i<12;i++){
//trace(i);
button = new MovieClip();
button.graphics.beginFill(000000);
button.graphics.drawRect(0,0,(stage.stageWidth/30),(stage.stageHeight));
button.graphics.endFill();
button.x = (stage.stageWidth/12)*i+(stage.stageWidth/40);
button.y = 0;
button.alpha = .5;
addChild(button);

}

}

private function resizeHandler(event:Event):void {
//What to put in here?
}
I'm not sure what to put in the resizeHandler function to resize all the button objects.

Thanks for any help,

Matt

Resize Bg On Browser Resize While Maintaining Image Proporti
im using the following code to resize background images on browser resize:

Code:

var listener:Object = new Object()

bg_mc.width = Stage.width;
bg_mc.height = Stage.height;

listener.onResize = function(){

bg_mc.width = Stage.width;
bg_mc.height = Stage.height;

}
Stage.addListener(listener);


the problem i'm having is that my background image does not maintain proportion on resize. so, when i resize my browser to a width of 100px, the entire width of my background image is compressed into the 100px area.

is there some additional code i can add to the snippet above to maintain the proportions of my background image on resize?

thanks,
brandon

Frame Based Easing, Into Time Based Easing (in Actionscript)
i have code to move something from placeA-placeB based on time...then i also have a code to move something from placeA-placeB with easing, but its based on frames...can someone supply me with an easing formula based on time?

Copyright © 2005-08 www.BigResource.com, All rights reserved