Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expanding a Flash movie

Status
Not open for further replies.
Dec 8, 2003
17,047
GB
I'm sure this is something that gets asked quite a lot, but I couldn't find anything to fit my needs in the FAQ section or using the search function.

I have a 450 x 120 pixel Flash movie (created in Flash 8, exported as a Flash 6 SWF). It is placed on my page using Macromedia's Flash / JavaScript Integration Kit (JavaScriptFlashGateway.js), at a size of 139 x 37 (i.e. the same aspect ratio).

When the user clicks anywhere inside the movie, I'd like it to grow to its original size.

I've tried creating a timer (using setInterval) which increments "_width" every 100 msecs, but this suffers from two problems:

1. The height doesn't increase automatically, and
2. When the movie gets above 139 pixels wide, it is cropped, so you only see the first 139 pixels of it.

I'd rather script this (using ActionScript2) if possible, for several reasons:

- I'm none too confident with the Flash GUI, but more than competent at programming
- The movie is a pre-built off-the-shelf "widget" that looks quite complex (see previous point :))

Can anyone recommend a good way to go about this?

Thanks!

Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top