Solved

Zoom into a movie

Posted on 2003-10-29
1
260 Views
Last Modified: 2006-11-17
Hi there,

I am currently trying to create a function that zooms into a movie clip when you click on it. The movie clip is entitled 'container'. I am having a real headache trying to come up with the code to do this, although I do have an idea of how to do it. I'm offering all the points that I have to solve this one, or at least put me on track. Any help is much appreciated.
0
Comment
Question by:andylaw78
1 Comment
 
LVL 27

Accepted Solution

by:
negatyve earned 135 total points
ID: 9644611
These are three different codes to try. Assign them (one at a time) to the movieclip, then click on it:

//=============== FIRST CODE ======================
onClipEvent(mouseDown){
      if(this.hitTest(_root._xmouse, _root._ymouse)){
            this._xscale = this._yscale = 300;
      }
}
onClipEvent(mouseUp){
      this._xscale = this._yscale = 100;
}


//=============== SECOND CODE =====================
onClipEvent(load){
      this.frame = 5;
      this.endscale = 100;
}
onClipEvent(mouseDown){
      if(this.hitTest(_root._xmouse, _root._ymouse)){
            this.endscale = 300;
      }
}
onClipEvent(mouseUp){
      this.endscale = 100;
}
onClipEvent(enterFrame){
      this._xscale += (this.endscale - this._xscale) / 3;
      this._yscale = this._xscale;
}


//=============== THIRD CODE ======================
onClipEvent(load){
      this.acc = 1.8;
      this.ine = 1.5;
      this.endscale = 100;
}
onClipEvent(mouseDown){
      if(this.hitTest(_root._xmouse, _root._ymouse)){
            this.endscale = 300;
      }
}
onClipEvent(mouseUp){
      this.endscale = 100;
}
onClipEvent(enterFrame){
      this.dx = (this.dx + (this.endscale - this._xscale) / this.acc) / this.ine;
      this._xscale += this.dx;
      this._yscale = this._xscale;
}
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

867 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now