Tween class and using variables

I'm having trouble using a variable as the 1st paramenter in
the Tween class.
// f2_mc is the name of the clip to be tweened
on (press) {
_global.mcName = MovieClip;
_global.mcName = f2_mc;
_root.setXposition();
function (setXposition) {
var moveIn:Object = new Tween(_global.mcName, "_x",
Strong.easeOut, 600, 50, 2, true);
moveIn.onMotionFinished = function() {
}

cl...
That was great! Works perfectly now. I never would have
figured out the (_parent.f1) thing. I worked for hours on it and
was about to adopt a new design approach. This makes it easy...
thanks a lot!

Similar Messages

  • File to file with out message mapping and using variable substitution

    Hi,
    Can any one send me a scenario where we can have file to file scenario with out message mapping and where i can use variable substitution.
    As of now i am using integrate configurations where i cant use variable substitution as the message does not reflect in integration engine. I need to populate time stamp between <filename><timestamp>.txt.pgp
    I am as of now using configuration scenario.
    The time stamp always writes before the last file extension.
    Let me know your thoughts?
    Thanks,
    Chandra.

    Hi Chandra,
    u can use the Variable substitution even without IR contents also(Mapping....).
    in the receiver communication channel just specify the path u want to access for a value...
    eg: filename                             payload:mt_name,1,records,1,name,1
    and in th file name give it as %filename%.txt... or vt ever ur requirement
    Babu

  • Is it possible to manipulate and use variables and parametres from a .dll converted progr. (C++) with a labview written progr.

    Hi fellows
    I got a program written in C++ and I want to comunicate with it and use some parametres and variables from it, to handle these with my labview written program.
    I just want to be shure if it is possible??
    Zamzam
    HFZ

    Hi Zamzam,
    You'll find an example at National Instruments\LabVIEW 8.2\examples\dll\data passing\Call Native Code.llb\Call DLL.vi
    Hope this helps
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • How to get class and use method on it

    Hi,
    class State {
            String name
            Enum expectedValue
            public State(String name,Enum expectedValue){
                this.name = name;
                this.expectedValue = expectedValue;
    In the same class I need to have a method that takes a String and it should return matching
    Enum value. Since  class already have the expectedValue my idea is to get the Enum class ( using that if possible) and
    the call get() on it see my example below;
    Example:
    expectedValue is HwState.UPGRADED;
        public HwState convertActualToStateType( String actual){
            return  HwState.get(Integer.valueOf(actual));
    How can I get the Enum class (HwState) ? And then use it e.g. HwState.get() ?
    //mike

    Oracle is not allowing to Pesonlize the Buttons.

  • Creating and using variables in LabView

    Hello. Apologies in advance for what probably is a trivial task, but I'm having problems grasping the concept of variables in the LabView environment.
    I'm using Motion to track the steps that a motor has traversed. I have an inkjet that I want to apply a quick burst only once for a pixel (which I defined the size). The problem is that the motor has to travel at such a slow speed that the inkjet is over the pixel for a while. With my current code, it will keep firing while over the pixel. So I want to store the last pixel number that the printer fired on so I can perform a compare to ensure that the inkjet will only fire once the current pixel is greater than the last-fired pixel.
    In a regular text-based coding environment, it's as easy as assigning a variable to store the pixel that the inkjet fired on, then constantly compare the current pixel location to that variable to know if it's still over the same pixel. I'm a bit of a loss trying to accomplish the same task using the graphical coding of LabView.
    How do I extract this value and store it for later comparison?
    Thank you and sorry again for a dumb question.

    I assume that you are doing this firing of inkjet at a particular pixel, using a loop ( more appropriately, while loop)
    One way to achieve this would be to use shift registers and case structure
    Insert a shift register for that loop
    initialize a pixel value (numeric) to that shift register
    On every iteration, perform comparison for 'greater than' with current pixel value/position  to value/position stored in shift register
    If the result of this comparison is true, use a case structur. In true case of case structure , fire your inkjet at that particular pixel and update your shift register to replace and store the current value
    If the result of comparison was false, do not perform any operation, just pass the shift register through false case without any modification
    A labVIEW code built on these lines would work fine for your application
    Showing a code snippet would have been a simpler and effective  way to explain this. but currently no LabVIEW installed on my system

  • Filter xml data Class and use pushView to populate List (Flex Mobile project)

    I am such noob so I apologize for my ignorance. Trying to learn and work at the same time but i'm stumped been searching and my understanding is not up to snuff just yet.
    I looked at the Mobile Shopping Cart that Adobe has little over my head to grasp and impliment but my project is similar without the cart option basically.
    I'm currently using a single view with 3 states
    <s:states>
    <s:State name="default"/>
    <s:State name="productView"/>
    <s:State name="detailsView"/>
    </s:states>
    Default state has a list that uses a xml file with categoryID number's that correspond with the main products xml file.
    Which when the item is selected it filters and updates the List on the productView and so on to the detailsView.
    Like this:
    Category -> Products-> Details
    I'm using a filterCollection from an .as Class file to complete this here is a small snipet.
    private function productService_resultHandler(event:ResultEvent):void
    var productsArray:Array = new Array();
    var resultData:XMLList = event.result..product;
    for each (var p:XML in resultData) {
    var product:Product = Product.buildProductFromAttributes( p );
         productsArray.push( product );
    products = new ArrayCollection( productsArray );
         products.filterFunction = filterForCategory;
         products.refresh();
    private function filterForCategory(item:Product):Boolean{
    return item.catID == selectedCategory;
    public function filterCollection(id:Number):void{
    selectedCategory = id;
         products.refresh();
    Project works great but incredibly slow on Mobile device iOS. In-between the states I have transition animations and it bogs right down.
    So I was trying to experiment by using pushView and basically do the same but utilize Flex's viewNavigator to see if it speeds things up but I can't get the filter function to push the filtered data to the newView component.
    Or I was thinking of trying to order the events such as seletedItem->transition->filtered Data it seems like it is all happing at once and the app just sits for 3 seconds before the state is updated.
    Any help appreciated or more info needed let me know. THX

    So I will solve this later.
    I was able to stick to the original project layout with states within views instead of view states. Ditched the transition Move effects averaging 1 to 2 seconds on all state changes.
    It is a really basic product view app that all files are local. I'm not super impressed at the first go but it works and into the First Project archieve's and will revisit it on version 2. Which will probably start soon. It's better than hello world!

  • How to make an object of inner class and use it ?

    Hi tecs,
    In my JSF application i have a need to make an inner member class in one of my bean class.
    How can i make the object of this class?(what should be the entry in faces-config)
    And there are text box and check box (in the JSP) associated with the elements of this inner class. What should be the coding in JSP so that elements in the JSP can be linked with the corresponding members of the inner class ?
    Plz help.
    Thnx in advance.

    Hi
    I am havin 10 text boxes in my application.
    But out of 10 , 3 will be always together(existence of one is not possible without the other two.)
    Now i want to create a vector of objects ( here object will consist of the value corresponding to these three boxes),there can be many elements in this vector.
    So i m thinking to make an inner class which have three String variables corresponding to these text boxes that exists together.
    What can b done ?

  • Using variable of one  class in another class

    what are the different ways in which we can access a variable defined in one class in some other class ,i am aware of making object of that class and using variable ,inheritance polymorphisms,is there any other way

    learnerpuneet wrote:
    i don't want to use objects of the respective class to access methods and variablesSo you've given up on OO already?
    Well okay, then declare everything static and you can use class names to access methods and variables.

  • Using java class and variables declared in java file in jsp

    hi everyone
    i m trying to seperate business logic form web layer. i don't know i am doing in a right way or not.
    i wanted to access my own java class and its variables in jsp.
    for this i created java file like this
    package ris;
    import java.sql.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class  NewClass{
        public static void main(String args[]){
            Connection con = null;
            ResultSet rs=null;
            Statement smt=null;
            try{
                Class.forName("com.mysql.jdbc.Driver").newInstance();
                con=DriverManager.getConnection("jdbc:mysql:///net","root", "anthony111");
                smt=con.createStatement();
               rs= smt.executeQuery("SELECT * FROM emp");
               while(rs.next()){
                String  str = rs.getString("Name");
                }catch( Exception e){
                    String msg="Exception:"+e.getMessage();
                }finally {
          try {
            if(con != null)
              con.close();
          } catch(SQLException e) {}
    }next i created a jsp where i want to access String str defined in java class above.
    <%--
        Document   : fisrt
        Created on : Jul 25, 2009, 3:00:38 PM
        Author     : REiSHI
    --%>
    <%@page import="ris.NewClass"%>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <h1><%=str%></h1>
        </body>
    </html>I wanted to print the name field extracted from database by ResultSet.
    but it gives error cannot find symbol str.
    please help me to find right way to do this.
    i am using netbeans ide.

    Very bad approach
    1) Think if your table contains more than one NAMEs then you will get only the last one with your code.
    2) Your String is declared as local variable in the method.
    3) You have not created any object of NewClass nor called the method in JSP page. Then who will call the method to run sql?
    4) Your NewClass contains main method which will not work in web application, it's not standalone desktop application so remove main.
    Better create an ArrayList and then call the method of NewClass and then store the data into ArrayList and return the ArrayList.
    It should look like
    {code:java}
    package ris;
    import java.sql.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class  NewClass{
        public static ArrayList getNames(){
            Connection con = null;
            ResultSet rs=null;
            Statement smt=null;
            ArrayList nameList = new ArrayList();
            try{
                Class.forName("com.mysql.jdbc.Driver").newInstance();
                con=DriverManager.getConnection("jdbc:mysql:///net","root", "anthony111");
                smt=con.createStatement();
               rs= smt.executeQuery("SELECT * FROM emp");
               while(rs.next()){
                nameList.add(rs.getString("Name"));
               return nameList;
                }catch( Exception e){
                    String msg="Exception:"+e.getMessage();
                   </code><code class="jive-code jive-java"><font>return nameList;</code><code class="jive-code jive-java">
                }finally {
          try {
            if(con != null)
              con.close();
          } catch(SQLException e) {}
          </code><code>return nameList;</code>
    <code class="jive-code jive-java">    }

  • New Flash8 Tweening Class?

    Hello Community,
    I have been using a pretty cool technique for controlling
    motion / alpha / scale of various instances on my stage with this
    technique where you read in the MX Tweening Class and then set up
    these variables that changes the motion / alpha / scale over time.
    And, if I place these variables into a function and call that
    function on an event (pushing a button, for example) the animation
    over time event happens. I cannot get this technique to work with
    (what appears new) the FP8 Tweening Matrix thingy.
    Below (first part) is some sample code of the old way, in MX,
    I did this:
    I cannot get something similar to this to work in Flash Pro 8
    (FP8) with these funky matrix thingies that this class is now built
    within.
    For example, I need to have these import (class) lines at the
    beginning, but then how do I create the same sort of animation in
    the function?
    import flash.geom.Transform;
    import flash.geom.Matrix;
    I guess, basically, what I am trying to ask here is: How do
    you create animation via the (what was formerly known as) the Tween
    Class in FP8?
    Any help/info would be appreciated.
    Thanks for your time,
    -john

    I agree with LuigiL ...you didnt set the variable fInt, so
    those wont work. I use the Tween class in Flash8 daily just
    fine.

  • Trying to pass parameters between GUI classes and methods

    Hi All.
    I have been working on a rather large final year project in college and it is getting close to the deadline. It looks as though I need to "tidy up" my code as it contains too many static methods, variables and other bad programming habits. My package consists of many different GUI's and classes. Up until now I have been calling different GUI's with guiName.NameOfMethod. I have been told this is bad practice so I am trying to fix this. Also instead of passing parameters correctly I have been creating static variables in my main class and using them. So for example if one class needed to pass a variable to the other I would first myGlobalVariable = X; in the first class. And then the second class can use this. This is also bad, right?
    So I guess im really just looking for a good example or tutorial on how to pass parameters between classes and methods, GUI if possible. Here is an example of how my GUI classes look:
    public class anotherGUI extends JFrame implements ActionListener {
            private JTextField a, b, c;
            private JButton button1, button2;
            JPanel p, p1;                   
            public anotherGUI() {
                LayOutAnotherGUI();
                setLocationRelativeTo(DnDMain.pictureArray[a]);
                setTitle("Example");
                setVisible(true);
                pack();     
            private void LayOutAnotherGUI(int c) {
         //GUI is layed out here     
            public void actionPerformed(ActionEvent e) {
                Object source = e.getSource();
                if (source == submit)
                    clickOK();
            public void clickOK(){
                //Here is where I have been accessing and modifying static global variables.  (But this needs to change).
    public void showanotherGUI() {
            new anotherGUI();
    }This is more or less how I have been going about creating my GUI's. These are used as pop ups. The user enters a value and then it is closed.
    To be honest I have been able to pass a variable correctly from one class to a GUI class but I have still having difficulty. For example in my code above I can pass the variable into this class but I cannot pass it into clickOK(). An this is where it is needed.
    Can anyone please help?
    I hope I have explained my problem well.
    Thanks in advance.

    I dont think that is what I need. An example of what I do in my program is:
    I have a main GUI with an array of images. There are a number of other small GUI's that appear for certain functions when the user clicks on an image or does some other function. I am trying to pass a value into the GUI class that is used for the smaller "pop up" GUI. So lets say the user has clicked the image in array[12]. Then a GUI is displayed. I need to pass the integer 12 into this class.
    Thanks.

  • Tween class - tweening from curent position

    Hi, I've been looking at the tween classes and I was
    wondering how I could use it to tween an object that i already
    placed on the stage? So using it's current position and tweening to
    a new position. Is there a way of doing it by simply using a term
    that flash understands (eg _xPosition)?
    Cheers
    Ray
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    new Tween(ball_mc, "_x", Elastic.easeOut, 300, 50, 3, true);
    new Tween(ball_mc, "_y", Elastic.easeOut, 100, 50, 3,
    true);

    I think I asked for help a little quick there.
    this._x
    it looks like that is what I was after.
    Ray

  • I want the Definitaion fo  Class and its Components  in ABAP . With Example

    Gowri

    <b>Classes</b>
    Classes are templates for objects. Conversely, you can say that the type of
    an object is the same as its class. A class is an abstract description of an object. You could say that it is a set of instructions for building an object. The attributes
    of objects are defined by the components of the class, which describe the
    state and behavior of objects.
    <b>
    Local and Global Classes</b>
    Classes in ABAP Objects can be declared either globally or locally. You define global classes and interfaces in the Class Builder (Transaction SE24) in the
    ABAP Workbench. They are stored centrally in class pools in the class library
    in the R/3 Repository. All of the ABAP programs in an R/3 System can access the global classes. Local classes are defined within an ABAP program. Local classes and interfaces can only be used in the program in which they are defined. When you use a class in an ABAP program, the system first searches for a local class with the specified name. If it does not find one, it then looks for a global class. Apart from the visibility question, there is no difference between using a global class and using a local class.
    There is, however, a significant difference in the way that local and global classes are designed. If you are defining a local class that is only used in a single program, it is usually sufficient to define the outwardly visible components so that it fits into that program. Global classes, on the other hand, must be able to be used anywhere. This means that certain restrictions apply when you define the interface of a global class, since the system must be able to guarantee that any program using an object of a global class can recognize the data type of each interface parameter.
    The following sections describe how to define local classes and interfaces in an ABAP program. For information about how to define local classes and interfaces, refer to the  Class Builder section of the ABAP Workbench Tools documentation.
    <b>Defining Local Classes</b>
    Local classes consist of ABAP source code, enclosed in the ABAP statements CLASS ... ENDCLASS. A complete class definition consists of a declaration part and, if required, an implementation part. The declaration part of a class <class> is a statement block:
    CLASS <class> DEFINITION.
    ENDCLASS.
    It contains the declaration for all components (attributes, methods, events) of the class. When you define local classes, the declaration part belongs to the global program data. You should therefore place it at the beginning of the program.
    If you declare methods in the declaration part of a class, you must also write an implementation part for it. This consists of a further statement block:
    CLASS <class> IMPLEMENTATION.
    ENDCLASS.
    The implementation part of a class contains the implementation of all methods of the class. The implementation part of a local class is a processing block. Subsequent coding that is not itself part of a processing block is therefore not accessible.
    <b>Structure of a Class</b>
    <u>The following statements define the structure of a class:</u>
    A class contains components
    Each component is assigned to a visibility section
    Classes implement methods
    The following sections describe the structure of classes in more detail.
    <b>Class Components</b>
    The components of a class make up its contents. All components are declared in the declaration part of the class. The components define the attributes of the objects in a class. When you define the class, each component is assigned to one of the three visibility sections, which define the external interface of the class. All of the components of a class are visible within the class. All components are in the same namespace. This means that all components of the class must have names that are unique within the class.
    There are two kinds of components in a class - those that exist separately for each object in the class, and those that exist only once for the whole class, regardless of the number of instances. Instance-specific components are known as instance components. Components that are not instance-specific are called static components.
    In ABAP Objects, classes can define the following components. Since all components that you can declare in classes can also be declared in interfaces, the following descriptions apply equally to interfaces.
    <b>Attributes</b>
    Attributes are internal data fields within a class that can have any ABAP data type. The state of an object is determined by the contents of its attributes. One kind of attribute is the reference variable. Reference variables allow you to create and address objects. Reference variables can be defined in classes, allowing you to access objects from within a class.
    <b>Instance Attributes</b>
    The contents of instance attributes define the instance-specific state of an object. You declare them using the DATA statement.
    <b>Static Attributes</b>
    The contents of static attributes define the state of the class that is valid for all instances of the class. Static attributes exist once for each class. You declare them using the CLASS-DATA statement. They are accessible for the entire runtime of the class.
    All of the objects in a class can access its static attributes. If you change a static attribute in an object, the change is visible in all other objects in the class.
    <b>Methods</b>
    Methods are internal procedures in a class that define the behavior of an object. They can access all of the attributes of a class. This allows them to change the data content of an object. They also have a parameter interface, with which users can supply them with values when calling them, and receive values back from them The private attributes of a class can only be changed by methods in the same class.
    The definition and parameter interface of a method is similar to that of function modules. You define a method <met> in the definition part of a class and implement it in the implementation part using the following processing block:
    METHOD <meth>.
    ENDMETHOD.
    You can declare local data types and objects in methods in the same way as in other ABAP procedures (subroutines and function modules). You call methods using the CALL METHOD statement.
    <b>Instance Methods</b>
    You declare instance methods using the METHODS statement. They can access all of the attributes of a class, and can trigger all of the events of the class.
    <b>Static Methods</b>
    You declare static methods using the CLASS-METHODS statement. They can only access static attributes and trigger static events.
    <b>Special Methods</b>
    As well as normal methods, which you call using CALL METHOD, there are two special methods called CONSTRUCTOR and CLASS_CONSTRUCTOR, which are automatically called when you create an object (CONSTRUCTOR) or when you first access the components of a class (CLASS_CONSTRUCTOR).
    <b>Events</b>
    Objects or classes can use events to trigger event handler methods in other objects or classes. In a normal method call, one method can be called by any number of users. When an event is triggered, any number of event handler methods can be called. The link between the trigger and the handler is not established until runtime. In a normal method call, the calling program determines the methods that it wants to call. These methods must exist. With events, the handler determines the events to which it wants to react. There does not have to be a handler method registered for every event.
    The events of a class can be triggered in the methods of the same class using the RAISE EVENT statement. You can declare a method of the same or a different class as an event handler method for the event <evt> of class <class> using the addition FOR EVENT <evt> OF <class>.
    Events have a similar parameter interface to methods, but only have output parameters. These parameters are passed by the trigger (RAISE EVENT statement) to the event handler method, which receives them as input parameters.
    The link between trigger and handler is established dynamically in a program using the SET HANDLER statement. The trigger and handlers can be objects or classes, depending on whether you have instance or static events and event handler methods. When an event is triggered, the corresponding event handler methods are executed in all registered handling classes.
    <b>Instance Events</b>
    You declare instance events using the EVENTS statement. An instance event can only be triggered in an instance method.
    <b>Static Events</b>
    You declare static events using the CLASS-EVENTS statement. All methods (instance and static methods) can trigger static events. Static events are the only type of event that can be triggered in a static method.
    <u>See also Triggering and Handling Events.</u>
    <b>Types</b>
    You can define your own ABAP data types within a class using the TYPES statement. Types are not instance-specific, and exist once only for all of the objects in a class.
    <b>Constants</b>
    Constants are special static attributes. You set their values when you declare them, and they can then no longer be changed. You declare them using the CONSTANTS statement. Constants are not instance-specific, and exist once only for all of the objects in a class.
    <b>Visibility Sections</b>
    You can divide the declaration part of a class into up to three visibility areas:
    CLASS <class> DEFINITION.
      PUBLIC SECTION.
      PROTECTED SECTION.
      PRIVATE SECTION.
    ENDCLASS.
    These areas define the external visibility of the class components, that is, the interface between the class and its users. Each component of a class must be assigned to one of the visibility sections.
    <b>Public Section</b>
    All of the components declared in the public section are accessible to all users of the class, and to the methods of the class and any classes that inherit from it. The public components of the class form the interface between the class and its users.
    <b>
    Protected Section</b>
    All of the components declared in the protected section are accessible to all methods of the class and of classes that inherit from it. Protected components form a special interface between a class and its subclasses. Since inheritance is not active in Release 4.5B, the protected section currently has the same effect as the private section.
    <b>Private Section</b>
    Components that you declare in the private section are only visible in the methods of the same class. The private components are not part of the external interface of the class.
    <b>Encapsulation</b>
    The three visibility areas are the basis for one of the important features of object orientation - encapsulation. When you define a class, you should take great care in designing the public components, and try to declare as few public components as possible. The public components of global classes may not be changed once you have released the class.
    For example, public attributes are visible externally, and form a part of the interface between an object and its users. If you want to encapsulate the state of an object fully, you cannot declare any public attributes. As well as defining the visibility of an attribute, you can also protect it from changes using the READ-ONLY addition.
    "Example  :
    CLASS C_COUNTER DEFINITION.
      PUBLIC SECTION.
        METHODS: SET_COUNTER IMPORTING VALUE(SET_VALUE) TYPE I,
                 INCREMENT_COUNTER,
                 GET_COUNTER EXPORTING VALUE(GET_VALUE) TYPE I.
      PRIVATE SECTION.
        DATA COUNT TYPE I.
    ENDCLASS.
    CLASS C_COUNTER IMPLEMENTATION.
      METHOD SET_COUNTER.
        COUNT = SET_VALUE.
      ENDMETHOD.
      METHOD INCREMENT_COUNTER.
        ADD 1 TO COUNT.
      ENDMETHOD.
      METHOD GET_COUNTER.
        GET_VALUE = COUNT.
      ENDMETHOD.
    ENDCLASS.
    The class C_COUNTER contains three public methods - SET_COUNTER, INCREMENT_COUNTER, and GET_COUNTER. Each of these works with the private integer field COUNT. Two of the methods have input and output parameters. These form the data interface of the class. The field COUNT is not outwardly visible.
    Reward   points  if it is usefull...
    Girish

  • HELP PLZ!! Array Button Menu that fades in/out content with Tweener or Tween Class...!!!

    OK.
    So I've been trying the last couple of days to make 2 different codes i had into one...
    The first on is using the Tweener class and everytime that I press a button it fades out the loaded content of the previous selection, waits for it to finish and then loads the content of the button pressed. Everything works fine with this part.
    The second code is the on that is using an Array to dynamicaly rollover, rollout and keep selected the buttons.
    It was also changing the content of the mc that everything is loaded on but without this fancy fade in - fade out...!!
    So i think its time for some code now...:
    Here are 2 different approaches:
    This is the code that uses the onMotionFinished of the Tween Class:
    var groupinfo:Array = [ {mc:about, toload:"mcHome"},
         {mc:service, toload:"mcService"},
         {mc:contact, toload:"mcContact"}];
    var activebtn:MovieClip;
    var holder1:MovieClip = _root.attachMovie("mcHome", "mcMain", 10);
    holder1._x = 0;
    holder1._y = 110;
    function doClick() {
    //          \/THE PROBLEM IS FROM HERE\/
         if (this != activebtn){
              var mcTween:Tween = new Tween(mcMain, "_alpha", Strong.easeOut, 100, 0, 1, true);
              mcTween.onMotionFinished = function() {
                   _root.holder1.attachMovie(this.p, "mcMain", 1);
                   var mcTween2:Tween = new Tween(mcMain, "_alpha", Strong.easeOut, 0, 100, 10, true);
    //          /\UNTIL HERE/\
         var prevbtn:MovieClip = activebtn;
         activebtn = this;
         this.gotoAndStop(FADEINSTOP);
         prevbtn.onRollOut();
    function init() {
       for (var element in groupinfo) { 
          // btn is a pointer to one of the nav buttons
          var btn:MovieClip = groupinfo[element].mc;      
          // have each button remember which library/mc it is supposed to load
          btn.p = groupinfo[element].toload;      
          // assign functions to each event
          btn.onRollOver = doRollOver;
          btn.onRollOut = doRollOut;
          btn.onRelease = doClick;
    init();
    And the Example:
    The onMotionTween code works ok with the tweening but doesn't change the movieclip.
    This is the code that uses the caurina Tweener Class with no onMotionFinished:
    var groupinfo:Array = [{mc:about, toload:"mcHome"},
                                {mc:service, toload:"mcService"},
                                {mc:contact, toload:"mcContact"}];
    var activebtn:MovieClip;
    var holder1:MovieClip = _root.attachMovie("mcHome", "mcMain", 10);
    holder1._x = 0;
    holder1._y = 110;
    function doClick() {
    //          \/PROBLEM FROM HERE\/
         if (this != activebtn) {
              Tweener.addTween(mcMain,{_alpha:0, time:1, transition:"easeOutQuart"});
              var holder2:MovieClip = _root.attachMovie(this.p, "mcMain2", 11);
              holder2._alpha = 0;
              holder2._x = 0;
              holder2._y = 110;
              Tweener.addTween(mcMain2,{_alpha:100, time:1, delay:1, transition:"easeOutQuart"});         
              mcMain = mcMain2;
    //           /\TO HERE!!!/\
         var prevbtn:MovieClip = activebtn;
         activebtn = this;
         this.gotoAndStop(FADEINSTOP);
         prevbtn.onRollOut();
    function init() {
         for (var element in groupinfo) {
              // btn is a pointer to one of the nav buttons
              var btn:MovieClip = groupinfo[element].mc;
              // have each button remember which library/mc it is supposed to load
              btn.p = groupinfo[element].toload;
              // assign functions to each event
              btn.onRollOver = doRollOver;
              btn.onRollOut = doRollOut;
              btn.onRelease = doClick;
    init();
    Other Example:
    The Tweener code works perfectly this first time but the second time removes the conent and does just the fade in.
    The code for the buton group i got it from                     here...
    Please could someone help me with this thing!!
    I think its a great piece of dynamic code if we can eventualy make it  work properly!!
    Thanksss!!!
    Shorten the code...  Left only the part that needs mod!!

    clbeech, Thank you but doesnt do anything either....!!It is a  bit usefull but... !!
    The problem is that the code cant give the "this.p" to the movieclip...
    Here is the mess i've made with few changes from your part... and alot of treces to wich detected that the this.p is can't get in the onMotionFinished function...
    its only the doClick function:
    function doClick() {
         trace ("---------vars after click----------")
         trace ("activebtnStart  "+  activebtn);
         trace ("this.p  OutPre:  " + this.p);
         if (this != activebtn){
              trace ("mcMainAlphaBefore:  " + mcMain._alpha);
              trace ("mcMainBefore:  " + mcMain);
              var mcTween:Tween = new Tween(mcMain, "_alpha", Strong.easeOut, 100, 0, 1, true);
              mcTween.onMotionFinished = function() {
                   holder["mcMain"].removeMovieClip();
    //               trace ("mcMainStart:  " + mcMain);
    //               trace ("mcMain2Start:  " + mcMain2);
    //               trace ("mcMainAlphaStart:  " + mcMain._alpha);
    //               trace ("mcMain2AlphaStart:  " + mcMain2._alpha);
                   trace ("this:  " + this);
                   trace ("this.p  Pre:  " + this.p);
                   holder.attachMovie(btn.p, "mcMain", 1);
                   holder.alpha = 0;
                   trace ("this.p  After:  " + this.p);
    //               mcMain = mcMain2;
                   new Tween(mcMain, "_alpha", Strong.easeOut, 0, 100, 10, true);
    //               mcMain._alpha = 100;
    //               trace ("mcMainEnd:  " + mcMain);
    //               trace ("mcMain2End:  " + mcMain2);
    //               trace ("mcMainAlphaEnd:  " + mcMain._alpha);
    //               trace ("mcMain2AlphaStart:  " + mcMain2._alpha);
         trace ("this.p  OutAfter:  " + this.p);
         var prevbtn:MovieClip = activebtn;
         activebtn = this;
         this.gotoAndStop(FADEINSTOP);
         prevbtn.onRollOut();
         trace ("this.p  "+  this.p);
         trace ("this  "+  this);
         trace ("prevbtn  "+  prevbtn);
         trace ("activebtn  "+  activebtn);    
    Pfff.....
    I think its best to Attach the .fla!!
    Please have a look on it if you have anytime..!!
    Thanks for your interest..

  • Java Class and SuperCLass

    I have a super class: public static class StructClass(){} // this is empty
    Now a class is declared which is extends a Structclass:
    public static class myStruct extends structClass {
          public DV v1 = new DV(..);
          public DV v2 = new DV(..);
          public myStruct(DV v1copy, DV v2copy) {
                 v1 = v1copy;
                 v2 = v2copy;
    }DV is a class object I have created.
    Now I am declaring a myStruct variable:
    DV myS = new DV(4, "shared", (structClass)new myStruct(DV.Constant(1), DV.Constant(2)));
    This DV is different. The DV function is:
    public DV(int vtype, String scope, structClass value) {
          DVStructVal = new StructClass();
          DVStructVal = value;
    }This is compiling fine. I need the super class to generalize the DV function for different classes like myStruct classes declared. But, this way I cannot access the class variable.
    I am trying: myS.DVStructVal.v1. I am getting the error that v1 does not exist. myS.v1 is also not working. Does this mean DVStructVal is just a structClass and not myStruct. How can I access v1 and v2?
    Any help will be appreciated! Thanks!
    Kajari

    kajarigd wrote:
    Thanks for your reply. But I need a generalized class. The DV class is needed. I am supposed to declare different classes like myStruct class and use the same DV class for them. Can you help me with that?
    Thanks!
    KajariWithout really knowing your design (and from what has been posted so far, it feels like there's probably much improvement to be made), I can tell you this.
    myS.DVStructVal.v1 is not valid, since (as already mentioned), myS.DVStructVal is of type StructClass, which does not have a v1 member.
    But since you know that it is actually referencing a MyStruct object, you can cast it, like this:
    ((MyStruct)myS.DVStructVal).v1
    By the way, this is a little wasteful:
    DVStructVal = new StructClass(); // this is a waste, because...
    DVStructVal = value; // ... here you're just throwing away the previous object creation
    Just get rid of the first line.

Maybe you are looking for

  • No Archiver Stuck on 11g

    Hello. I am trying to "achieve" a archiver stuck situation on an Oracle 11g installation (running SAP ERP 6.0). However i am unable to make the database hang, something that is straight-forward with 10g. I have browsed some documentation for 11g with

  • Another Question...rotating on two axis

    Hi again. Well I have yet another question...how do I set a translation to rotate on two axis? Like I know that I can do: TransformGroup tg; Transform3D t3d = new Transform3D(); t3d.setRotation(new AxisAngle4f(1f,0f,0f,(some angle))); tg.setTransform

  • I have Downloaded Yosemite, It doesn't work correctly

    I downloaded Yosemite and now mi iMac is screwed up. The graphics are jerky and it won't play videos, but plays the audio for it. The whole system is jerky!

  • Firefox menu displaying incorrectly

    The menu appears to have a strange white box in the corner, see screenshot. I have reinstalled firefox to no avail. Running Windows 7, firefox RC1 however have had this problem in beta. http://i.imgur.com/sDePb.jpg

  • New computer with ipad2. old computer broken.how can i backup the data?

    old laptop broken. how can i input the data to new labtop with new itune?