Warning: conflicting use of instance name

Hey guys,
Recently a rather weird warning began to pop-up every time I publish my movie. It says this:
Warning: The instance name 'icon' is declared on an object of type flash.display.MovieClip but there is a conflicting use of the instance name 'icon' on an object of type flash.display.InteractiveObject. (Symbol 'bt_login', Layer 'icon', Frame 14)
There is only one object on the 'icon' layer, the icon movieclip itself. On all keyframes it is named 'icon'. On Frame 14 there is no keyframe at all. What exatctly should this warning mean? Thanks!
F.

you should remove all code from objects and attach to the timeline.  for example, assign an instance name to the movieclip that has that enterFrame (eg, mc) and use:
mc.onEnterFrame=loopF;
function loopF():Void{
this._x = this._x + (_root.intSlideToX – this._x ) /5;
this._y = this._y + (_root.intSlideToY – this._y ) /5;   
if(Math.abs(this._y-_root.intSlideToY)<1&&Math.abs(this._x-_root.intSlideToX)<1){
this._y=_root.intSlideToY;
delete this.onEnterFrame;
when _root.intSlideToX or _root.intSlideToY change, restart the loopF

Similar Messages

  • Button using changing Instance Names

    I have multiple button using the same button from my library.
    I have given the all instance name and if I put that instance name
    in from of my addEventListener the button works fine. However, I
    have a lot of buttons on the stage so I want to be able to write
    some thing the will get the instance name on roll over and place
    that in front of the event listener. I am trying to avoid writing a
    line of code for each button. Can this be done?

    you should start here:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/
    go to packages->statements, keywords, & directives
    you can't just ask what a for loop is. it shows you haven't
    done any investigation at all as that is a very basic programming
    construct. you need to learn some basics before you ask people what
    to do. if you have trouble with a particular topic or getting
    something to work, that's what this is for, but it's not to teach
    you the language. there's way too much to learn and too many people
    asking. get a good actionscript book and it will take you through
    the basics.
    i recommend:
    O'reilly Essential Actionscript 3
    good luck

  • Buttons null; losing stage instance names

    Hello, I apologize if this question has already been asked but as the title states I'm having problems with the instance names of my buttons. I am using Actionscript 3 with Flash CS5. I apologize in advance for being verbose but it'd be best if I explained my problem in detail.
    I have my project set up so that everything occurs in one MovieClip and buttons within the MovieClip are clicked to navigate through the MovieClip. The MovieClip contains several frames which are all unique and contain a variety of textboxes, MovieClips, buttons, classes and other custom classes. All of these components are created directly in Flash Professional by dragging them from the library onto the stage inside of the MovieClip.
    I then name these components using Flash Professional and use these instance names to work with the components. Usually this works without a problem. However, now that I am using a nested MovieClip for my project many problems are occuring. I have it so that when buttons are clicked, the MovieClip goes to a certain frame via the gotoAndStop(x); command. This works fine but I am having problems accessing the buttons that I have named earlier. It gives a null object reference error and when I trace the button it traces as "null".
    Originally I thought that this problem was because the MovieClip had not yet initialized but I had used the ADDED and RENDER event listeners, Timeline scripting, and other methods but the button was still null, leading me to believe that the problem was more than that.
    So I used a click event listener that traced the instance names of the components that I was clicking (trace(e.target.name)). I have a total of 8 buttons on the specific frame of my MovieClip so I clicked on them all. 6/8 of the buttons traced the correct instance name that I had given them whereas the other two buttons traced "instance 169" and "instance 177" instead of the instance name.
    With all this strangeness, I commented out the code for these 2 specific buttons to see if it would work without them. Sure enough it did.
    I believe that my buttons have lost their stage instance names and I do not know how to fix this problem. I have tried deleting the buttons and creating them again but to no avail. It does work, however, if I use the Button component that Flash has but I do not want to do that because I'd like to use my own custom buttons (I know the Button component is customizeable, but I'd like to use my own anyways).
    If anyone could help, please how can I fix this problem? If my .fla or specific code needs to be provided, I can do so.

    Without looking at your code I can't say 100% what is going on. However, I suspect what is happening is that you're doing the following:
    Your button is on stage in frame 1
    You add an event listener to that button
    At some point, you go to a frame where the button does not exist.
    When you come back to frame 1, your listener doesn't work anymore
    Or some variation of above, where an instance was on the stage, is removed, and even though it appears to have been added back you can't reference it anymore.  I've discussed fixes for this issue in depth in this article, but it all boils down to the fact that when the object is removed from the stage the variable that contained the instance the first time will go to null, and then when you go back to the frame with the instance on it, the variable will be populated with an instance which is probably not the same as the first one.
    If the problem is what Ned Murphy speculated, you can easily fix it by setting mouseChildren to false on the buttons.

  • Scale out question: how does instance name affect primary/secondary node

    Hi:
    OBIEE 11.1.1.6.4, Windows 2008
    On a test instance the following happened:
    1. Enterprise install of OBIEE 11g had problems
    2. Reinstalled OBIEE 11g, but the installer created an instance2
    3. All was well with this install
    4. Performed all necessary shared catalog and RPD steps
    5. On a second server, installed OBIEE 11g using the scale-out option
    6. On second server, this created an instance1 directory
    7. All components start up and we can log into OBIEE using either server1 or server2
    Question:
    Does OBIEE use the instance names in a scale-out? Our primary node is instance2 and the secondary node is instance1, though on a separate server. Will this cause a problem?
    Thanks for any help.

    Hello,
    This can be run on any of the replicas that the availability group participates in to return the primary instance:
    select primary_replica FROM sys.dm_hadr_name_id_map nim
    inner join sys.dm_hadr_availability_group_states ags
    on nim.ag_id = ags.group_id
    WHERE nim.ag_name = 'MyAvailabilityGroupNameHere'
    Sean Gallardy | Blog | Microsoft Certified Master

  • General Question About common Instance Names in Flash CS4 (AS3)

    I tried something interesting recently. I had code effecting an object with the instance name : object_mc.
    Now I added another object and gave it the same instance name.
    The result was, that the code only effected the most recent added object (no error).
    Is there a way in flash to have multiple objects with the same instance name all being affected by one piece of code?
    ~ Thanks for any thoughts, advice or facts. ~

    Advice: avoid it... if you want to control different instances, give them different instance names.
    It depends on what you mean by "one piece of code".  Directly using the instance name to target the movieclips will work as you have seen already... Last one added gets the attention.
    To use the instance name to take action is doable more along the lines of testing each movie to see if it has the name, but still, you would have to target each using a different means. 
    For the piece of code below I have some number of objects on the stage and I test to see if they have an instance name assigned (object_mc) that is shared by some of them, and I am able to move them if they do, but I cannot use the instance name to target each of them for action... in this case I use the getChildAt method.
    for(var i=0; i<this.numChildren; i++){
    if(this.getChildAt(i).name == "object_mc"){
      this.getChildAt(i).x += 200;
      object_mc.x += 25;  // only moves the last object added

  • Flash actions and instance names

    Hi, i'm after some advise on how to navigate around the timeline using buttons. I know this sounds simple but i'm running into some daft problems.
    I've added a single instance for a button called 'button' which appears on multiple keyframes. This button only appears once per keyframe but some of the actions are getting mixed up. I know that i can create multiple instances to get around this but in principle i cant see why having one action attached to one instance per keyframe would cause an issue regardless of that fact i have the same instance appear on multiple keyframes. Should flash be behaving like this?
    Andy

    Hi Ned, what i have is a layer called actions that hosts a number of actionscripts with a keyframe for each script. To save time i usually create the first frame using unique instance names and then i simply copy and paste them into subsequent keyframes. So each KEYFRAME has unique instances. I thought that by doing this i would save time by not having to re-name or reposition each instance that appears on my timeline -  this would take a long time not to mention the complications it would cause should i decide to shuffle a few frames about later on. For the majority of the time everything works just fine but occasionally the timeline will jump to somewhere totally unexpected. the problem is compounded by the fact that many of these buttons control video playback, so you can imagine the mess this is causing.
    If what i'm doing is bad practice then i'll happily do it the right way by naming each instance but i'm still struggling to see why actions are getting mixed up when they run on their own keyframe.

  • Using a variable in an instance name

    Hey all,
    Simple question:
    I'm trying to use a variable to call on different instance names:
    var picCaller:uint=2;
    material_mc.addChild(pic_""+picCaller+"");
    The code in red is the issue in question.  In this example, I'm trying to add a child called "pic_2", with the number two called from the variable "picCaller"
    Any assistance is greatly appreciated.
    Thanks!

    Just for context, here is what I'm trying to do:
    I have jpegs in my library and I want to add them to the stage when they're needed, so just to add one image, here is the code I have:
    var pic_1=new pic1(0,0);
    var image_1:Bitmap=new Bitmap(pic_1);
    material_mc.addChild(image_1);
    I want to put the above into a loop so that I dont have to repeat those three lines for every image in my library like so:
    var pic_1=new pic1(0,0);
    var image_1:Bitmap=new Bitmap(pic_1);
    var pic_2=new pic2(0,0);
    var image_2:Bitmap=new Bitmap(pic_2);
    var pic_3=new pic3(0,0);
    var image_3:Bitmap=new Bitmap(pic_3);
    var pic_4=new pic4(0,0);
    var image_4:Bitmap=new Bitmap(pic_4);
    var pic_5=new pic5(0,0);
    var image_5:Bitmap=new Bitmap(pic_5);
    var pic_6=new pic6(0,0);
    var image_6:Bitmap=new Bitmap(pic_6);
    var pic_7=new pic7(0,0);
    var image_7:Bitmap=new Bitmap(pic_7);
    the variable "picNum" is the total amount of images that in the library, each one exported as "pic1", "pic2", "pic3" respectively.
    var picNum:uint=7;
    var picCaller:uint=1;
    var  picMC:MovieClip = new MovieClip();
    picMC=this["pic_"+picCaller];
    for (var  i:int = 1; i <= picNum; i=i+1)
         var "pic_"+i = new image_i(0,   0);
         var image:Bitmap = new Bitmap("pic_"+i);
    Thanks so much for your help.

  • Can i do this (use a counter "i" in instance name)

    hello,
    i have  5 Dynamic Text object in my scene and i need to do a treatement for them (compare each one to the other)
    my Text instance names are :
    to0,to1,to2,to3,to4
    and their variable names are :
    t0,t1,t2,t3,t4
    what i need to do is :
    if (t0>t1) then to0 will move to the place of to1 and to1 will move to the place of to0
    till now i have no problem to compare 2 elements and change their place but what if i have a large number or an unknow number of elements , i know that i can (should) a for loop but the problem is that i can't do this
    for examle let's say that i have 10 elements :
    for(i=0;i<10;i++){
              if(t[i]>t[i+1]){
                exchange(to[i],to[i+1]);
    //this code work perfectly when i work with an array
    i hope that you understand my problem, i don't need someone to tell me how to apply a sort in a table all i want is the ability to use a counter on an instance/variable name of a MovieClip,DynamicText,etc...
    thank you

    If you follow what I offered in your other message, it would be something like...
    for(i=0;i<10;i++){
              if(t[i]>t[i+1]){
                exchange(this["to"+i], this["to"+(i+1));

  • How to reference the Instance name using Substitution string or SQL

    All:
    We have an Application that will be replicated in multiple Apex instances and would like to display the current Oracle Apex Instance name ( Similar to the &APP_USER. on the Welcome portion of the page ) .
    Is there a substitution string for this ?
    We plan on using a Show/Hide region on the splash page titled [About], that when clicked displays an HTML region with the subsitution strings.
    If no substitution strings, can someone help with an SQL that returns the Instance name ?
    Thanks for all the help.
    Aubrey Fernandes

    Aubrey Fernandes wrote:
    I currently have 3 URLs to get to my Development, QA and Production servers & will have many more production servers with different Application Ids.
    Development = http://canqa101:7777/pls/ngcrmd01/apex
    QA = http://canqa101:7777/pls/ngcrmq01/f?p=100:1
    Production = http://cancs105:7777/pls/ngcrmp01/f?p=100:1
    What I need are the portions before the final forward slash ( canqa101:7777/pls/ngcrmd01 ) which I assumed is the Oracle Apex instance.That information is determined by the web server configuration (e.g. the DADs when using OHS) rather than through APEX itself. There are no built-in substitution strings for this. Create an application item and an On New Instance (new session) computation to set the value using the function<tt>owa_util.get_cgi_env</tt> function to get the CGI environment variables <tt> HTTP_HOST</tt> and <tt>SCRIPT_NAME</tt>. You can then reference the value in the region using substitution string syntax.

  • How can we use variables for instance name?

    I'm using 9 textbox in my stage. Names are similar, only difference is the last character. (s1_0, s1_1, s1_2, ...). I'm trying to use these textbox in a loop. But I couldn't find the right typing... s1_[i], s1_(i) or s1_{i} gives error.
      s1_0.text=0
      s1_1.text=0
      s1_2.text=0
      s1_3.text=0
      s1_4.text=0
      s1_5.text=0
      s1_6.text=0
      s1_7.text=0
    how can make the shortest typing for this issue?

    yes, its working, thank you very much...
    I tried array operator but the word "this"..
    what does it means ? when I delete this word, it gives error. how does flash know that it is a instance name?

  • Using and storing instance names

    I know you can store instance names in an array and call on the array values to reference the instance names in it.
    I was wondering if there is any way I can take an instance name, feed it directly into a function and use the name of the function variable/array/whatever to affect the object instance of whatever I name.
    if it's an array of instance names, what is it actually an array of?
    Also, is there any way to hold and reference an instance name in a single value?
    sidenote:
    this doesnt have much to do with my question, but can arrays be fed directly into the header of a function?

    Look, there is no any ambiguity in what array holds - it is what you make it hold.
    If you are talking about instance names as strings, the following can be done (given objects with instance names are instantiated);
    var myInstanses:Array = ["instance1", "anotherInstance", "myMovie"];
    than you can feed instance name onto a function and do whatever you need to:
    function myFunction(instanceName:String):void{
         this[instanceName].x = 200;
    myFunction(myInstances[1]);
    But if you are talking about instances as instances - not names:
    var myInstanses:Array = [instance1, anotherInstance, myMovie];
    function myFunction(instance:Sprite):void{
         instance.x = 200;
    myFunction(myInstances[1]);

  • A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (p

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that
    the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)(Microsoft SQL Server, Error: 2)
    The system cannot find the file specified
    Cannot connect to COWBOYS.
    Here are the technical details===================================
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476
    Error Number: 2
    Severity: 20
    State: 0
    Program Location:
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
       at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
       at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer
    timeout)
       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance,
    SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.Open()
       at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
       at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
    ===================================
    The system cannot find the file specified
    I have tried from so many forms. This is so frustrating. Thank for everyone/anyone who wants to help. So this is what happened: I had to uninstall my previous sqlserver 2012(which worked great) for some reason, and I uninstalled everything from that download.
    Then I installed the trial edition of sql server 2012 (64 Bit) and It wouldn't connect to the database. (Error mentioned above.) My local DB is COWBOYS. (COWBOYS is also my computer name.) After this, I have tried downloading sqlexpress and sqlserver 64bit
    many times and cannot connect to my local DB. 
    How do I connect to my Local DB? 
    Also, I think this might help: (When I run sqlserve.exe, which I was able to find in C:\Program Files\Microsoft SQL Server\110\LocalDB\Binn, I get an error: Your SQL server installation is either corrupt or has been tampered with(Error getting
    instance ID from name). Please uninstall then re-run setup to correct this problem.
    I would happily re install it, if it wasn't my 20th time.
    I don't have any remote connections, I don't use username/password, only window authentication. I work mostly on visual studio, but without able to store /retrieve data, I don't know how to survive.
    May be the solution is very simple, but I am too frustrated. 
    Some of the things I have tried:
    From a command prompt, enter one of the following commands:
    net start "SQL Server Agent (MSSQLSERVER)" OR 
    net start "SQL Server Agent(instancename)"(for instance)
    on my sql configuration, I cannot start anything because there is nothing there to start. I can post more details, if that would help. Also, some more details about the error:
    Details
    Product:
    SQL Server
    ID:
    2
    Source:
    MSSQLServer
    Version:
    10.0
    Component:
    SQLEngine
    Message:
    An error has occurred while establishing a connection to the server. When connecting to SQL Server, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error:
    40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
    Explanation
    SQL Server did not respond to the client request because the server is probably not started.
    User Action
    Make sure that the server is started.
    Version:
    9.0
    Component:
    SQLEngine
    Message:
    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error:
    40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
    Explanation
    SQL Server did not respond to the client request because the server is probably not started.
    User Action
    Make sure that the server is started.
    Any one that can help me, I will be greatful. Thank you so much. p.s. please ask me anything if you have any questions.

    It sounds like there are a couple things going on here.  First check if you have a successful install of SQL Server, then we'll figure out the connection issues.
    Can you launch SQL Server Configuration Manager and check for SQL Server (MSSQLSERVER) if default instance or SQL Server (other name) if you've configured your instance as a named instance.  Once you find this, make sure the service is started. 
    If not started, try to start it and see if it throws an error.  If you get an error, post the error message your hitting.  If the service starts, you can then launch SSMS and try to connect.  If you have a default instance, you can use the machine
    name in the connection dialog.  Ex:  "COWBOYS" where Cowboys is the machine name.  However, if you named the SQL Server instance during install, you'll need to connect using the machine\instance format.  Ex:  COWBOYS\Romo (where Romo
    is the instance name you set during install).
    You can also look at the summary.txt file in the SQL Server setup error logs to see what happened on the most recent install.  Past install history is archived in the log folder if you need to dig those up to help troubleshoot, but the most
    recent one may help get to the bottom of it if there is an issue with setup detecting a prior instance that needs to be repaired.
    Thanks,
    Sam Lester (MSFT)
    http://blogs.msdn.com/b/samlester
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and
    "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • How do I use event.target.name in AS2?

    Thanks to kglad I was able to see how event.target.name in AS3 could make a button load a movieclip with the same namesake.
    I'm doing the same thing now in AS2 but don't know what to write instead of event.target.name.
    And so at the moment each button pushes info into an array and then a function uses that to decide which movieclip to attach to a holder after it has faded out once, and then fades in again...
    // ***** IMAGE GALLERY START ***** //
    // Add image to holder
    imgholder.attachMovie("img0", "image0_0", 1)
    // Array
    var nextLoad = ["img0"];
    // Btn listeners
    img5.onRelease = function() { trace (nextLoad); nextLoad.pop(); nextLoad.push("img5"); btnClick() } // Written on 1 line
    img4.onRelease = function() { trace (nextLoad); nextLoad.pop(); nextLoad.push("img4"); btnClick() }
    img3.onRelease = function() { trace (nextLoad); nextLoad.pop(); nextLoad.push("img3"); btnClick() }
    img2.onRelease = function() { trace (nextLoad); nextLoad.pop(); nextLoad.push("img2"); btnClick() }
    img1.onRelease = function() {
    nextLoad.pop();
    nextLoad.push("img1");
    btnClick()
    img0.onRelease = function() {
    nextLoad.pop();
    nextLoad.push("img0");
    btnClick()
    // The btn function
    function btnClick() {
    trace ("click");
    var myImgTween:Object = new Tween(imgholder, "_alpha", Strong.easeOut, 100, 0, 1, true);
    myImgTween.onMotionFinished = function() {
    fadeOutImg();
    // The btn function part II
    function fadeOutImg() {
    trace ("fadeOutImg");
    imgholder.attachMovie(nextLoad, "image1_1", 1);
    var myImgTween:Object = new Tween(imgholder, "_alpha", Strong.easeOut, 0, 100, 1, true);
    I know I should be able to push the button name into the array, but am having to use a string... I'm sure my code is cumbersome!! But it works. I've tried pushing the button name but it end up including the full stage reference.
    Is there a cleaner way of doing this using event.target.name?
    Thanks for looking!

    There is no event.target in AS2. However since AS2 has no way of remembering the scope object where the target object resides, you can use this to your advantage to retrieve the name of the target by using the "this" command in the function whenever you use the above format "mc.onPress = myfunc". FYI, the popular workaround Delegate, made it possible that when you called "this" in the function, you could retrieve the scope object where the target instance resides. So without its use, "this" will return the name of the target object. Anyway this is the code you can use:
    imgholder.attachMovie("img0","image0_0",1);
    var nextLoad = ["img0"];
    img5.onRelease = onImgRelease;
    img4.onRelease = onImgRelease;
    img3.onRelease = onImgRelease;
    img2.onRelease = onImgRelease;
    img1.onRelease = onImgRelease;
    img0.onRelease = onImgRelease;
    function onImgRelease():Void {
       nextLoad.pop();
       nextLoad.push(this._name);
       btnClick();
    // The btn function
    function btnClick() {
       trace("click");
       var myImgTween:Object = new Tween(imgholder, "_alpha", Strong.easeOut, 100, 0, 1, true);
       myImgTween.onMotionFinished = function() {
          fadeOutImg();
    // The btn function part II
    function fadeOutImg() {
       trace("fadeOutImg");
       imgholder.attachMovie(nextLoad,"image1_1",1);
       var myImgTween:Object = new Tween(imgholder, "_alpha", Strong.easeOut, 0, 100, 1, true);

  • Multiple MovieClips with same instance name

    I'm following a tower defence tutorial and part of the code is set up so I can build towers on the "grass" movie clip. I wanted to add more patches of "grass" and gave them all the same instance name so I can be able to place towers on them, but I have the problem that I can only place towers on the first item I placed and has the instance name of "grass". I can't seem to place towers on the other patches of grass.
    I removed the instance name of the first patch of grass and it let me build towers on the second patch, but the second patch only.
    I was following this tutorial: http://www.goofballgames.com/2010/01/31/how-to-build-a-tower-defense-f lash-game-part-2-placing-towers/
    Here is the code for it I believe:
    onClipEvent (load)
        active = 0;
    onClipEvent (enterFrame)
        if (active == 1)
            setProperty("", _x, int((_root._xmouse - 10) / 20) * 20 + 20);
            setProperty("", _y, int((_root._ymouse - 10) / 20) * 20 + 20);
      hitTestOnGrassMovieClip = _root.grass.hitTest(_x, _y, 1);
            if (hitTestOnGrassMovieClip) {
                gotoAndStop(1);
       _root.ranger.gotoAndStop(1);
            else {
                gotoAndStop(2);
       _root.ranger.gotoAndStop(2);
            _root.ranger._x = _x;
            _root.ranger._y = _y;
            _root.ranger._width = _root["tower_" + tower].range * 2;
            _root.ranger._height = _root["tower_" + tower].range * 2;
    on (press)
    hitTestOnGrassMovieClip = _root.grass.hitTest(_x, _y, 1);
    hitTestOnDeSelectMovieClip = _root.deselect.hitTest(_x, _y, 1);
        if (hitTestOnGrassMovieClip || hitTestOnDeSelectMovieClip) {
            if (hitTestOnGrassMovieClip) {
       ++_root.towerCount;
       _root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 500 + _root.towerCount);
       a = _root["t" + _root.towerCount];
       a._x = _x;
       a._y = _y;
       a.active = 1;
      active = 0;
      setProperty("", _x, 1000);
      _root.selectedTower = "";
      _root.ranger._x = 1000;
      _root.ranger._width = 10;
      _root.ranger._height = 10; 
    }

    1.  You cannot use the same instance names for different objects and expect more than one to be targeted.  You need to assign unique names, or you can store references to them in an array and use the array to target them.
    2. You are posting AS2 code in the AS3 forum.  You should repost in the AS2 forum.  http://forums.adobe.com/community/flash/flash_actionscript

  • A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The
    server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26- Error:Locating Server\instance Specified)
    How Can i solve this?

    1. Make sure SQL Server Service is running
    2. If a named instance, make sure SQL Server browser service is running
    3. Make sure SQL Server is configured to allow remote connections
    4. Examine the SQL Server error log for messages confirming that SQL is listening on the expected network interfaces and ports
    5. Test server connectivity with PING from the client machine
    6. Test port connectivity using TELNET or PowerShell to the server and port (from step 4) from the client machine.  For example
    a. TELNET <server-name> 1433
    b. PowerShell: 1433 | % { echo ((new-object Net.Sockets.TcpClient).Connect("YourServerName",$_)) "server listening on TCP port $_" }
    7. Check firewall settings if step 5 or 6 connectivity test fails
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

Maybe you are looking for