Solved

Using the LoadMovie function in Flash Mx?

Posted on 2002-05-25
2
413 Views
Last Modified: 2008-03-03
I have a program that uses the LoadMovie build in function to load dynamic jpg image files. ie.
loadMovie("../images/mypicture" + i + ".jpg", "Pictures");

Is there a way to make the jpg image display in a fixed
width and height, no matter what size the jpg file is?
0
Comment
Question by:7of9121098
2 Comments
 
LVL 23

Expert Comment

by:Zeffer
ID: 7034991
If you target a Flash movie as a template for
receiving the .jpgs the images will inherit the
properties of the target movie..This will display
the images using whatever properties you have set for
the movie...see below from ActionScript Help.

Loadmovie...
>>
Action; load a SWF or JPEG file into the Flash Player while the original movie is playing. The loadMovie action lets you display several movies at once and switch between movies without loading another HTML document. Without the loadMovie action, the Flash Player displays a single movie (SWF file) and then closes.

When you use the loadMovie action, you must specify either a level in the Flash Player or a target movie clip, into which the movie will load. If you specify a level, the action changes to loadMovieNum. If a movie is loaded into a target movie clip, you can use the target path of that movie clip to target the loaded movie.

A movie or image loaded into a target inherits the position, rotation, and scale properties of the targeted movie clip. The upper left corner of the loaded image or movie aligns with the registration point of the targeted movie clip. Alternatively, if the target is the _root Timeline, the upper left corner of the image or movie aligns with the upper left corner of the Stage.

Use the unloadMovie action to remove movies loaded with the loadMovie action. <<

Z

0
 
LVL 6

Accepted Solution

by:
rootdir earned 50 total points
ID: 7035729
I think you have to scale the targetmovie everytime like this to get fixed width.

targetmovie_width=_root.Pictures._x
width_percent = (Fixed_width / targetmovie_width) *  100
_root.Pictures._xscale=width_percent

targetmovie_length=_root.Pictures._y
length_percent = (Fixed_length / targetmovie_length) *  100
_root.Pictures._yscale=length_percent

That's it. Still if you don't get results upload your fla file  or send it to me at rotdir@hotmail.com.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
SWF capture the time on the Video 3 225
IE 11 Flash Player issue 7 245
anti-download video publishing site? 6 617
Include Adobe AIR libraries in Flash Builder 4 131
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…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

821 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