Using TOUCH_BEGIN and GESTURE_SWIPE on same item

I have a mc that I want to react differently depending on how it's interacted with.  For example, if you hit it real fast (TOUCH_BEGIN) I want it to gotoAndPlay(2);  but if you are swiping and it get's touched in the swipe (GESTURE_SWIPE) I want it to gotoAndPlay(10);  I got the first part to work, but when I added GESTURE_SWIPE, the TOUCH_BEGIN call doesn't seem to work anymore.  How do I use both methods on the same mc? 

You need create a personalized gesture
var posX:Number;
var PosY:Number;
var tolerance:int=10;
mc.addEventListener(MouseEvent.MOUSE_DOWN, onTouch)
Fucntion onTouch(e:MouseEvent):void{
     //Campoture the initial position of the Touch
     posX=mouseX;
     posY=mouseY;
     stage.addEventListener(MouseEvent.MOUSE_MOVE, swipOrBegin)
function swipOrBegin(e:MouseEvent):void{
     mc.removeEventListener(MouseEvent.MOUSE_MOVE, swipOrBegin)
     if(posX<mouseX+tolerance || posY<mouseY+tolerance || posX-tolerance<mouseX || posY-tolerance<mouseY){
     //TOUCH_BEGIN
     }else{
     //GESTURE_SWIPE
function to init the

Similar Messages

  • How to use image and text in same component

    Hello
    Do you know how to use image and text in same component in java ?
    because i need this in my project ,which is chat application , to
    put the received text and any image if it is need within the text

    thanks levi_h
    JTextPane class extends JEditPane and allows you to embed
    images or other components within the text managed by the component

  • Is there a way I can stream video from my 2012 AirMac to the Apple TV using airplay and at the same time stream the audio to an air speaker?

    Is there a way stream video from a 2012 MacBook Air to a TV using Apple TV and at the same time steam the audio to an air speaker. Also the same question but using an ipad

    You can try one thing. Follow these steps:
    1. On your Mac, turn on AirPlay Mirroring and connect it to the Apple TV, so audio and video will stream from the Apple TV.
    2. Turn off the sound of the TV where you have connected the Apple TV.
    3. Then, make sure that you have turned on the AirPlay speakers. Then, open System Preferences > Sound > Output, and choose the external speakers, so sound will stream from these external speakers.
    This should work correctly

  • I cant use photoshop and illustrator in same time....

    Hello!
    I have CS3 and i´ll try run photoshop and illustrator in same time. If i run first photoshop then illustrator not work and if i run illustrator then photoshop not work. :-/ What i pose to do??
    PC:
    AMD FX (Six-core)
    Memory 8G (XP 32bit -> ~4G)
    Thanx anyway!

    Read this probably the scratch disk you haqve is too full, and you will have to select a scratch disk that is not fragmented and has plenty of room to work. The scvratch disk is storing the various undo states for both Photoshop and Illustrtor.
    Illustrator has unlimited undos so that takes up a lot of scratch space if you do complex art work with many points being employed to create the art and Photoshop will do the same if you are using very high resimages with many layers.
    And in 32 bit the amount of RAM is limited which puts a strain on the scratch disk so it has to bve very large if you want it to work for you.
    This is what I recommend to you go 64 bit get another 8 GB of Memory at least and get a hard drive you can use as a swcratch disk that will not have any files on it or that you can partition to have a large amount of free space.
    You will have to read a little bit but you can start here:
    http://helpx.adobe.com/photoshop/kb/optimize-performance-photoshop-cs4-cs5.html#main_Memor y_Usage
    I am on a Mac myself and have 24GB of memory and feel I could still use anoter 8GBs but I do some motion graphics as well.
    Nut if you do a lot of Illustrator and Photoshop that can be just as big a drain on your resiources.

  • Use wire and wireless at same time

    My computer has wire and wireless network devices  together. Also I am using two WRT54G routers that one is conneted internet at next door and the other is in my office. Wire network is used to use internet and wireless is connected to use DVR(Digital Video Recorder). I know if I use one router with internet and DVR together, I wouldn't have any problem, but now I can't do that.
    When I enable both network device, I can't use internet because the default is wire one which isnt' connect with internet. That's why I have to disable wire when I use internet.
    What I ask you is I want use both at same time. That means when I want use internet, wire would be worked. Using DVR has no problem because wire is default.
    How can I reach my goal?

    How did you connect the two WRTs?

  • Satelitte C55-A Can't Use Keyboard and Mousepad at same time

    How do I change the settings so that I can use them both at the same time? I use them both for all my games, but I can't turn with my mouse pad when im walking with my keyboard keys (W,A,S,D). Does anyone know how to change this?
    I'm on Windows 8 btw.
    Thanks,
    -Evan

    There should be a setting for that in Mouse Properties, Evan. Something like "Disable touchpad while typing."
    Also, it's a "feature" of Windows 8.1.
       Button clicks for internal touchpads and pointing sticks are not responsive while or shortly after t...
    Windows 8.1 introduces a feature that is called accidental activation prevention (AAP). AAP helps ensure that unintended taps while you type on an integrated touchpad are suppressed. When this feature is enabled, taps and clicks from an integrated touchpad or pointing stick are suppressed for a while after the last keystroke..
    -Jerry

  • Follow-up question on BOM production and consumption of same item

    Awhile back, I asked the question about whether it made sense to have a BOM structured to simultaneously produce and consume an item.  BOM that needs to produce and consume same component
    Thanks for the help and it does what I thought it should.  We have a local difference of opinion on the consumption of primary components, though.  To attempt to ensure that we account for the bleed-off of materials into a vacuum system, we set up a BOM like this
    Material A    498.379
    Material B    332.253
    Material C     14.914
    Material D     22.371
    Material E     64.317
    Material F    103.570
    Material F     -35.804  (This is the quantity vacuumed away, treated as by-product.)
    to cover a recipe card structured like this
    Material A    481.150
    Material B    320.775
    Material C     14.400
    Material D     21.600
    Material E     62.100
    Material F     100.00
    The difference of opinion is whether to recognize the reclaimed material (Material F) at all on the BOM, with a minority saying that we will not consume (and therefore not order) enough of materials A through E.  They say that "you have to put the same amount of good ingredients in as you produce because it's a closed loop system".
    So the other approach would be a BOM like this
    Material A    534.252
    Material B    357.852
    Material C     15.840
    Material D     23.760
    Material E     68.310
    The  material reclaimed (Material F) is sourced not only from this particular vacuum system, but from other vacuum systems outside the blending operation.
    It seems to me that the first approach is correct, because we recognize consumption and production of the reclaimed item, and proportionately increase the component items to recognize that more are needed than will go out as good product.  Even the reclaim becomes reclaim.  The amounts vacuumed off seem to be consistent at 3.57%.
    Which approach is correct?

    Thank you for the reply.  The reclaimed material can be as much as 11% of the total material made.  Last year, over one million kilograms were worked back into the product as reclaim, and the metals are somewhat expensive (not like precious metals, but they are not trivial, either).
    Accuracy versus precision is always something to consider, but I think it's important enough to follow, especially because it is sourced from several processes.  The sourcing from the other sources means that the reclaimed material from those sources has already been reported as production of the primary product which consumes the virgin materials, so I think it should be re-introduced into the flow as a separate item (Material F)
    The primary argument I want to settle is the business about how we won't order enough component materials if we use the BOM that shows simultaneous production and consumption.  I think under the approach in which we ignore the reclaim, we will consume more components from the backflush location than we physically use and would then order too much material because of using a BOM that pulls only virgin materials.

  • How to use rule and send the same email to multiple recipents

    Hi,
    My requirement is to send the workitem to the multiple recipents. one of my reiend suggest me to use the rule but i don't know how to use that .
    can any one of you suggest me how to use rule in workflow.
    Also i want to send the same email to multiple recipent .how can i do it by using the multiline variable...please advice me with example if possible..
    Note :- Is it necessary to saparate the email id with comma or i will add all the email next one another..
    Please suggest.
    Thanks in advance ,
    Anand

    Hi Anand,
    I would suggest you first follow the guidelines of the forum and a little searching. One of your questions has been asked just a few threads below.
    Regards,
    Martin

  • I can't use PS3 and Laptop at same time ?

    OK I'm hoping although strange this might be a simple as changing a setting in my hub or laptop, here goes:-
    Like many housholds nowadays I have many things connected to my Hub, Desktop, Ipod, Phone, Sky, games machines,etc
    Well the problem I have, is when I stream Netflix or Amazon prime on my PS3 it buffers a lot or wont go HD for quite some time, no problem I switched to a wired set up, which helped with speed a lot, happily watching movies of an evening,
    then one evening, it kept saying it's taking a long time to sign in, and wouldn't, I re check my network settings, and it shows unable to obtain an ip address,
    so I set up the wirless again, and the same problem,
     anyway after a few nights of this, I get a bit fed up, then out of the blue, it works again, both wireless and when I switch back to wired,
    so I settle down to watch a film, fire up laptop, and after a few mins it flashes on my PS3 I have been disconnected, I peice things to gether and realise, when I have laptop on I cant connect PS3, even if laptop is wirless and PS3 wired ?.
    I assume they are both using the same ip ?, I deleted the laptop from my Hub in the hope it would assign another, fired up PS3, and then re booted laptop, but straight away it kicks out PS3.
    I have mooched arround in hub advanced settings, but I dont know what I'm doing, so not going to adjust anything, so if it is just a case of modifying my laptop or hub settings, if someone could instruct me I would be greatful, and if its not thought to be that HHEEEEEEEEEEEEEEEEEEEEEELLPP   Please
    Thanks in advance
    Chris
    P.S. I have searched the forums, there seems to be a lot of PS3 connection problems, but nothing that matches my particular problems

    No I'm afraid that didn't work either

  • Using Bridge and LR with same folders/files

    Having organized, edited and rated my photos using Bridge CS4 but recently started getting seriously into LR3 I still want to keep that file structure, either in a transitional period or indefinitely.
    I normally use Bridge to import the photos, then spend some time creating sub-folders (one folder per event), organizing them. I'm hoping that I can add those (already organized) folders into LR, but can't figure out how. I see how I can import the photos, but I don't want that as I want to keep them all in the same location (they're all organized on the hard drive as I want them), just have LR "see" them so I can further edit and rate them. How do I do that?
    I also want LR to understand and see the edits I've made to my RAW files as well as my ratings, keywords etc.
    Are there other things I should keep in mind when having my photos work with both Bridge and LR?

    It's possible to work the way you do, but with Lr it's a bit awkward, particularly if you start editing (developing) your images in Bridge.
    You ask: " I'm hoping that I can add those (already organized) folders into Lr, but can't figure out how."
    You have to import the images. Without importing nothing can happen in Lr.
    So, open the Import Dialog. If it shows only the small window of the Import Dialog, click on the triangle in the bottom left corner, to expand the window.
    On the left side you'll see the <Source> panel. navigate to the folder in question and click on it to select it. You will see all images in this folder in the main window of the Import Dialog.
    Then in the top center of the Import Dialog select <Add>.
    <Add> is for importing images that are already on the hard drive and you do not want to change their location.
    <Move> is for importing images that are already on the hard drive and you do want to change their location.
    <Copy> is for importing images from camera / memory card.
    By selecting <Add> Lr will import the images in their present folder and will display the folder.
    Your Bridge edits will also be imported because on import Lr reads the image file and the xmp-file where Bridge has stored the metadata of your edits.
    But this is true only for import. Should you then decide for an image that has been imported in Lr to edit it in Bridge again, these edits would not automatically be visible in Lr. This is so because with imported images Lr stores all edits in its catalog, and does not display the metadata from the xmp-file where Bridge saves edits.
    But you can make Lr read and display these additional Bridge-edits by doing a <read metadata from file>. But this is problematic because <reading metadata from file> will overwrite any Lr edits.
    So you see that because of the fact that Lr works with its catalog while Bridge does not, editing images in Bridge and in Lr is a recipe for frustration. It can be done, but it's awkward and prone to mistakes.
    Therefore I would suggest to bite the bullet and henceforth use Lr as your only editor. Import images from camera in Lr, do all your editing in Lr.
    Since you are used to do edits in in Bridge Camera Raw, Lr will pose no big problems for you.
    But if you don't want to let go of Bridge right away, I'd suggest you do at least one thing: After importing the images in Lr refrain from further editing these images in Bridge.

  • Query on sorting  XML using XSLT and getting the same XML as output !

    Hi,
    Looking for one information regarding sorting XML using XSLT , with the sorted XML as output. For eg. my XML is :
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="sort1.xsl"?>
    <levelone>
         <child ID="1" sort="5">
              <name>Paul</name>
         </child>
         <child ID="2" sort="1">
              <name>Adam</name>
         </child>
         <child ID="3" sort="2">
              <name>Will</name>
         </child>
    </levelone>
    and XSL :
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/levelone">
         <xsl:copy>
         <xsl:apply-templates>
              <xsl:sort select="@sort"/>
         </xsl:apply-templates>
              </xsl:copy>
         </xsl:template>
         <xsl:template match="child">
              <xsl:copy-of select="."/>
         </xsl:template>
    </xsl:stylesheet>
    This does the sort based on Name. But I want to get the same xml as output with the name sorted. Eg.
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="sort1.xsl"?>
    <levelone>
         <child ID="2" sort="1">
              <name>Adam</name>
         </child>
         <child ID="1" sort="5">
              <name>Paul</name>
         </child>
         <child ID="3" sort="2">
              <name>Will</name>
         </child>
    </levelone>
    Any pointers will be highly appreciated.
    - Thanks

    Don't you want <xsl:sort select="name"/> rather than <xsl:sort select="@sort"/>?

  • Using HsGetValue and HsSetValue in same file

    Is it possible to have one worksheet use HsGetValue formulas to retrieve data from Essbase, a second worksheet used for adjusting data, a third worksheet that adds the first two and then a final worksheet with HsSetValue referencing the third worksheet? For some reason, when I refresh (not refresh all) the first worksheet it submits data from the HsSetValue worksheet first and then retrieves the data instead of retrieveing the data for the POV on the worksheet and then allow for adjusting to be submitted back using refresh on the HsSetValue worksheet. Can these two not be independent on separate worksheets?
    Thanks,
    Kenny

    hi,
    use BDC Session method.
    check below example it will help you
    if you want to record for two transations then you will use same method as one transation.For example if you want to execute two transations like VA01(sales order) and VL01N(delivery).Here first you can record for both transactions seperately and in the function module calling you will call BDC_INSERT two times
    First function module contains Tcode as VA01 and Bdcdata table as data for the va01 transaction and second table contains tcode as VL01N and Bdcdata table conatins data which contains the record data of the delivery recorded data.
    PERFORM open_batch_session USING p_sessa.
      LOOP AT ltcap_int
        WHERE NOT tot_inc IS initial.
        ltcap_int-adj = ltcap_int-adj * -1.
        CONCATENATE ltcap_int-fund '/' ltcap_int-cfc INTO zuonr.
        PERFORM fill_bdc_header.
        PERFORM fill_bdc_lines.
        PERFORM post_entries.
        PERFORM insert_batch_session USING 'FB01'.
        ltcap_int-adj = ltcap_int-adj * -1.
      ENDLOOP.
      PERFORM close_batch_session.
    perform start_batch_session using p_sessa.
    Budgets
      WRITE p_fy TO c_fy.
      PERFORM open_batch_session USING p_sessb.
      LOOP AT ltcap_int
        WHERE NOT tot_inc IS initial.
        PERFORM rollup_header.
        PERFORM rollup_line.
        PERFORM rollup_save.
        PERFORM insert_batch_session USING 'FR21'.
        IF NOT ltcap_int-gsef_amt IS INITIAL.
          PERFORM rollup_header_gsef.
          PERFORM rollup_line_gsef.
          PERFORM rollup_save.
          PERFORM insert_batch_session USING 'FR21'.
        ENDIF.
      ENDLOOP.
      PERFORM close_batch_session.
    perform start_batch_session using p_sessb.
    We can process more than 1 transactions in session method.
    For this we will create the internal tables equilant to transactions and
    Between BDC_open_group and BDC_close_group we will call the BDC_Insert the no.of transactions times and populate the internal tables which contains the data pertaining to diffrent transactions.

  • Using iPhone and iTouch on same apple ID

    I have an iPhone and bought an iTouch for my daughter. I have the same Apple ID on both but have Facetime, Messageing, etc with a different e-mail addresses. However, when I deleted and renamed contacts in the contact list on her iTouch it deleted and renamed them on my iPhone as well. So I've lost a lot of contacts.
    Question 1: how do I prevent this from happening
    Question 2: Is there a way to get my contacts back.
    Thank you.

    This detailed explanation for iCloud account transfer could help you sort out your question:
    http://www.quora.com/iCloud/I-have-duplicate-Apple-IDs-one-of-which-i-use-on-ICl oud-and-want-to-cancel-that-one-and-re-configure-iCloud-Any-ideas

  • Using 30gb and nano on same computer?

    i have a 30gb video ipod and a nano. can i update them both only as long as they have the same library or do i have to use 2 separate computers? and what happens if i would go over 2gb? thank you for your help.

    You can use them both in from the same computer and Itunes library: How To Use Multiple iPods with One Computer
    For the smaller iPod you can choose the update option "automatically update selected playlists only" which would allow you to create a playlist specifically for your iPod Nano and drag the tracks you want into it. If you tire of the list and want to change it, you just add or remove the songs you don't want. The ones you take out out remain in the library to be used by the other iPod. Make your playlist a Smart playlist and limit the size to just below the advertised capacity of your Nano (around 1800MB for a 2G). You can read more about playlists at these links:
    iTunes: Creating playlists of your favorite songs
    How to create a Smart Playlist with iTunes
    For info:
    The iPod offers three ways to transfer music from your computer. You can select one of the following update modes from the iPod Preferences menu in iTunes (Edit=>Preferences=>'iPod' tab):
    1) Automatically update all songs and playlists. This is the default mode, in which your entire music library, including playlists, is automatically synced to your iPod. If the music library on your computer exceeds the iPod storage capacity, you are prompted to select a different update method.
    2) Automatically update selected playlists only. With this option, iTunes automatically copies the playlists you have selected to the iPod when you connect it to the computer.
    3) Manually manage songs and playlists. You can also choose to transfer music to the iPod manually. This allows you to drag and drop individual songs and playlists from iTunes to the iPod.

  • What would happen??  I used "import" and "useBean" for same bean...

    Hi, yes, I'm not a professional programmer (clearly)
    I used the import page directive and the jsp:useBean statement for the same bean in a jsp program I wrote.
    What's interesting is that the program works fine for me, storing values and retrieving them from the bean as I click through the different jsp pages.
    However, it doesn't work well for one of my friends, the values usually get lost as he clicks through the jsp pages.
    I then noticed I used both statements to refer to the same bean, is that why this is happening? Were two instances of the bean sometimes being created even though the useBean had scope = session?
    Something else, again, the program works perfect for me, not for him. We did a speed check using:
    http://helpme.att.net/dsl/speedtest/
    His speed was twice as fast as mine. Would that explain why he sometimes (almost always actually) lost values between the jsp pages?
    Below is the first few lines on each jsp page:
    <%@ page language="java" import="java.util.*" %>
    <%@ page errorPage="exception.jsp" %>
    <%@ page import="test1.UserData"%>
    <jsp:useBean id="user" class="test1.UserData" scope="session"/>
    <jsp:setProperty name="user" property="*"/>
    Thanks for any and all help,
    Robert

    The webcontainer creates a new cookie for each session so that it can keep track of each user session. If cookies are disabled, then sessions are been tracked by URL rewriting (a query parameter 'jsessionid' will be attached to the URL with the session ID as value).
    Opening a new browser instance (not a tab or a new window from within the currently running instance) would also trigger a new session being created.

Maybe you are looking for

  • Problem with my header

    I have a website setup and running for at least a year.  We just changed to a dedicated server and for some reason I am experiencing trouble with the header image of the general web.  When I load the page the header is now loading behind the flash wi

  • Creative Zen Microphoto (8GB) prob

    hello, i got my Zen microphoto about in sometime during december and now my MP3 is displaying some problems... everytime i go to turn it on, it displays on the OLED display "hardware problems" i cant listen to my music or anything... can anyone help

  • SAP MM Batch Management

    Hi All, Can anybody explain how to delete the batches? My client wants to make the Batch Management field deactivate in the material master.The stock is zero for this material and I am not able to delete the existing batches.

  • Can't run DukesAgeResource examples (Your First Cup)

    Hello, I believe I have found a possible issue in the "Your First Cup: An Introduction to the JavaTM EE Platform", and wonder if it relates to the fact that I cannot manage to run the example. At page 21, step 12, is states "In the REST Resources Con

  • MacBook PRO 2.6Ghz 8GB RAM (2012) -i ned more RAM, is it possible?

    Hello, how can help me. i´m a designer and i ned more as 8GB RAM. Maybe 16GB. Is it possible?