Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Zoom into a movie

Posted on 2003-10-29
1
Medium Priority
?
269 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 540 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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 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.

824 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