?
Solved

ActionScript Newbie

Posted on 2005-03-30
3
Medium Priority
?
332 Views
Last Modified: 2009-07-29
I am trying to move a movie clip
from:centre of the stage at 20% scale and alpha=0
to: the top of the stage at 100%scale and alpha = 100

simple enough but my actionscript isn't doing what I want.

My question is: How do I stop the clip once it has reached the top of the stage and has reached 100% scale size?

Here is my script:
onClipEvent (load){
      scaleAmt = 20;
      scaleAmt <=100;
      this._alpha = 0
      x = 69; //starting point x
      y = 206;//starting point y
}
onClipEvent (enterFrame){
      scaleAmt ++;
      this._alpha +=20;
      this._x = 69; // x value must not change as clip must move upwards in a straight line
      this._y -= 5;
      this._xscale = scaleAmt;
      this._yscale = scaleAmt;
}
      
0
Comment
Question by:KevPerkins
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
Billystyx earned 1000 total points
ID: 13666543
onClipEvent (enterFrame){
if(scaleAmt<100){  
scaleAmt ++;
this._xscale = scaleAmt;
     this._yscale = scaleAmt;
}
if(this._alpha<100){ this._alpha +=20;}
     this._x = 69; // x value must not change as clip must move upwards in a straight line
if(this._y>0){     this._y -= 5;}
     
}

Billystyx
0
 

Author Comment

by:KevPerkins
ID: 13669088
Thanks. That works.
Played aound last night and actually fixed it but took many more lines of code than this .... so thanks - newbie nightmares I guess.
0
 
LVL 18

Expert Comment

by:Billystyx
ID: 13669108
no worries - glad to help:)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
Suggested Courses
Course of the Month12 days, 19 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question