How to adjust the path of a tween using actionscript

I'm a novice at Actionscript3 and would greatly appreciate an answer to what seems like a simple question:
Here's my project:
http://home.comcast.net/~samiri/director/mortals/amadoFlashPortrait/index.htm
Click on the gray scale frame images. A larger version of that image tweens out along the z axis. However it comes from 'somewhere else' not from 'within the frame.' How do I get the each larger gray scale frame image to look like it comes directly from the place where the user clicks (not to one side or the other)?
So I guess what I'm asking is how to adjust the path of the tween along the x and y axis using the actionscript code (below).
My method:
I'm using this line of code in my script:
var myTween:Tween = new Tween(mdImg, "z", Strong.easeOut, 300, 0, 1, true);
"mdImg" is the variable that holds the name of the hotspot clicked upon by the user.
I have the larger (faded edge) image positioned directly on top of the frame image and just kept invisible until the User clicks on the hotspot over the frame image.
Thanks much.

Thanks moccamaximum,
By "do your tweens manually" you mean to use the timeline to do frame-based tweening? That is an option but I'm wondering (as a newbie): Isn't it better to use actionscript to do animation since you have more control and it's time based rather than frame-rate based (and works better on low performance machines)? Just curious if I should be spending the time to learn actionscript or do it in the traditional way.
Thanks

