Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It would be great if you give more code and explanations, but here what I found about 1046 : "One reason you will get this error is if you have an object on the stage with the same name as an object in your library."</p> <p>Look at : <a href="http://curtismorley.com/2007/06/20/flash-cs3-flex-2-as3-error-1046/" rel="nofollow">http://curtismorley.com/2007/06/20/flash-cs3-flex-2-as3-error-1046/</a></p> <p>Did you search any explanation on the Web for code 1046 ? Have you checked this one ?</p> <p>I see that you have two <code>var mp</code> declaration. Try to remove the first one, <code>var mp:MovieClip;</code>. If it doesn't work, check your Flash Library carefully, be sure that <code>MP_00</code> is a name available. If it's a MovieClip, check that it is exported for ActionScript. If it's an instance name, check that it's not used twice. </p> <p>EDIT.</p> <p>My suggestion is : </p> <p>1- Change all references of <code>mp</code> to <code>mp1</code>. Maybe there is a conflict with an instance "...an object on the stage with the same name as an object in your library."</p> <p>2- <code>var mp1:MP_00;</code> instead of <code>var mp:MovieClip;</code> in the declaration section.</p> <p>3- Put the <code>mp1 = new MP_00();</code> back in the startGame() function</p> <p>4- Be sure that your new <code>mp1</code> variable is everywhere you need and you have no more ref. to <code>mp</code> variable.</p> <p>If... it's still doesn't work. I suggest : Change the name of your MovieClip linkage, like <code>TestA</code>, or whatever. Yes I know, a doubt on everything, but there is no magic, testing everything will show the problem for sure.</p> <p>EDIT.</p> <p>For <code>mapMove()</code> function...</p> <p>First : be sure the <code>speedUp()</code> function is available, not in comments, and call it in your <code>playGame()</code> function. Your <code>playerSpeed</code> variable must have a value, so change : <code>var playerSpeed = playerSpeed + 1;</code> for <code>playerSpeed = playerSpeed + 1;</code>. Do not use <code>var</code> declaration twice for the same variable. (See <code>var playerSpeed:Number;</code> in header file.)</p> <p>Beside... you have to know if the <code>MP_00</code> clip on stage is YOUR <code>mp1</code> clip. (I assumed you published all the code you have.)</p> <p>Case A : <code>MP_00</code> is on stage when you start your Clip.</p> <p>If you actually see your <code>MP_00</code> on screen, that mean you don't have to do <code>mp1 = new MP_00();</code> and <code>addchild(mp1);</code>. It's already done for you (dragging a clip from library and giving a name instance, is the same as doing <code>new</code> and <code>addchild</code>).</p> <p>Find the instance name (or give one). You should get your instance name and move your object (here the instance name is <code>mp1</code>): </p> <pre><code>mp1.y = mp1.y - playerSpeed; </code></pre> <p>Case B : <code>MP_00</code> is NOT on stage when you start your Clip.</p> <p>Do : 1- your declaration : <code>var mp1:MP_00;</code> 2- allocation memory : <code>mp1 = new MP_00();</code> 3- add to the display list : <code>addchild(mp1);</code> 4- "Shake it bb" : <code>mp1.y = mp1.y - playerSpeed;</code> or <code>mp1.y -= playerSpeed;</code></p> <p>I don't know what is your knowledge level exactly, so I tried to put everything. Sorry if it's too much.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload