• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 421
  • Last Modified:

Animate movie scale in actionscript without tween

I want to be able to make the movie scale that is called on a rollover event to be a smooth transition from the small the larger size.

You can see the movie here
http://www.focuswebcreations.com.au/main_int.html
and the fla files are here
http://www.focuswebcreations.com.au/main_int.fla
http://www.focuswebcreations.com.au/menu_v1.fla
0
Demonscout
Asked:
Demonscout
  • 4
  • 3
  • 2
1 Solution
 
Aneesh ChopraCommented:
Hi,

here is the fixed version...
http://download.yousendit.com/E690D1DE4A4ACC0F


following are the details on code I have added:
--------------
1.
add these two lines on top
-------------
import mx.transitions.Tween;
import mx.transitions.easing.*;
--------------

2.
replace the following code inside function "rollOverFace"
-----------
      theScene._xscale = 130;
      theScene._yscale = 130;
-----------
with
-------------
var xPosT:Tween = new Tween(theScene, "_xscale", Strong.easeOut, theScene._xscale, 130, 1, true);
var yPosT:Tween = new Tween(theScene, "_yscale", Strong.easeOut, theScene._xscale, 130, 1, true);
-------------

3.
replace the following code inside function "rollOutFace"
-----------
      theScene._xscale = 100;
      theScene._yscale = 100;
-----------
with
-------------
var xPosT:Tween = new Tween(theScene, "_xscale", Strong.easeOut, 130, 100, 1, true);
var yPosT:Tween = new Tween(theScene, "_yscale", Strong.easeOut, 130, 100, 1, true);
-------------


if you need more details on Tween class, here is the link:

Using the Tween Class
http://www.kirupa.com/developer/actionscript/tween.htm

Rgds
Aneesh
0
 
DemonscoutAuthor Commented:
Aneesh, that is perfect again...

A question for you on a serious note do you do freelance work? As I may need to employ someones services to get this job I am working on done.

Thanks
0
 
Aneesh ChopraCommented:
Sure,
I do freelance 12 months in a year.....
although I also work as a full time Flash specialist,
but still from the last 3 years I am continuously working as home as freelancer.

Rgds
Aneesh
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Ben McNellyCommented:
Ok, heres what I would do.

Select you movie holder ( Mbut ) and press F8 and make a new movie clip.

Now that its nested inside this movie clip, what your going to do is the same as when you make a button out of a movieclip...

Animate like this.. >> http://www.j3one.com/ee/delete.jpg

So on the first keyframe of the tween, have it regular size... middle keyframe enlarged, and then the last keyframe is normal size like the first...

its not pretty actionscript but eh, it worked and looks good :-)

- ben
0
 
DemonscoutAuthor Commented:
Well I think I have got past the tricky stuff that was needed but if I need some more serious full time work on this project, would it bee something you would be interested in. If so we can converse via email on perticulars, but I would like to still work with you on this and not just hand it over as my main aim is to further my flash knowlege.

thanks
0
 
Ben McNellyCommented:
holy cow... I checked my email then finished my post and you guys allready have finished...

late post on my part.. so soory :-)
0
 
Aneesh ChopraCommented:
reply on your following post:
-----------
05/03/2006 07:27PM PDT
-----------

if you want to scale animation as suggested in mentioned post, means onRollOver first it should zoom in and and then move back to the original size.

it also can be done using same actionscript what I provided, just need to change few parameters.

let me know if this is required.


Rgds
Aneesh
0
 
DemonscoutAuthor Commented:
??? Ha Aneesh, are you commenting to me. You have already provided the anwsers which I have used and it works great.

I was just waiting on a response to my proposal to you if you would be interested or not ?

Thanks
0
 
Aneesh ChopraCommented:
sure, we can proceed on it..
you can mail me the details on my email.. (email is in profile)

Rgds
Aneesh
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now