Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8507883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:59:43+00:00 2026-06-11T02:59:43+00:00

my code run smooth when I run in main file but when I make

  • 0

my code run smooth when I run in main file but when I make write this code in some other lua file and call that file with the help of director.lua, it doesnt recognized ended event phase on touching. Pls help me out.
Thanks in advance.
Here is my code.

        function touched( event )
        if  event.phase == "ended"  then
        if(event.x - event.xStart > 30)then
           sliding = true;
           line = display.newLine(event.xStart, event.yStart, event.x, event.y)
           line:setColor(255,0,0)
           line.width = 5

          else

            print("just a touch")

          end

       end
    end
   Runtime:addEventListener("touch", touched , -1)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:59:45+00:00Added an answer on June 11, 2026 at 2:59 am

    I just tested this using Director with a standard Director main.lua file and a scene1.lua file containing only your code from the above post and it worked just fine.

    You could provide more code, upload a zip of your project or share any notes about your project that may help figure out why this would be happening.

    I would suggest you create a basic app as I just did and try running that; if the issue persists you could file a bug, although as I said above event phases are working fine for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make this code run, but I'm still too much of a
I'm writing some code that involves CSS tabs, but IE doesn't support the :target
This javascript code run without problem in chrome and IE but have a problem
i need run code that will create a database and populate tables. i am
This code is run from within a subclass of UITableViewCell CALayer* greenLayer = [CALayer
my jquery code not run with IE6 but runs all others including IE7. It
I have this code to run a slideshow (this is only part of what
In .Net 4 this code run with no error class A { public event
Does the following code run on the main thread? Does main queue refer to
I'm so close to getting this effect perfect, but I have run into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.