A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: can't control the _x _y values with external swf using loadMovieNum***

  1. #1
    Junior Member
    Join Date
    Feb 2004
    Posts
    18

    can't control the _x _y values

    can't control the _x _y values with external swf using loadMovieNum***

    ok i'm loading 2 swf files with loadMovieNum within there levels. when they show up i'm getting thrown off as to how to control there _x and _y values.

    they are showing up at the top left registration point of the background.

    i for some reason cannot figure this out.

    please help me out.

    jt
    Last edited by jtdodge; 10-05-2004 at 04:27 PM.

  2. #2
    Senior Member jbum's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    2,920
    If you change the _x and _y values immediately after calling loadMovie or loadMovieNum, it won't work, because when the movie loads, it will obliterate the values you set. You can work around this by using an additional container movie, and changing the _x, _y values of the container (which won't get obliterated).

    e.g.

    code:

    _root.createEmptyMovieClip("cont_mc", 1);
    cont_mc.loadmc = loadMovie("xxx.swf");
    cont_mc.loadmc._x = 100; // this won't work
    cont_mc._x = 100; // but this will
    cont_mc._y = 200;


  3. #3
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    this will also work:

    _root.onEnterFrame = function(){
    if (_level1 != undefined){
    _level1._x = xvaluehere;
    _level1._y = yvaluehere;
    delete _root.onEnterFrame;
    }
    }

    it needs only a flick of a second.
    - The right of the People to create Flash movies shall not be infringed. -

  4. #4
    Junior Member
    Join Date
    Feb 2004
    Posts
    18

    thanks!!

    you two were right on!
    damn i never get bad info here!

    thanx so much!

    jt

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