How to access the mc of IN the class file

Hello, I wrote a custom, class and I need to change the attributes of the clip for me, don't know what the syntax, that's what I thought, it was the law, but om a newbie:

MovieClip (test_mc) .visible = false;

also tried:

test_mc. Visible = false;

This.test_mc. Visible = false;

This.parent.parent.test_mc. Visible = false;

This.parent.test_mc. Visible = false;

This. MovieClip (test_mc) .visible = false;

Here is the entire class incase you need, thank you in advance;

package {}
import flash.display.MovieClip;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.display.Sprite;
import flash.events. *;

public class mouseScroller extends Sprite {}

public void mouseScroller() {}


function runF(e:Event):void {}
var mX:Number = mouseX;
var my: number = mouseY;

If (my < 200 & & my > 100) {}
trace ("Y" + my);
FOR X
If (mX < 100) {}
trace ("minus" + mX);

} ElseIf (x > 100) {}
trace ("greatest" + mX);
} else {}
trace ("100" + mX);
} / / END
This.parent.test_mc. Visible = false;
} / / End if statement

} //end of function F
addEventListener (Event.ENTER_FRAME, runF);
} / / end of function main mouseScroller
}
}

I took the liberty of making a few changes:

Script code:

var myMouseScroller:mouseScroller = new mouseScroller();
unless the option access the objects of the ancestor

you no longer need to add to the display list

addChild (myMouseScroller);

myMouseScroller.target = my_mc;

Your mouseScroller.as:

package {}
import flash.display.DisplayObject;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events. *;

public class mouseScroller extends Sprite {}

public void mouseScroller() {}
  
addEventListener (Event.ENTER_FRAME, runFunc);
}

public var target: DisplayObject = null;
function runFunc(e:Event):void {}
  
If (target == null) {return ;}
Contains the coordinates of the mouse
var mX:Number = mouseX;
var my: number = mouseY;

If (my<200&&mY>100) {}
Maintains the speed of Horiz. Movement
var hRateD:Number = target.x - 2;
var hRateI:Number = target.x + 2;
var hRateDF:Number = target.x - 4;
var hRateIF:Number = target.x + 4;

If (mX<250 &&test3_mc.x="">300 * /) {}
If (mX > 150) {}
Target.x = hRateD;
test2_mc.x = test2_mc.x - 2;
test3_mc.x = test3_mc.x - 2;
} else {}
Target.x = hRateDF;
test2_mc.x = test2_mc.x - 4;
test3_mc.x = test3_mc.x - 4;
}
} ElseIf (mX > 350 / * & test_mc.x)<300*>
If (mX<450)>
Target.x = hRateI;
test2_mc.x = test2_mc.x + 2;
test3_mc.x = test3_mc.x + 2;
} else {}
Target.x = hRateIF;
test2_mc.x = test2_mc.x + 4;
test3_mc.x = test3_mc.x + 4;
}

}
} / / End if statement

} //end of function F
}
}

Tags: Adobe Animate

