Jump to content
Search Community

Miroku_87

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by Miroku_87

  1. Miroku_87

    z-sorting

    Hey Diaco! Sorry for answering so late, but THANK YOU. It works great =D Just one thing: I'm trying to use relative values for the tween (fiddle updated) but it gets them as absolute. What am I doing wrong?
  2. Miroku_87

    z-sorting

    Sorry for bringing this old topic up but I'm looking for the same thing. I've got this piece of code where I simulate a parallelepiped with four divs, but when the parallelepiped rotates they overlap in the wrong way Here is the example http://jsfiddle.net/5341j9jg/1/ How can I sort my elements correctly? thank you!
  3. FALSE ALARM! Sorry about it, I was editing a code I didn't write in the first place and I found now a wild playVideo() where there shouldn't be one. Sorry again!
  4. Hi Greensock, I'm writing you because I'm having the same issue as described in this old post: http://forums.greensock.com/topic/2779-videoloader-autoplay-problem/ I downloaded the library today so I guess it's latest version but still got the problem. I developed a videoplayer which appears just when the user scrolls until the flash file is in the visible viewport, but, since the swf is already in the page at its loading (with display:none), the video starts to load and should not play (I set the autoPlay property to false). Despite this you can still randomly hear a fragment of sound when the page is loaded. The page I'm talking about is this (to find the videoplayer scroll to the middle of the page): http://clients.adrime.com/files/campaigns2/9982307390/44214/IT_fantagazzetta.com_formazioni_201304_index.html Try and refresh it a few times and sometimes you'll hear the sound starting. Hope we can solve this. Thank you in advance
  5. Hi everyone, is it possible to name a Tween so that is retrivable later with something like var tweens:Array = TweenMax.getTweensOf(obj); for(var t:String in tweens) { if(tweens[t].name == "myTween") //do something to tweens[t] } ??????
  6. Like promised here is a video of two rounds, the first of the player and the second of the AI It works quite fine =) http://dl.dropbox.com/u/4064417/WorkingGood.avi You can see cards always goes on the square they have to... though the squares keep moving =)
  7. Maybe if I could do something like: function example():void { var newX = overObject.x; var newY = overObject.y; timeline.append(TweenMax.to(obj, 5, {onInit: updateCoords, onInitParams: [thisTween], x: newX, y: newY})); } function updateCoords(ofWhat:TweenMax):void { var newX = overObject.x; var newY = overObject.y; ofWhat.vars = {x: newX, y: newY}; } would it change something? is there a way to refer to the tween we're creating like I did in the "onInitParams" ? EDIT: I did a little test and it seems to work.. still I need how to self reference the tween =\ OR I could do something else like this: function example():void { var newX = overObject.x; var newY = overObject.y; timeline.append(TweenMax.to(obj, 5, {onInit: updateCoords, onInitParams: [obj], x: newX, y: newY})); } function updateCoords(ofWhat:Object):void { var newX = overObject.x; var newY = overObject.y; var tweens:Array = TweenMax.getTweensOf(ofWhat); tweens[0].vars = {x: newX, y: newY}; } This works good, but what if I'm using allTo? What do I write in my "onInitParams"? How do I refer to the single tweened object of the array?
  8. Thank you Carl! It's a while I'm working hard on this project. Hope people will like it as you do =) ASAP I will link a video of the right behaviour so you can see =D
  9. Oh, you're right, I forgot to put them like this: function example():void { var newX = overObject.x; var newY = overObject.y; timeline.append(TweenMax.from(obj, 5, {onInit: calculateCoords, onInitParams: [obj], x: obj.x, y: obj.y})); } function calculateCoords(ofWhat:Object):void { obj.x = overObject.x; obj.y = overObject.y; } but in my code they are present.
  10. First of all thank you for the answer. Then uhmmmmmmmm I'm not sure I got how to use invalidate in a way it would help me though I've read it's description...
  11. Hi everyone, I'm using TimelineMax with a few tweens. These tweens have to move above another object, so to its exact coordinates. The problem is this: this object is tweened itself at the same time for other reasons, so I can't retrive its coordinates at the time I create the timeline, because after the timeline play command that object could be moved somewhere else. Example of what I CAN'T do: function somewhere():void { timeline = new TimelineMax(); } function example():void { var newX = overObject.x; var newY = overObject.y; timeline.append(TweenMax.to(obj, 5, {x: newX, y: newY})); } function somewhereElse():void { timeline.play(); } Is there a way to avoid this problem and get my coordinates at the time the timeline plays that single tween? I've tried this way: function example():void { var newX = overObject.x; var newY = overObject.y; timeline.append(TweenMax.from(obj, 5, {onInit: calculateCoords, onInitParams: obj, x: obj.x, y: obj.y})); } function calculateCoords(ofWhat:Object):void { obj.x = overObject.x; obj.y = overObject.y; } but something is not right in this and infact it does not do what expected. So how? Thank you in advance =)
  12. FIXED! I found that I was tweening that card twice from different instructions so it conflicted! Thank you the same ^^
  13. I found the error for the second version of the code. Here is the fix (highlighted parts): http://pastebin.com/hu2upHid but I still have the problem of the discarded card "returning" =\
  14. Hi everyone, in making the AI movements in a card game I thought of using TimelineMax and TweenMax together. While using them I ran into a few strange behaviours. The first code I've tried and used is this http://pastebin.com/K7ieNz2E as you see I've got three functions running when a GameEvent is dispatched. They are written in the order the events are fired. So in the first I instantiate the timeline putting an onComplete function, in the second I make the AI played cards move and in the end I move the AI discarded card. Here is a video of what happens with this code: http://dl.dropbox.com/u/4064417/StrangeBehaviour1.avi as you see everything is as expected from the code except for the tween at line 31 and the last one. In fact we see the instruction at line 31 being excecuted but then happens something strange. The tween is reversed and everything stops. The last tween is never been executed (apparently) and the timeline never reaches the onComplete function (I can check it because I don't see the trace of that function). I notice that tweens at line 31 and 32 are the only ones with TweenMax.to and not .allTo .... will it be important? So I tried another way. This one: http://pastebin.com/JH5KfdtW here is the result: http://dl.dropbox.com/u/4064417/StrangeBehaviour2.avi what a mess! Where the tweens at line 25 and 26 had gone? And why is it tweening just the width of the instruction at line 27 and not the height? While debugging I've tried and commented line 27 (the highlighted one) and here is the result: http://dl.dropbox.com/u/4064417/StrangeBehaviour3.avi everythings runs fine except that I obviously don't have what line 27 should make happen. This leads me to this question: is it me? am I missing something very wrong in my code? if yes, what? Hope someone will help me. Thank you very much =)
  15. Thank you for your answer! My case was the second... but I decided to keep the onInit in my allTo function. The function I pass is not so heavy and it's not very important if it's repeated. Thank you the same =)
  16. Hi everyone, is there a method to run a function at the start of the first tween of a TweenMax.allTo like the parameter onCompleteAll is for the end of the last tween? If not... how can I make it up? Thank you in advance =)
  17. Ehy thank you to both =) Will try and give you feedback ASAP
  18. Hi everyone, is possible to make an object rotate forever with tweenMax/Lite? I would prefer it to using ENTER_FRAME Thank you in advance =)
  19. Oh I thought it was something similar but watching the demo I should have missed it! Thank you very much!
  20. Hi greensock! Is there a way to tween an object with constant speed? I'm already using the formula duration = distance / velocity; but I see that the tween starts fast then slow down and stop at the wanted coordinates. I would like it not to happen. Is it possible?
  21. Oh, one thing I forgot. If I have questions about your code I want to extend, where can I post/write?
  22. I will see what I can do, because it would be a really great shortcut for my work! I'll surely let you know!
  23. Argh, absolutely no way? If there would be a way to create CurvePath2Ds to merge with LinePath2Ds I could draw the rectangle my self. Or a way to extend RectanglePath2D? =\ It's not very different from Papervision3D... anyway I will try! Oh that's perfect! Thank you =)
  24. Hello everyone, I've got three question on MotionPaths: 1st - is there a way to have a Rounded Angles Rectangle Path? 2nd - can I use it in an Away3D scene? I don't really need it to be three dimensional cause I want it to stay for all the running time on the XZ plane. 3rd - is there a way to orientate the moving object to the path? Thank you in advance =)
×
×
  • Create New...