Miroku_87

Members
  • Content count

    28
  • Joined

  • Last visited

Community Reputation

0 Newbie

About Miroku_87

  • Rank
    Member
  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. Miroku_87

    Videoplayer Autoplay Issue

    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. Miroku_87

    Videoplayer Autoplay Issue

    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. Miroku_87

    Naming a Tween

    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. Miroku_87

    TimelineMax + TweenMax.allTo & .to strange behaviours

    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. Miroku_87

    TimelineMax + TweenMax.allTo & .to strange behaviours

    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. Miroku_87

    TimelineMax + TweenMax.allTo & .to strange behaviours

    FIXED! I found that I was tweening that card twice from different instructions so it conflicted! Thank you the same ^^
  13. Miroku_87

    TimelineMax + TweenMax.allTo & .to strange behaviours

    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. Miroku_87

    TweenMax.allTo onInitAll?

    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 =)