Solved

Zoom into a movie

Posted on 2003-10-29
1
264 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

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

Suggested Solutions

Title # Comments Views Activity
How to put actionscript code for a button? 6 146
SCCM 2012 - Deploy Flash 16 7,092
How do I convert a CS4 FLA file to CS6? 1 884
bandwidth 5 80
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
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 how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to how to record live broadcast.

730 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