Advertisement

06.11.2005 at 10:41PM PDT, ID: 21455103
[x]
Attachment Details

Getting the dimensions of a dynamically loaded jpeg

Asked by civic86 in Macromedia Flash

Hello,
I would like the following code to detect whether or not the width of the jpg is larger than it's height, any idea how?

Thank you

imgUrl = 'photo1.jpg';
loadMovie(imgUrl, loader_mc);
if (_root.getBytesLoaded() != _root.getBytesTotal()) {
mask_mc.stop;
gotoAndPlay(1);      
} else {
      mask_mc.gotoAndPlay(2);
      trace(photo1.jpg._width);//returns undefined
      trace(loader_mc._height);//returns 1, this is the hieght of the clip set in the authoring environment
}Start Free Trial
 
Loading Advertisement...
 
[+][-]06.11.2005 at 11:23PM PDT, ID: 14197158

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.11.2005 at 11:31PM PDT, ID: 14197169

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Macromedia Flash
Sign Up Now!
Solution Provided By: FLAASHER
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.12.2005 at 04:56AM PDT, ID: 14197536

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.12.2005 at 06:32AM PDT, ID: 14197649

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.12.2005 at 07:02AM PDT, ID: 14197686

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.12.2005 at 07:48AM PDT, ID: 14197759

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32