5306 posts Interactive Design
  • Elite Author
  • Author Level 10
  • Trendsetter
  • Top Monthly Author
+11 more
digitalscience
says

Ok so say you have a piece of paper that’s 200cm x 200cm… and on that piece of paper there is a square drawn which is 50cm big… what is the percentage scale needed to enlarge the paper so the drawn square is 200 cm big.

Hope this makes sense :D

3875 posts Community Moderator
  • Weekly Top Seller
  • Moderator
  • Tuts+ Instructor
  • Netherlands
+10 more
Joost
Moderator
says

400%. You’re scaling the sides by a factor 4.

5306 posts Interactive Design
  • Elite Author
  • Author Level 10
  • Trendsetter
  • Top Monthly Author
+11 more
digitalscience
says

ok but what is the formula :) hmm why does it seem so simple, am I retarded?

32 posts
  • Author Level 1
  • Exclusive Author
  • 2 Years of Membership
  • United Kingdom
simonwarner
says

Your just working out a percentage of the scale factor – so in this case the formula would be:

50/200×100 = 0.4×100 = 400%

Hope this makes sense! :)

30 posts
  • Affiliate Level 2
  • Author Level 6
  • Collector Level 1
  • Trendsetter
+6 more
ClientEngage
says

200/50 = 4 = 400% I suppose? :-)

5306 posts Interactive Design
  • Elite Author
  • Author Level 10
  • Trendsetter
  • Top Monthly Author
+11 more
digitalscience
says

hmmmm…. ya this doesn’t quite work though…

ok so say you have a Flash object which is 100% scale and the height is 400… now inside is a smaller object which is say 200 high… what is formula to scale the large object, so the smaller block appears as 400 pixels on screen.

_global.zoomScale = (small_obj._height/400)*100 <-- this gives me 50% (this just makes it smaller)

_global.zoomScale = ((small_obj._height/400)*100)*100 <-- this gives me 5000% (this just makes it too big)
5306 posts Interactive Design
  • Elite Author
  • Author Level 10
  • Trendsetter
  • Top Monthly Author
+11 more
digitalscience
says

_global.zoomScale = (400/small_obj._height)*100 ? lol :D Got it :P Thanks guys, one of those moments ;)

3757 posts
  • Elite Author
  • Spain
  • Author Level 8
  • Featured Author
+11 more
pezflash
says

Divide by four, not four hundred.
But maybe the problem is that you have a flash object. :P

3007 posts
  • 5 Years of Membership
  • Affiliate Level 5
  • Author Level 9
  • Bundle Boss
+8 more
duotive
says

:))

6231 posts
  • Exclusive Author
  • Elite Author
  • Author Level 8
  • 7 Years of Membership
+13 more
VF
says

hmm… _height reminds me a lot! ;)

by
by
by
by
by
by