Thank you for your reply Hector Vera. Greatly appreciated.
But the problem with this solution is that the line that I am using as an object to move on a path, will turn without bending. If you notice in the reference video, the path has a sharp turn. Here the white line will just rotate as attached to the path. Not bend with the path.
Thank you