dimension problem while attaching movie clip

Ask a Question related to Macromedia Flash Ad Development, Design and Development.

  1. #1

    Default dimension problem while attaching movie clip

    I am attaching 5 different objects to the movie but they are being displayed on
    top of another even I have given different dimensions to each

    //code for videopoker
    deal.onPress = function(){
    var a;
    var b;
    var c;
    var d;
    var e;
    deck1._visible = false;
    deck2._visible = false;
    deck3._visible = false;
    deck4._visible = false;
    deck5._visible = false;
    a = Math.round(Math.random()*(52-1))+1;
    b = Math.round(Math.random()*(52-1))+1;
    c = Math.round(Math.random()*(52-1))+1;
    d = Math.round(Math.random()*(52-1))+1;
    e = Math.round(Math.random()*(52-1))+1;
    trace("value of a" + a);
    trace("value of b" + b);
    trace("value of c" + c);
    trace("value of d" + d);
    trace("value of e" + e);
    //attaching randomly generated cards
    _root.attachMovie(a,"newcard1",0);
    newcard1._x = 1;
    newcard1._y = 10;
    _root.attachMovie(b,"newcard2",0);
    newcard2._x = 10;
    newcard2._y = 30;
    _root.attachMovie(c,"newcard3",0);
    newcard3._x = 20;
    newcard3._y = 50;
    _root.attachMovie(d,"newcard4",0);
    newcard4._x = 30;
    newcard4._y = 70;
    _root.attachMovie(e,"newcard5",0);
    newcard5._x = 40;
    newcard5._y = 90;
    };

    sidhu_onfire Guest

  2. Similar Questions and Discussions

    1. Problem attaching a clip to an xml parsed object
      The goal of this is to load in data form an xml file, attach the data to a custom object, and associate the object with a movieclip (library item)....
    2. Load Movie Clip Problem
      Hello I am having a problem with levels when loading a movie clip. Is there anyway to on clip event it cks to see if a movie is on loaded on a...
    3. Movie clip problem
      I want to load my play back head to perticular frame from one movie clip to another movie clip so which action i have to write??
    4. Duplicate Movie Clip in a Duplicated Movie Clip...
      I'm making a Flash Navigation Bar (menu) that could be freely customized by people just through a text file. The problem is that my submenus won't...
    5. Movie Clip Navigation problem
      I've got Flash 5, and I am trying to get navigation buttons that I have put into a movie clip to target a scene specific to each button. I created...
  3. #2

    Default Re: dimension problem while attaching movie clip

    hi,
    you are attaching the movie on the same level....
    when attaching movieclips try to get the highest depth and attach in that
    depth or level,
    so replace the attachMovie as :::

    _root.attachMovie(a,"newcard1",_root.getNextHighes tDepth());

    try to use this statement.................

    steeban Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139