A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Why doesn't it work?

  1. #1
    Member
    Join Date
    Jul 2002
    Posts
    92

    Why doesn't it work?

    basically my problem is this, i have this picture, and when you click it i need it to assign 2 variables: varX and varY, heres the code:

    on (release) {
    place = "images/1";
    loadMovie(place+".jpg", "size");
    varY = getProperty("/size", _height)*.273333;
    varX = getProperty("/size", _width)*.16375;
    gotoAndPlay(4);
    }

    -this code is on the thumbnail-

    What's happening, is you click on a thumbnail of image 1, an offscreen movie "size" loads the full picture, and i'm trying to get the width and height of movie "size" and multiply it by those numbers, and set them to there according varX or varY. It just doesn't function like it should, and i feel like i'm missing something obvious....
    Last edited by BonzoHarry; 11-08-2004 at 11:02 PM.

  2. #2
    Member
    Join Date
    Jul 2002
    Posts
    92
    help?

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Location
    Planet Earth
    Posts
    298
    You need to check to see if the thing has loaded before checking properties of it.
    ---
    Thinking outside of the box will get you fired if the "box" is strict budget.

  4. #4
    Member
    Join Date
    Jul 2002
    Posts
    92
    but by putting the loadmovie before the getproperties i thought i was...maybe not.

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Surely not!

  6. #6
    Member
    Join Date
    Jul 2002
    Posts
    92
    well, nuts...and thanks. Hopefully this will fix it. If so, i will be elated.

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