Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using the LoadMovie function in Flash Mx?

Posted on 2002-05-25
2
Medium Priority
?
425 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
[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
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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
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.

636 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