dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Not scaling a MC on a Motion Guide

  1. #1
    Member
    Join Date
    Oct 2004
    Posts
    30

    Not scaling a MC on a Motion Guide

    I am making a website using a fullscreen SWF. I already no how to make objects not scale and use listeners to repoistion them, etc., but I've run across any interesting question.

    I want to have a MC running along a motion guide. I want the motion guide itself to scale to the size of the browser window, but have the MC stay the same size (not scale).

    I was thinking if I had a MC (let's call it "total") that contained the guide and animated MC (let's call it "ball"), I could tell actionscript to scale "total" but not scale "ball", and that would cause the guide to scale but "ball" to not scale. However, I havn't had any luck getting this to work.

    Does anyone have ideas?

  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    I dont think your setup will work because a guide and the clip that follows it cannot be in separate clips.

    My idea is to have an empty movie clip follow the guilde, then put ball outside of that clip altogether. Set balls onEnterFrame to have its x and y match that of the of the invisible clip following the path. There will probably be some coordinate mismatch since your trying to match stage coordinates to a movieclips internal coordinates so use localToGlobal to adjust for the difference.

  3. #3
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    Check attachment...

    /Mirandir
    Attached Files Attached Files

  4. #4
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    nice one Mirandir. I was actually thinking of something similar as well but was thinking of having the ball set its _xscale in the opposite of totals scale. That would have been too combersome though, I like how you just flipped the math.

  5. #5
    Member
    Join Date
    Oct 2004
    Posts
    30
    Thanks! That's awesome!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center