Similar Messages

  • How 2 get the path of a file Using jsp

    how 2 get the path of a file Using jsp
    i have tried getPath...but i'm geting the error
    The method getPath(String) is undefined for the type HttpServletRequest
    any idea how 2 get the path of a file

    You need ServletContext#getRealPath().
    API documentation: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)

  • Newbie - how to change the color of a line using ActionScript?

    This must be the most basic question in the world, but I've
    been searching the documentation for an hour.
    All I want to do is to draw a line on the stage, and then
    change its color (or endpoint positions) dynamically using
    ActionScript.
    This is the 1st step to creating complicated dynamic
    animations... (No, I do not want to use the timeline, I want to do
    it dynamically.)
    Yet a line can't be an instance, so I'm confused -- how can I
    possibly do this? Is there some key concept I'm missing here?
    Thanks
    Michael

    AS2 required you to create your own function for doing
    primitive shapes. In AS3 that has changed and the graphics package
    includes not only the old AS2 drawing API but also has methods for
    doing squares, circles etc.
    If you are a VB programmer, my honest opinion is to leave
    your traditional OOP mindset at the door when using Flash.
    Actionscript is still in its infancy and although AS3 does really
    strive for OOP oneness, it isn't there 100% like VB is which has
    been around 20 years longer and gone through numerous additions
    etc. Whenever I learn a new language VB, PHP, C, AS, Java....I try
    my best to look at the language as its own identity. All language
    share similarities but they all have their own idiosyncrisies. Keep
    an open mind and you'll find what you need.
    Most of the seasoned guys here will also tell you that
    although the documentation is decent, you are better off going out
    and picking up a book on Flash 8/CS3 and another one on
    Actionscript. Familiarize yourself with the program that way.
    With your programming background, I'd recommend picking up
    Essential AS2 (or AS3) by Moock depending on your version of Flash.
    Also, if you are more interested in the programmatic side of Flash,
    why not look into Flex Builder and AIR. Since it is purely a
    programming environment (no Flash IDE), you'd be more
    comfortable.

  • How to adjust the scale of a graph using reference points?

    Hi,
    I'm working on some code to display data from a spectrometer.  I've got to the point of producing an energy vs. intensity graph, but I'm having some problems calibrating the x axis (energy).
    The customer wants to be able to insert filters with a cut-off at known energies, and use those points to work out what positions on the graph correspond to what energies.  In programming terms, I need to  let the user click on the graph at two points with known values, and use those points to recalculate the XScale multiplier and offset (I think).
    I've tried a few different things, and attached  by best attempt so far.  It's a simplified example, but I hope it captures enough of the problem to be useful.  I can't help thinking there must be a simpler way to do this.  Any suggestions?
    Solved!
    Go to Solution.
    Attachments:
    Graph Scaling Example.vi ‏24 KB

    What you have done is good. The only thing that I would have a problem whit is there is no visual response on the graph for the user. You can also do this with cursors. Let them slide cursors on to the two points. It is more visual and you can see where you have selected. I am not sure that it will be much easier than what you have done. You could also use a hybrid of the two methods and have the cursor move to the point that you have selected.
    Tim
    Johnson Controls
    Holland Michigan

  • How 2 get the path of a file

    how 2 get the path of a file Using jsp
    i have tried getPath...but i'm geting the error
    The method getPath(String) is undefined for the type HttpServletRequest
    any idea how 2 get the path of a file

    You need ServletContext#getRealPath().
    API documentation: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)

  • How to adjust the brightness of a second display connected to iMAC 2012  by Apple Mini DisplayPort to Dual-Link DVI Adapter?

    How to adjust the brightness of a second display (Dell 3007WFPHC 2560x1600 dpi) connected to 27 inch iMAC 2012 through thunderbolt port by an Apple Mini Display Port to Dual-Link DVI Adapter?

    Macs control computer by USB.  With a non-Apple display, you will have to use the brightness control on the display.

  • How to pass the "path" dynamically to KM navigation iView ?

    HI Experts.
    This is my issue:
    I have a WD Java iView, with a data table.
    In the same page, I have a KM navigation iview too.
    Conceptually, each row in this table, have some documents in a CM Repository asociated.
    This repository has subfolders for each master data in the table.
    (example: imagine a table with material master data, and a repository with a subfolder for each material,
    and inside of it, several unstructure documents about this material.
    Then, I need to call a KM Navigation iview when click a table row, passing parameters, in special the "path".
    I am using this code in my action (triggered from webdynpro iview)
         WDPortalNavigation.navigateAbsolute("ROLES://portal_content/com.stk.demos.folders.zz_demos/com.stk.demo.ch.TEST_CH/com.stk.demo.ch.Listar_Docs",
         WDPortalNavigationMode.SHOW_EXTERNAL, (String)null, (String)null,
         WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS, "test",
         (String)null, (String)null );
    Partially it works, the window open and show the navigation iview, but...
    in the root directory (or directory indicated in iView harcoded properties);
    But I need pass the path !
    How can I call that iView, dinamically using a parameter, the path (property ID: path)
    to the KM navigation iView, in order to open initially in a indicated path?)
    I have read this link
    http://help.sap.com/saphelp_nw04s/helpdata/en/c3/235a428a1e9041e10000000a1550b0/frameset.htm
    but, I still can't understand how to use this parameters.
    Thanks in Advance.
    Leandro.

    Hi Leandro,
    You can create your own proxy IView and then redirect it to KM Navigation IView.
    This way you can dynamically change the path.
    Check this to know about proxy IView:
    KM Document Iview Source Code
    /thread/190600 [original link is broken]
    Regards,
    Praveen Gudapati

  • How to get the Path of the WebDynpro page

    Hi All,
    Can any one say how to get the path of the JSPDynPage ina Portlet in Portal Application.
    Becoz i have to display that Page in another JSPDynPagee
    Thanks in Advance....

    Hi,
    You can call your JSPDynPage component by calling the URL as:
    http://localhost:50000/irj/servlet/prt/portal/prtroot/YourApplicationName.YourComponentName
    Check this:
    Calling portal component
    Greetings,
    Praveen Gudapati
    [Points are welcome for helpful answers]

  • How to get the path when i select a directory or a file in a JTree

    How to get the path when i select a directory or a file in a JTree

    import java.lang.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.HeadlessException;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Iterator;
    * @author Frederic FOURGEOT
    * @version 1.0
    public class JTreeFolder extends JPanel {
    protected DefaultMutableTreeNode racine;
    JTree tree;
    protected JScrollPane scrollpane;
    final static int MAX_LEVEL = 1; // niveau max de descente "direct" dans l'arborescence
    * Sous-classe FSNode
    * @author Frederic FOURGEOT
    * @version 1.0
    private class FSNode extends DefaultMutableTreeNode {
    File file; // contient le fichier li� au noeud
    * Constructeur non visible
    private FSNode() {
    super();
    * Constructeur par initialisation
    * @param userObject Object
    FSNode(Object userObject) {
    super(userObject);
    * Constructeur par initialisation
    * @param userObject Object
    * @param newFile File
    FSNode(Object userObject, File newFile) {
    super(userObject);
    file = newFile;
    * Definit le fichier lie au noeud
    * @param newFile File
    public void setFile(File newFile) {
    file = newFile;
    * Renvoi le fichier lie au noeud
    * @return File
    public File getFile() {
    return file;
    public JTree getJTree(){
         return tree ;
    * Constructeur
    * @throws HeadlessException
    public JTreeFolder() throws HeadlessException {
    File[] drive;
    tree = new JTree();
    // cr�ation du noeud sup�rieur
    racine = new DefaultMutableTreeNode("Poste de travail");
    // cr�ation d'un noeud pour chaque lecteur
    drive = File.listRoots();
    for (int i = 0 ; i < drive.length ; i++) {
    FSNode node = new FSNode(drive, drive[i]);
    addFolder(drive[i], node); // on descend dans l'arborescence du lecteur jusqu'� MAX_LEVEL
    racine.add(node);
    // Gestion d'evenement sur JTree (on �coute les evenements TreeExpansion)
    tree.addTreeExpansionListener(new TreeExpansionListener() {
    public void treeExpanded(TreeExpansionEvent e) {
    // lorsqu'un noeud est ouvert
    // on descend dans l'arborescence du noeud jusqu'� MAX_LEVEL
    TreePath path = e.getPath();
    FSNode node = (FSNode)path.getLastPathComponent();
    addFolder(node);
    ((DefaultTreeModel)tree.getModel()).reload(node); // on recharche uniquement le noeud
    public void treeCollapsed(TreeExpansionEvent e) {
    // lorsqu'un noeud est referm�
    //RIEN
    // alimentation du JTree
    DefaultTreeModel model = new DefaultTreeModel(racine);
    tree.setModel(model);
         setLayout(null);
    // ajout du JTree au formulaire
    tree.setBounds(0, 0, 240, 290);
    scrollpane = new JScrollPane(tree);
         add(scrollpane);
         scrollpane.setBounds(0, 0, 240, 290);
    * Recuperation des sous-elements d'un repertoire
    * @param driveOrDir
    * @param node
    public void addFolder(File driveOrDir, DefaultMutableTreeNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    addFolder(driveOrDir, node, 0);
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Recuperation des sous-elements d'un repertoire
    * (avec niveau pour r�cursivit� et arr�t sur MAX_LEVEL)
    * @param driveOrDir File
    * @param node DefaultMutableTreeNode
    * @param level int
    private void addFolder(File driveOrDir, DefaultMutableTreeNode node, int level) {
    File[] fileList;
    fileList = driveOrDir.listFiles();
    if (fileList != null) {
    sortFiles(fileList); // on tri les elements
    // on ne cherche pas plus loin que le niveau maximal d�finit
    if (level > MAX_LEVEL - 1) {return;}
    // pour chaque �l�ment
    try {
    for (int i = 0; i < fileList.length; i++) {
    // en fonction du type d'�l�ment
    if (fileList[i].isDirectory()) {
    // si c'est un r�pertoire on cr�� un nouveau noeud
    FSNode dir = new FSNode(fileList[i].getName(), fileList[i]);
    node.add(dir);
    // on recherche les �l�ments (r�cursivit�)
    addFolder(fileList[i], dir, ++level);
    if (fileList[i].isFile()) {
    // si c'est un fichier on ajoute l'�l�ment au noeud
    node.add(new FSNode(fileList[i].getName(), fileList[i]));
    catch (NullPointerException e) {
    // rien
    * Recuperation des sous-elements d'un noeud
    * @param node
    public void addFolder(FSNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    for (int i = 0 ; i < node.getChildCount() ; i++) {
    addFolder(((FSNode)node.getChildAt(i)).getFile(), (FSNode)node.getChildAt(i));
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Tri une liste de fichier
    * @param listFile
    public void sortFiles(File[] listFile) {
    triRapide(listFile, 0, listFile.length - 1);
    * QuickSort : Partition
    * @param listFile
    * @param deb
    * @param fin
    * @return
    private int partition(File[] listFile, int deb, int fin) {
    int compt = deb;
    File pivot = listFile[deb];
    int i = deb - 1;
    int j = fin + 1;
    while (true) {
    do {
    j--;
    } while (listFile[j].getName().compareToIgnoreCase(pivot.getName()) > 0);
    do {
    i++;
    } while (listFile[i].getName().compareToIgnoreCase(pivot.getName()) < 0);
    if (i < j) {
    echanger(listFile, i, j);
    } else {
    return j;
    * Tri rapide : quick sort
    * @param listFile
    * @param deb
    * @param fin
    private void triRapide(File[] listFile, int deb, int fin) {
    if (deb < fin) {
    int positionPivot = partition(listFile, deb, fin);
    triRapide(listFile, deb, positionPivot);
    triRapide(listFile, positionPivot + 1, fin);
    * QuickSort : echanger
    * @param listFile
    * @param posa
    * @param posb
    private void echanger(File[] listFile, int posa, int posb) {
    File tmpFile = listFile[posa];
    listFile[posa] = listFile[posb];
    listFile[posb] = tmpFile;

  • How to get the path of the image stored in sap??

    Hi All
    The problem is
    While making an entry in standard there is a field called documents through which we attach our images in sap.
    How to get the path of the image stored with the corresponding order so that the image can be displayed while we are creating a report.
    I know how to upload the image while creating a report using docking control.
    I am not able to get the path of the image stored...
    Please Help
    Thanks in advance..
    Pooja

    I am not aware of exactly which tables are used for storing the attached doc. details, but we have worked in the similar requiremnent.
    What you can do is .... before uploading the image to any order, try swich on the SQL trace ST05 and after upload switch off.
    The log will display what are the tables involved while storing the image. And you can easily find out the image location.

  • How to detect the path of Temp directory

    I am writing a class library which allows users to manipulate a database in the web server java applications/applets. In my logic the Application/Applet communicate with a CGI script/Servlet in the server and that do all the database handling. My objective is to make the Client independant from the Database Drivers, and to some restrictions and possible security threats that can arrice when accessing the database directly.
    99% of the work is done and now I am doing the fine tuning.
    My Problem:
    When the user downloading a blob object from the server database. each time the program read the blob it will get a new copy from the server. This is not good if the blob is large (few 100 megs) . So I am going to implement a cache system. but the problem is If I am caching in the memory it will not support large objects (Memory is a limited factor). So the preferance is use the Temperary files but I do not know how to detect the path to temperary folder.
    And my 2nd questions is are the applets allowed to write and read in temperary folder.

    The Java default temporary file path can be determined with
    System.getProperty("java.io.tmpdir")This is typically the same value as the os environment variable

  • How to know the path of file.

    i am facing a problem,i have prepared a jar file of an application, which should have a path-file in it & that path-file contains loaction from where applicatioin starts, and creates some file there. but i dont know loaction when i prepared the jar file.how to solve this problem.

    but it is not in my hand, My jar file will be used by a vendor to code a Servlet which will access the classes in the jar file. it cannot be solved by My jar file.
    My Question was
    I have to deliver a jar file which contains my classes. This jar file will be used by a vendor to code a Servlet which will access the classes in the jar file.
    One of the classes in this jar file is required to simulate a file-system (we call it "Repository"). Essentially, it creates a certain directory and reads-writes files into it.
    My problem is how to specify the path (i.e. directory location) of the "Repository". Following are the possibilities I could see :
    1. Hardcode the path in the java code - This is not desirable since we do not know it while I am preparing my jar-file.
    2. Create a properties file, put Repository.path=... as an entry and package it with the jar-file - The problem is that sine this properties file is packaged in the jar, it is read-only. Hence, it cannot be changed at runtime.
    I want to know what are the general approaches to this?

  • How to change the path of sysprep files that were copied to reference computer when i capture the image from reference.

    Dears ,,
    how to change the path that sysprep were copied to reference computer when i capture the image from reference.
    Should i modify some codes in LTIAPPLY.wsf? how to modify it?
    Thanks.

    Sysprep and capture has *Three* steps.
    1. Run sysprep on the local machine (easy).
    2. Copy WinPE down to the local machine so we can reboot into winpe for capture.
    3. Capture the drive in an *offline* state from within WinPE.
    What is most likely happening is that you are having problems with step #2. 100MB is *WAY* too small to copy down WinPE. By default MDT will make this System partition much bigger, 499MB. IF you install Windows 7 from the default media. IT will only create
    a 100MB partition.
    By default MDT 2012 Update 1 and greater *should* recover to a fallback drive with the OS on it, however if you are running older versions that might not happen correctly.
    If you are still having problems, copy your BDD.log file to a public share like OneDrive and copy the link here.
    Keith Garner - keithga.wordpress.com

  • How to change the path of the Transport

    HI all!
    I had the system of portal dev,qas,prd,I want to made the export folder of the dev point to the import folder of the qas.But how to change the path of the transport ?I change the file of the D:\usr\sap\dev\SYS\global\pcd\pcdStartup.properties,But it not useful.I think my type is not correct.Plz tell me the key.thanks very much!!!
    D:\usr\sap\dev\SYS\global\pcd\pcdStartup.properties,I changed:
    Transport Application
    Root directory for exporting transport packages
    #Pcd.TransportApplication.ExportRootDir=
    qas\Import
    Root directory for importing transport packages
    #Pcd.TransportApplication.ImportRootDir=${Pcd.Share}/Import
    Directory for temporary transport files
    #Pcd.TransportApplication.TempDir      =${Pcd.Temp}/transport
    Edited by: joecui on Nov 12, 2008 8:15 AM
    Edited by: joecui on Nov 12, 2008 8:16 AM

    Did you try to remove the "#" character before every line you changed?
    Save the file...
    Reload/Refresh it in the Portal...
    Try if that helps you.
    Cheers,
    Benjamin

  • How to change the path of MPLS

    How to change the path of MPLS core from one PE to the other PE with redundancy link? The IGP is OSPF and running MBGP among PE routers.

    Hi there,
    Load-balancing is applicable in MPLS as follows:
    If multiple equal-cost paths exist for an IPv4 prefix, the Cisco IOS can load-balance labeled packets. If labeled packets are load-balanced, they can have the same outgoing labels, but they can also be different. The outgoing labels are the same if the two links are between a pair of routers and both links belong to the platform label space. If multiple next-hop LSRs exist, the outgoing label for each path is usually different, because the next-hop LSRs assign labels independently.
    If a prefix is reachable via a mix of labeled and unlabeled (IP) paths, Cisco IOS does not consider the unlabeled paths for load-balancing labeled packets. (The load balancing is done only between labeled paths. This means that if an IP (unlabeled) and a labeled path have the same cost, only the labeled path is used to forward the packets.)
    HTH,
    Mohammed Mahmoud.

Maybe you are looking for

  • How to secure a PL/SQL procedure that is called from the web browser

    If you have ever seen the sample document management application, and tried to download a file that was stored in the system, you are probably familiar with the apex_util.count_click URL that is used to download the file. If you copy that URL and pas

  • Is there a way to burn multiple smart albums to DVD?

    I just finished shooting a wedding.  I have made a number of smart albums for Reception, Dance, Ceremony, etc... Now I would like to burn all of these albums onto one DVD to send to the client.  But I would like each album to be in its own folder on

  • ITunes songs not playing

    Hello, A few songs that I downloaded from iTunes are not showing up in my iTunes library. They are located on my desktop and when I try to play them, iTunes opens but nothing happens (the songs do not appear). When I try to play the songs using windo

  • Recording voiceovers in Premier Pro

    does anybody know how to record voiceovers in Premier Pro???? What do you use? On a mac?

  • VPN ASA inside Interface and ip pool are one same Subnet

    Hi Everyone, I have configured RA VPN full tunnel. Inside interface of ASA is Vlan1                    inside                 10.0.0.1        255.255.255.0   CONFIG ip local pool 10-pool 10.0.0.51-10.0.0.100 mask 255.255.255.0 Need to know is it good