Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Feb 2008
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Loading a movie in a x and y position

    Hi all,

    I have a Flash movie with a movieclip inside called main (main has been dragged into the stage).
    In main at certain frame I have:
    Code:
    loadMovie("teletipo.swf", 1);
    Which loads teletipo.swf but in a x=0 and y=0 position. As I need it in a x=320 and y=165 position I've done:

    Code:
    this.createEmptyMovieClip("container", 1);
    container._x =320;
    container._y =165;
    container.loadMovie("teletipo.swf");
    But this does not load the teletipo.swf ... what am I doing wrong? How should I fix it?
    Thanks a ton in advance!

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Code:
    this.createEmptyMovieClip("container", this.getNextHighestDepth());
    container._x =320;
    container._y =165;
    this.createEmptyMovieClip("teletipo", 0);
    teletipo.loadMovie("teletipo.swf");
    Try this, because it actually replaces the movieClip with the swf, perhaps also destroying its settings.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #3
    New Coder
    Join Date
    Feb 2008
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks jeremywilken, it looked like the solution but .. nothing is loaded

    I don't get it .. why
    Code:
    loadMovie("teletipo.swf", 1)
    works and not your code ??

    Just in case something is bothering the main movie here's teletipo.fla (26kb)
    www.vivocom.es/test/teletipo.rar

    Please help me with this, I'm going nuts!!
    Thanks again!

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    I'm trying to help, don't worry.

    That code just has the basics, loads that swf to level 1.

    I made a mistake in my code. I also arranged it to make more sense naming wise.

    Code:
    this.createEmptyMovieClip("teletipo", this.getNextHighestDepth());
    teletipo._x =320;
    teletipo._y =165;
    teletipo.createEmptyMovieClip("container", 0);
    teletipo.container.loadMovie("teletipo.swf");
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #5
    New Coder
    Join Date
    Feb 2008
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm afraid it is not working .. nothing loads
    Should I create an empty movieclip? if so what should it have? keyframe?

  • #6
    New Coder
    Join Date
    Feb 2008
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just in case somebody needs it:

    In the teletipo.fla on the first frame, add the following:

    this._x = 320;
    this._y = 165;

    Then in your main movie, just use:

    loadMovieNum("teletipo.swf", 1);


  •  

    Posting Permissions

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