Solved

Zoom into a movie

Posted on 2003-10-29
1
263 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

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. …
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

773 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