Solved

Zoom into a movie

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
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 use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

708 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

19 Experts available now in Live!

Get 1:1 Help Now