320 posts
  • Bought between 100 and 499 items
  • Has been a member for 7-8 years
  • United States
timmylogue says

Can someone please tell me how to scale to stage a loaded image from an XML file. I’m going nuts! ;-P

For some weird reason I can’t get this to work. I understand I need to wait for the image to load first from the XML .

What I’m trying to do is load the image from xml and scale to fit (stage) height and width. I tried all different ways. Nothing…..

Here is my code: http://pastie.org/2014301

Thanks! Timothy

767 posts
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Sold between 1 000 and 5 000 dollars
outandouter says

Can someone please tell me how to scale to stage a loaded image from an XML file. I’m going nuts! ;-P

For some weird reason I can’t get this to work. I understand I need to wait for the image to load first from the XML .

What I’m trying to do is load the image from xml and scale to fit (stage) height and width. I tried all different ways. Nothing…..

Here is my code: http://pastie.org/2014301

Thanks! Timothy

Aren’t you trying to see if the image has loaded before even requesting loadMovie() in the function firstImage() ?

1676 posts Envato Elite Author
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Author had a Free File of the Month
  • Exclusive Author
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Europe
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
+1 more
Tean says

Are you asking for the math to resize an image or load complete?

320 posts
  • Bought between 100 and 499 items
  • Has been a member for 7-8 years
  • United States
timmylogue says

I guest im asking for the math? ;)

For example: Lets just say if I upload an image that is 300×300. When the time comes and the image is pulled in from the. xml file I need it to somehow scale to the stage or the document size which is 1280×720.

Does that make sense?

Thanks for your help guys Tim

1676 posts Envato Elite Author
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Author had a Free File of the Month
  • Exclusive Author
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Europe
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
+1 more
Tean says

I guest im asking for the math? ;)

For example: Lets just say if I upload an image that is 300×300. When the time comes and the image is pulled in from the. xml file I need it to somehow scale to the stage or the document size which is 1280×720.

Does that make sense?

Thanks for your help guys Tim

What do you want, fit inside or fit outside?

320 posts
  • Bought between 100 and 499 items
  • Has been a member for 7-8 years
  • United States
timmylogue says


I guest im asking for the math? ;)

For example: Lets just say if I upload an image that is 300×300. When the time comes and the image is pulled in from the. xml file I need it to somehow scale to the stage or the document size which is 1280×720.

Does that make sense?

Thanks for your help guys Tim
What do you want, fit inside or fit outside?

alittle confused of what you mean? haha :D

Tim

1676 posts Envato Elite Author
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Author had a Free File of the Month
  • Exclusive Author
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Europe
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
+1 more
Tean says
3673 posts Community Moderator
  • Has been a member for 5-6 years
  • Contributed a Tutorial to a Tuts+ Site
  • Netherlands
  • Community Moderator
  • Envato Studio (Microlancer) Beta Tester
  • Sold between 10 000 and 50 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
+4 more
Joost Volunteer moderator says


I guest im asking for the math? ;)

For example: Lets just say if I upload an image that is 300×300. When the time comes and the image is pulled in from the. xml file I need it to somehow scale to the stage or the document size which is 1280×720.

Does that make sense?

Thanks for your help guys Tim
What do you want, fit inside or fit outside?

Why would you want to fit outside of the stage? :o

767 posts
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Sold between 1 000 and 5 000 dollars
outandouter says



I guest im asking for the math? ;)

For example: Lets just say if I upload an image that is 300×300. When the time comes and the image is pulled in from the. xml file I need it to somehow scale to the stage or the document size which is 1280×720.

Does that make sense?

Thanks for your help guys Tim
What do you want, fit inside or fit outside?
Why would you want to fit outside of the stage? :o

So that images with different proportion/size than stage can fill the screen anyway.

843 posts
  • Elite Author
  • Exclusive Author
  • Has been a member for 5-6 years
  • Won a Competition
  • Sold between 100 000 and 250 000 dollars
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+2 more
marcfolio says

LoaderMax.

If I have time later I’ll expand more but loaderMax is your friend.

by
by
by
by
by
by