Jump to content
GreenSock

wpoosanguansit

Members
  • Posts

    3
  • Joined

  • Last visited

wpoosanguansit's Achievements

0

Reputation

  1. Carl, Thank you for your help. I have put up the test code that I am working on at http://54.243.56.68/pages/canvas-page/ I would like to be able to push out images that come in to the display and allow people to drag and drop those images on the canvas as they like. And the tween would loop infinitely. For the gap in between the repeat, I am not sure how do I close that gap with canvas. For drag and drop, if you drag & drop the images, they will just snap back to their prior positions. So to set the new positions, I query the tweens and try to set the x and y of those tweens but I am still not able to make it work. Regarding the gap between images, I will try that out your suggestion later tonight. But I suspect that I have made some error in the way I added the tweens instead of the rounding error. Also, I looked around your tutorials, I found that you have made Blitmask for the looping purposes. Will you have those for JS as well? Again, thank you for your help.
  2. Hi, Thank you for your library. I have been testing out and trying to create a infinite scroll of images in EaselJS with TweenMax and TimelineMax. However, I always see gaps in images scrolling from the left and also a gap in the loop. I saw a similar question on the semless looping that has the suggestions for css trick. I am not sure how to get the effect with EaselJS canvas. Here is my code: tweens = [] for key, manifest of manifests break if index >= NUMBER_OF_ITEMS imageContainer = new createjs.Container(); imageContainer.x = -itemX; y = Math.floor(Math.random() * (displayHeight - itemY - 10)) y = y + (itemY / 2) if y < itemY imageContainer.y = y; imageContainer.name = key tweens.push(TweenMax.to(imageContainer, 50, { x: displayWidth + itemX / 2, ease: "linear" })) stage.addChild(imageContainer); preload.loadManifest(manifest); index++ mainTimeline.appendMultiple(tweens, 0, "normal", 8.5) I would repeat this append each time a set of images are loaded into the canvas. But the two problems above are always present. Is there a way to overcome those? Also, related to this question. I have a drag and drop on the image. I pause the timeline when drag and drop is performed. However when the timeline plays again, it always go back to the same previous postion. I have this to set the new position but it doesn't seem to do anything: mainTimeline.set(o, {x: newX, y: newY}) Is there a way to set the position of the object in the timeline that would conitnue the flow? Thank you for your help.
×