Similar Questions

  • How to access the textedit files in Icloud on time machine

    Hi all

    Bad, I need your help! I'm trying to access all my text edit files, which I had saved on ICloud.
    My laptop does not run successfully. I was proposed to restore and re - install the op system. So I run a Machine back up full time and I restored my laptop. I should all have backed up, right?
    Problem is: I'm trying to get all my work on Tex Edit, but I can't find it on Time Machine. Does anyone know how can I recover these files? I have two important years of drafting work there!
    It would be good to have your suggestion.

    Thanks in advance for your help

    Did you you save the files in the correct format - OS X Server: how to modify the configuration files - Apple support?

  • How to access the class of an Actionscript object

    Hello

    I'm trying to access the class of an Actionscript object as the Java method getClass().

    example:

    I have this class with a method "myMethod(clazz:Class)".

    public class Class2
    {
         ... 
         public function myMethod(clazz:Class):void
         {
           ...
         }
    }
    

    This other class:

    public class Class1
    {
        var class2:Class2 = new Class2()
    
        public function otherMethod(obj:Object):void
        {
              class2.myMethod(obj.????);
        }
     }
    

    Perhaps is it not possible?

    Thank you

    vdelbart

    There is no native to retrieve method class of an object, but this utility function should work for you:

    import flash.utils. *.
    import flash.system.ApplicationDomain;

    function getClass(o:*, appDomain:ApplicationDomain=null): Class
    {
    If (o == null | is a class o) {return o ;}

    result: var class = null;

    Try
    {
    var cName:String = flash.utils.getQualifiedClassName (o);
     
    If (appDomain! = null)
    {
    try {}
    result = appDomain.getDefinition (cName) class;
    }
    catch (err2) {result = null ;}
    }
    If (result is nothing)
    {
    Result = flash.utils.getDefinitionByName (cName) class;
    }
     
    }
    catch (Err) {result = null ;}
    Finally {}
    return the result;
    }

  • How to access the photo files in the Finder?

    I just updated my system to the picture and I can't access my images in the Finder - the show in Finder option file is not available. What should I do?

    The new Photos.app does not reveal the photos managed in the Finder, like iPhoto does.

    You can only reveal image referenced in the Finder, you manage yourself and have not been copied to the photo library.

    If you want to access the original image files that you have imported, use "file > export" save a copy on your desktop.

    The management of the files of origin in the Photos is much more complicated than in iPhoto, so it make much sense to reveal the originals. Photos can simultaneously have several copies of them--in the masters, in iCloud folder or in a folder with temporary items. And if you use "Optimize Mac Storage", there may be no files to reveal to all, because the only copy will be in iCloud and not on your Mac.

  • How to access the CSS files for the plugin Enkitec-database file directory navigation bar

    Apex 4.2.3.00.08

    Enkitec-NavBar-1-2-0-for-4-2

    Hi I am faced with the same question that: https://community.oracle.com/thread/2563229

    Enkitec vertical list Navbar appears momentarily until it is formatted by CSS and it seems OK.

    It is really annoying and makes pages look stupid. This problem is identified as a performance problem and can be solved by putting the support of Plugin files in directories of files instead of the database.

    I created a directory on the database server: D:\102175\Kav\Plugin

    I created a Directory pointing to the file directory database:

    CREATE or REPLACE directory PLUGIN AS "D:\102175\Kav\Plugin".

    GRANT READ THE PLUGIN DIRECTORY TO THE PUBLIC;

    GRANT READ THE PLUGIN DIRECTORY TO ANONYMOUS.

    GRANT READ THE PLUGIN DIRECTORY FOR UTVIKLING.

    I also copied the CSS etc support plugin files in the files directory.

    In the Apex plugin I changed the prefix 'file' #PLUGIN_PREFIX # D:\102175\Kav\Plugin

    Now all the Navbar formatting disappeared and now the navigation bar appears only in form of vertical list.

    I also tried to use the PLUGIN as 'File prefix' same thing.

    I'm not Apex or Web expert so I'm sure there is something that I misunderstood.

    Hope some of you are able to help out me.

    Sincerely

    Arild

    Hmmm, well it does not matter if you do the mapping. The embedded PL/SQL gateway is well integrated in the database in PL/SQL.  All your resources (images, CSS, javascript, etc.) are still be extracted from the base in order to be served to the client. Those in the file system are not in use after installation.

    This is going to be heavy.

    I think you may still be able to make some optimizations by moving the assets of plugin for a name that is mapped by the gateway.

    In your apex installation, take a look at apxldimg.sql see how records and assets are added.  You can then add the plugin files.

    See if that helps.

    In addition, you can follow the comments of Patrick on the post you are referencing and move the inclusion of files to the top of the page AND change the plugin so it does ' t add any more files.  Now in theory, you can skip the download folder and the image and add the plugin assets as standard apex post and reference them with #WORKSPACE_IMAGES # #APP_IMAGES, or # (if you add specifically for an application). But you still want to include them at the top of the page.

    Sorry... I know it's a lot of things to take and much heavier than expected.

    Thank you

    -Jorge

  • How to access the PHP files

    Need to access PHP (.ctp) files with Dreamweaver and SEO attributes.  For example, wanting to "Insert" Meta Keywords.  The files accesses I have these fields 'greyed out', they are not available.  Is there a particular configuration in Dreamweaver to access download to a Web site with shirts programmed into the cake (.) PHP)


    Using DreamWeaver on Mac OSX 10.9.4

    You do not have my point. Dreamweaver can work with PHP, but files not files of CAKE.

  • How to access the files from google docs?

    Hello

    can someone tell me how to access the mp3 files saved on google docs.

    as I am able to recover google docs docs files.

               connection = (HttpConnection) Connector.open("http://docs.google.com/feeds/documents/private/full/-/document");
                connection.setRequestMethod(HttpConnection.GET);
                connection.setRequestProperty("Authorization", auth);
                connection.setRequestProperty("Content-type","application/atom+xml");
    

    but the mp3 files do not appear in the xml only doc files are listed?

    any idea how to get mp3 files?

    Thankx

    @Sannyo: agree with you.

    I also saw that. This is only the docs.

    ------------------------------------------------------------------------------------
    Kudo press to say thank you to the developer.
    Also, press accept it as a button when you got the Solution.

  • How to access the info in my iCloud account

    How to access the info in my iCloud account?

    You can access much of the iCloud.com on a computer or through specific applications on your mobile device such as contacts, calendars, iCloud Drive, Photos. What exactly you were looking for and what type of device.

  • How to access the bios?

    I am trying to install a new OS, how to access the bios on my HP Pavilian dv8?

    Hello:

    You should be able to access the BIOS by pressing the F10 key as soon as you see the HP welcome screen.

    Paul

  • How to access the BIOS on a Pavilion Elite e9237c with mouse and keyboard wireless?

    I have a desktop computer Pavilion Elite e9237 with a wireless keyboard and mouse. I tried to access the BIOS by pressing F10 at startup with no luck, and I can't access any of the other menus for the start-up eiither. I don't have a PS/2 port on my computer, so I can't get a wired keyboard and mouse. Does anyone know how to access the BIOS with this configuration?

    I bought a USB keyboard and he answered in the same way... No bios access. I then studied why it did not work and discovered that it was the way in which he has been connected to the computer. I had initially plugged into a USB hub when he was not working and I moved it directly into a USB port and it works! I plugged my keyboard wireless directly into the USB port and it works too! Thanks for your help... I wouldn't have thought of it if it wasn't for to recommend you the USB keyboard.

  • How to access the firefox on laptop Office keeping all the features?

    How to access the firefox on laptop Office keeping all tabs and bookmarks?

    Hello

    You may be able to do this in Firefox Sync configuration on both devices. Please see for detailed instructions.

  • Qosmio G30-126 - how to access the bios!

    I have a laptop Qosmio G30-126 and I don't know the key to enter the bios to change real estate for the HARD drive or something... then how to access the bios? What is the key for the bios?

    Hello

    Try pressing the F2 key by turning on the device.
    The Toshiba notebooks supported the ESC and then F1 button
    If these two options are possible

  • Re: How to access the BIOS on Satellite Pro A120

    Can someone tell me how to access the BIOS on my SAT Pro A120?

    Hello

    You must press ESC and then F1 key immediately after the laptop has been powered!

    The laptop seems to be to use the Toshiba BIOS and ESC key should be the right one!

    Good bye

  • How to access the BIOS on Satellite A110-195 settings?

    How to access the BIOS settings (CPU, video memory ect). I have http://eu.computers.toshiba-europe.com/innovation/jsp/SUPPORTSECTION/discontinuedProductPage.do?service=EU&PRODUCT_ID=1 18639

    At the start when the Toshiba start screen appears press F2 repeatedly and you should be able to enter the BIOS settings.

  • How to access the BIOS on Satellite C50-A-1F

    Hey folk,

    A small question:

    How to access the BIOS of my laptop?

    I tried this method and f12, f1, f2 etc.

    Thanks in advance

    Have you ever tried to look for similar issues here in the forum?

    Check this one:
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=76740

  • HP laptop - 15-ac121dx: how to access the ram on a 15-ac121dx modules

    I want to upgrade the ram in my HP laptop - 15-ac121dx and maybe the hard drive, but I can't understand how to access the ram. There is no access panel, and unlike some other models, it doesn't have a single lever in the battery bay to remove the cover.

    OK, I realized how down low on the laptop.  After watching some youtube videos I came across another HP laptop computer who had screws under the rubber feet and of course there are also screws under the back of two rubber feet, can't believe I didn't think to look under them.

    To get the background you need to:

    1. Remove all the screws on the bottom.  (Must be 12 total)
    2. Remove the drive from DVD (Yes it does not).
    3. Finally, carefully separate the case around the side.

    After that, you should have full access to the slots of RAM and hard drive.

Maybe you are looking for

  • Re: Satellite A350D PSALME I want to upgrade the processor

    Hello I have a Satellite A350D-10Y PSALME with processor AMD Turion x 2 zm-80.I want to upgrade the processor with a powerful one.CPU witch is my motherboard/BIOS card is supported?(My motherboard is KTKAE) Best regards

  • HP 15n234sl: Notebook without a door to replace HD

    Hi all!I hope someone can help me! I would like to change the HD of my laptop, but I have a problem: my pc doesen't have a door of 'easy' to access (in spite of the RAM). So, how can I do? I have not found a tutorial on the web or any information abo

  • Issue image AVT

  • Unable to set password for user account on Windows XP

    Windows XP won't let me a password for my user profile. Its an admin profile and only on the computer. I went to change the profile and password and it gives me the icon of the hourglass for about 30 seconds, then he says that I did not meet the pass

  • "Access denied" for the administrator

    I have only my account (like my name and "Computer administrator") and the comments "the guest account is disabled. Even with that, I get "Access denied" when I try to delete the "System Volume Information" (has two verses in the archive according to