Tween and getting instance names problems

Hi, iv got these buttons animated using the inbuilt tween
function and am coding them like this:
function navOver(e:MouseEvent):void {
var page = MovieClip(e.currentTarget).buttonThumb;
var myTween16:Tween = new Tween(page, "y", Regular.easeOut,
0, -25, 0.35, true);
function navOut(e:MouseEvent):void {
var page = MovieClip(e.currentTarget).buttonThumb;
var myTween17:Tween = new Tween(page, "y", Regular.easeOut,
-25, 0, 0.35, true);
function navClick(e:MouseEvent):void {
var page = MovieClip(e.currentTarget).buttonThumb;
page.y = 0;
button.addEventListener(MouseEvent.ROLL_OVER, navOver);
button.addEventListener(MouseEvent.ROLL_OUT, navOut);
button.addEventListener(MouseEvent.MOUSE_DOWN, navClick);
but if i click on the button before the animation has
finished it ignores the
page.y = 0; code and does nothing. how can i fix this?
also im trying to get the instance name of a mc called
"home" using this code:
MovieClip(e.currentTarget) wich gives me the result
[object button_1]
and
MovieClip(e.currentTarget).instanceName returns
undefined
neather of which are the instance name.
i cant hardcode the function because its used on lots of
different mcs throughtout the flash file
thanks

if you want to send the 'page' back to the 0 position, you
might be better off declaring the tweens outside the method, in
this way you can control them in 'other' methods that aren't local
to where the assignment is made, for instance:
var myTween17:Tween;
then in the handler navOut, just 'assign' the tween:
myTween17 = new Tween( .. );
then in the navClick method you could call:
myTween17.stop();
myTween17.rewind();
and that should reset the clips position to 0
for your other question use:
MovieClip(e.currentTarget.name);

Similar Messages

  • Hi - for any photo, info in mountain lion shows a different file size than Photoshop does. I've tested with CS3 and CS6 and get the same problem. Doesn't happen with CS3 and OSX10.4 or any previous versions of Photoshop and OSX. Anyone know why?

    Hi - for any photo, info in mountain lion shows a different file size than Photoshop does. I've tested with both CS3 and CS6 on 10.8.2 and get the same problem. This doesn't happen with CS3 and OSX10.4 or any previous versions of Photoshop and OSX. Anyone know why?

    this one is actually a really rare symptom of a flaky connection to the ipod on a Windows PC. there's more going on in terms of hardware on nanos and 5th gens than in the earlier models ... so if the connection is flaky to precisely the right/wrong degree, itunes will see the ipod, but misidentify it as an earlier version of ipod.
    tracking down the cause of the flakiness can be tricky ... as you already know ...
    just checking. have you tried connecting with a different (known-good) USB cable? does that seem to have any impact on the rate of occurence of the problem?

  • Can I walk into an apple store and get my name engraved on the back of my ipad?

    II'm using my ipad for school and I don't want it stolen. Is there anyway I could go to an apple shop and get my name engraved on the back of my ipad for a decent sum of money? I live in Ireland and bought the ipad in PC world

    Having it engraved wont' stop it from being stolen. All it might do is make it easier to identify if it is.
    The best way to  work towards preventing theft is to be smart with your device. Don't ever leave it laying anywhere unattended....you're in the library, need to take a bathroom break, don't leave it on the table, put it in it's case/bag and take it with you or leave it in the custody of a friend.
    Be aware that it is a target for thieves and treat it accordingly. Treat it like you'd treat your purse or wallet.

  • How to get Host name and SQL Instance Name by T-SQL

    I am using SQL 2000, 2005 and 2008. I have few multi instances SQL servers. I would like to gather following information:
    Host Name
    SQL Instance Name
    SQL Version
    Server1
    Server1
    SQL 2000
    Server1
    Server1\ABC
    SQL 2005
    Server1
    Server1\XYZ
    SQL 2008
    Server2
    Server2
    SQL 2008
    Is there any way I can get it by T-SQL? Any help would be appreciated.
    Thanks
    Saumen 

    SELECT
    SERVERPROPERTY('MachineName') AS [ServerName],
    SERVERPROPERTY('ServerName') AS [ServerInstanceName],
    SERVERPROPERTY('InstanceName') AS [Instance],
    SERVERPROPERTY('Edition') AS [Edition],
    SERVERPROPERTY('ProductVersion') AS [ProductVersion],
    Left(@@Version, Charindex('-', @@version) - 2) As VersionName
     |
    Blog: MSBICOE.com |
    MCITP - BI, SQL Developer & DBA
    Hate to mislead others, if I'm wrong slap me. Thanks!

  • How to get instance name

    I was wondering if there was any way to get the instance name
    of the class to the class without having to pass it in when you
    create the instance of it. For example, so I can do this:
    var myObject:CustomClass = new CustomClass();
    and then the class knows whats its instance name being used
    is instead of having to do something like this:
    var myObject:CustomClass = new
    CustomClass("myObject");

    As I think I found out how to gnerate unique key form components passed to my method and afterwards be able to get this key by knowing the component.My code is following:
    public static String generateUniqueKey(Component c){
    String resultString="";
    String s = c.getAccessibleContext().getAccessibleComponent().toString();
    StringBuffer stringbuffer = new StringBuffer(s);
    if(!Character.isJavaIdentifierStart(stringbuffer.charAt(0))){
    resultString="a_";
    }else{
    resultString=resultString+stringbuffer.charAt(0);
    for(int j = 1; j < s.length(); j++){
    if(!Character.isJavaIdentifierPart(stringbuffer.charAt(j))){
    resultString=resultString+"_";
    }else{
    if (stringbuffer.charAt(j)=='$'){
    resultString=resultString+"s_";
    }else{
    resultString=resultString+stringbuffer.charAt(j);
    return resultString;
    Any suggestions on this. May this result in problems anywhere?
    Thanks

  • Get directory name problem

    hi all
    i use developer6i ,client/server mode,win2000
    i want to get directory name of my fmx files,
    for example if my fmx files are in this locatin ---> d:\xxx
    i want to get this path in runtime .
    is there any solution in form6i for my problem?
    if you have any idea or an example code for this problem
    please help me.
    i 'd really appreciate it .
    thanks
    shoja
    ([email protected])

    I am a bit curious why you need to do it. Do you want it for use in CALL_FORM, NEW_FORM, OPEN_FORM etc. If so, your application would be more portable if you omit the path altogether and rely on the configuration of the runtime environment to provide it.

  • Flash CC HTML5 Get instance names on click?

    I make escape games and often have lots of items in a scene each with flash instance names that on mouse over or mouse click make some event happen or some text is displayed.
    I'm using Flash CC and HTML 5 output and cannot get it to output the instance names in the log, is this not possible? Can anyone suggest an alternative method of responding to lots of movieclips/buttons etc
    Here's my test code:-
    //stage.enableMouseOver(24);
    var clicked = "";
    var clickedname = "";
    //NEED TO FIND OUT MOVIECLIP INSTANCE NAME??
    var key1 = exportRoot.key1
    //key1.name = "key1"
    //console.log(key1ref.name)
    stage.on("click", function (evt) {
        //clickedname = stage.getObjectUnderPoint(evt.stageX, evt.stageY)
        //clicked = evt.target
        clicked = evt.target
        console.log(clicked)
        //output result to log
        /*if (clicked == "key1"){
            console.log("clicked key 1")

    Thanks Ned, I really appreciate the help as I've been stuck on this seemingly obvious thing for a few days now and can't progress until I can figure it out...
    Basically using currentTarget it outputs this:-
    a {id: 24, _matrix: a, _rectangle: a, children: Array[1], canvas: canvas#canvas…}
    so comparing it to a name/instance name is not going to work ;-)
    using evt.target gets me this:-
    lib.key1 {id: 21, _matrix: a, _rectangle: a, image: img, x: -40…}
    so again useless, a reference to the key1.png in the library but not to the named instances placed on the stage!!
    Am I assigning the instance name correctly??
    var key1 = exportRoot.key1
    key1.name = "key1"
    Any help from anyone appreciated!!

  • Powershell to get instance name

    Hi,
    Not sure whether this is the forum to ask.I have a list of servers names and i need to get the instance names in below format.
    SERVERNAME\INSTANCE1
    The o/p of the script actually shows Servername,MSSQL$Instance name..Anyway to tweak this to SERVERNAME\INSTANCE1?
    $servers = get-content "C:\SQLCheck\machinelist.txt"
    $logfile = "C:\SQLCheck\sql-instances.txt"
    $logerrs = "C:\SQLCheck\sql-failures.txt"
    Echo "Server, Instance" >> $logfile
    ForEach ($server in $servers) {
    $instances = Get-WmiObject -ComputerName $server win32_service | where {$_.name -like "MSSQL*"}
    if (!$?) {
    Echo "$server - No SQL instance found" >> $logerrs
    Echo "$server - No SQL instance found"
    Else {
    ForEach ($instance in $instances) {
    if (($instance.name -eq "MSSQLSERVER") -or ($instance.name -like "MSSQL$*")) {
    Echo "$server\$instance.name" >> $logfile
    Echo "$server, $($instance.name)"
    Best Regards, Arun http://whynotsql.blogspot.com/

    Hi,
    Use the sqlcmd -L command:
    $SqlCmd = "sqlcmd -L "
    Invoke-Expression $SqlCmd
    sqlcmd Utility
    http://technet.microsoft.com/en-us/library/ms162773.aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Get instance name help

    Okay, I want to be able to click anywhere and get the
    instance name of any object. The kicker is this actionScript needs
    to be on the main timeline and not on the movieClip. In other
    words, if I have one movieClip on the stage named "my_MC". I want
    to be able to run the movie and when I click on the stage it will
    trace "_level10", but when I click on the first movieClip, it will
    trace its instance name "my_MC".
    I know that:
    this.onMouseDown = function() {
    trace(this);
    will give me the instance name of the stage or "_level10",
    but how do I make it identify the movieClip I'm clicking on without
    putting any script on the movieClip itself?

    You need to do something like this, since the generic parameters don't exist at runtime.
    public M createMInstance(Class <? extends M> clazz) {
      return clazz.newInstance();
    }I'm not very well versed in generics, so you may have to tweak it a bit, but the main idea is that you have to provide the Class object.

  • Listing objects and their instance names (of closed source SWF)

    I have an API for a flash player that I want to use, but it is closed source. I know I could try a decompiler but I need to see what it loads and what it's doing at runtime.
    I'd like to see the objects (and all their info) that it loads and has on stage along with thier instance names. I'd like to see what this SWF has/does so I can write my AS3 code accordingly... maybe add some additional event listeners.
    Is there any was to go about doing this? I know there's some AS3 commands to get this information but I dont know what they are. If you all could give me some hints at which commands would be useful that would be great.

    "I need to see what it loads"
    You can use Fiddles, Charles or Firebug to monitor traffic (what it loads).
    As for the rest of your question - good luck. Although it is possible to decompile swf of course, reverse engineering is an extremely complex time consuming task. In the majority of cases it is easier and faster to replicate functionality from scratch than to try to understand SWF's logic.
    Unless you know packages structure - there is no native way to figure out/access application domain.

  • Steps to troubleshoot and get past common problems with Audition

    When you encounter a problem with Audition, the following steps are often useful for getting past the problem and/or determining the cause of the problem:
    1.  Hold down SHIFT while you launch Audition
         This overrides the preference files and launches Audition using the default settings.
    2.  Manually rename or delete the preferences folder
         Step 1 only overrides certain preference files, while others such as Workspace preference files, may be the cause of the problem.  Depending on your OS, locate the "5.0" folder in the location below and rename it or delete it.
         Windows XP: C:\Document and Settings\<username>\Application Data\Adobe\Audition\5.0\
         Windows Vista/7: C:\Users\<username>\AppData\Roaming\Adobe\Audition\5.0\ *
         Mac OS X: ~\Library\Preferences\Adobe\Audition\5.0\ **
              * "AppData" may be a hidden folder.  You can type it into the location bar, or enable "Show Hidden Files" in Windows.
              ** This is your user-level Library folder, not the system-level tree.
    3. Check your Audition Log.txt file
         To enable a log file with CS 5.5, you must create an empty file in your preferences folder called "Audition Log.txt" using notepad, text edit, or any other editor.  After you create this file, launch Audition and if it fails, open and/or share the log file for more specific information about what's happening.
    4. Check the Operating System console or error log
         Both OS X and Windows can track application errors, and if the problem is occurring outside of the application code - a driver conflict, for example - then the OS error report may be more informative than what we can get from the application.
         OS X: launch /Applications/Utilities/Console.app   Clear the view, then launch Audition and note any error messages that appear.
         Windows: launch Control Panel > Administrative Tools > Event Viewer > Windows Logs > Application then launch Audition and note any error messages that appear.
    5. Re-install Audition
         If at this point, nothing has resolved the issue or the error logs are inconclusive, it's a good time to uninstall Audition, reboot, and reinstall Audition.
    6. Obtain the full crash dump and send it to the Adobe team
         So you've walked through all the above steps, you've disconnected any external hardware interfaces to rule out any device or driver conflicts, and you've exhausted the basic troubleshooting steps.  Visit http://forums.adobe.com/thread/900619 and follow the steps for your OS that Charles has documented to best obtain a full crash memory dump for Audition, and send that to [email protected] with a description of the problem and the steps you've taken, and we'll take a look. 

    Firstly yes these are common problems and secondly hopefully they will be fixed with updated software 2.1 which is due for release this coming Firday!

  • Search a string with in some file and get the name of file

    i want to search a string in some files that are in a given directory and return the name of file having searched string.I am doing this with grep command as given below
    import java.io.*;
    public class linux_java {
    public static void main(String[] args) {
    try {
    String command = "find . | xargs grep -l Resolv /data2/opt/jakarta-tomcat-4.1.24/webapps/Oa/BOG/*.txt";
    final Process process = Runtime.getRuntime().exec(command);
    OutputStream os= process.getOutputStream();
    System.out.println("out put stream= " +os);
    PrintStream stdIn = new PrintStream(new BufferedOutputStream(process.getOutputStream()), true);
    System.out.println("Return code = " + stdIn);
    } catch (Exception e) {
    e.printStackTrace();
    i dont know how to get the name of file that are return by the execution of command through process object. Please send the code for the same

    thanks for your suggestion....
    i change the code but now it is giving error as /usr/bin/find incomplete syntax....but i am giving the right syntax....
    please confirm whether the syntax is correct...
    import java.io.*;
    import java.util.*;
    public class linux_java {
    public static void main(String[] args) {
    try {
    //String command = "ls -alt";
    String command = "find /data2/opt/jakarta-tomcat-4.1.24/webapps/Oa/BOG -type f -exec grep -sl 'Aggarwal' {} \\; 2>/dev/null";
    ///grep -l System test/*java
    System.out.println(" the command is"+command);
    final Process process = Runtime.getRuntime().exec(command);
    InputStream is = process.getErrorStream();
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line="";
    System.out.println(" the BufferedReader is"+br.readLine());
    while ((line = br.readLine()) != null) {
    System.out.println(" the files are"+line);
    } catch (Exception e) {
    e.printStackTrace();
    }

  • Load external and give instance name

    I'm using this code to load and external swf, now how do I assign an instance name for it?
    var eventInitialLoader:Loader = new Loader();
    var eventInitialURL:String = parent['eventPath'+ie];
    var eventInitialRequest:URLRequest = new URLRequest(eventInitialURL);
    eventInitialLoader.load(eventInitialRequest);
    eventOdd_MC.addChild(eventInitialLoader);
    Thanks for helping!

    At some point in your code you must have a reference to the instance you want to remove, then you can just do:
    [instance].parent.removeChild([instance]);
    or set up an array:
    var instanceArr:Array = new Array();
    and when you load a new instance with the Loader, do:
    instanceArr.push(myInstance);
    and to access them:
    for (var i:uint = 0; i < myInstance; i++){
    var child = instanceArr[i];
    (do stuff with child)
    child.parent.removeChild(child);

  • Flash CS5 instance name problems

    I can't give instance names in my AS2 project. When I click on the Instance Name box it is locked. I can only give instance names to the text objects. Movie clips and buttons are locekd. Please Help

    Hey guys,
    I struggled with this too.
    It seems if you make a reference to it in the action script it allows you to set an instance of that name (basically. why would you need to set a name if there is no reference to it in the action script)
    e.g add something like
    mc_myMovieClipName.addEventListener(MouseEvent.MOUSE_OVER, myFunction);
    and you will be allowed to rename a new symbol of that name.
    (or change your existing references to your OLD movieclip name and you will be allowed to rename it)
    If there are 2 symbols on the stage and only 1 reference in the code. only 1 symbol will be allowed to be named and you will have to add...
    mc_myMovieClipName2.addEventListener(MouseEvent.MOUSE_OVER, myFunction2);
    to the code in order to name the second movieclip.
    Please let me know if this helps.

  • 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]);

Maybe you are looking for