Solved

Dynamic Movie Clips

Posted on 2003-11-19
1
263 Views
Last Modified: 2010-04-03
What I am trying to achieve is to get my button to change the hieght and width, then change the _x and _y position without having to use motion tweens.
I can't put any onClipEvent scripts because it doesn't work with buttons. I have also tried putting my button into a movie clip, but my code isn't working and the on (rollOver) scripts don't work.
If any one can post an example code, post a tutorial, fla example etc I would greatly appriciate it.

Cheers

-OBCT
0
Comment
Question by:OBCT
1 Comment
 
LVL 1

Accepted Solution

by:
text_problems earned 500 total points
ID: 9785961
its very simple.

create a mc to use as your button. then:

_root.your_mc.onRelease = function(){
_root.your_mc._x = wherever;
_root.your_mc._y = wherever;
_root.your_mc._height = whatever;
_root.your_mc._width = whatever;
}

if you want to reuse the code you should probably write a proto or function to resize and move the mc.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to record live broadcast.
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.

706 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

15 Experts available now in Live!

Get 1:1 Help Now