Jump to content


  • Posts

  • Joined

  • Last visited

jaswa's Achievements


Newbie (1/14)



  1. Thanks for your answer, Jonathan. Yes, you can drag the svg. But when I remove the comment from the <object> and place the comment around the <img>, and I also remove the comment from the js, then the textbutton will work (but not with the remote svg, as you pointed out) but there is no more dragging the svg with <object>. I should like to learn how to control parts of the extern svg AND drag the svg within its container. jaswa
  2. Hi GSAP brothers, Thanks to Draggable, I can make a svg draggable within the bounderies of its frame. That is to say, if I use : img id="SVGmap" src="map.svg”. But when I use javascript to get inside the svg to control some elements, I get an error. If I use: object id="SVGmap" data="map.svg" type="image/svg+xml”, the javascript to control from outside works, but I cannot drag the svg anymore. I made a codepen: http://codepen.io/jaswa/pen/NrNorL Unfortunately the javascript does not work with an absolute link as I have to use here( why not?), but when the svg is on the same server, it works… Does anybody know how to drag AND control the svg from the outside? Thanks in advance for your answer! jaswa
  3. Thanks again, Carl. I could solve my problem. The code is much easier now. The Greensock library really is awesome! And the speed and helpfulness of your help too! Cheers, jaswa
  4. Thanks! I will check your file tomorrow. It is midnight now here (in Amsterdam, Holland). Thanks again for your help, Carl! Regards, jaswa
  5. Thanks for replying, Carl. You're right about the custom sequence; it was the only solution I could make up. I guess there is a better way but I'm only a beginner in programming. I checked out the TimelineMax but could not make very much of it. Can you please give me one more clue? Cheers, jaswa
  6. Hi AS3 users, Happy new year! I'm not very familiar with A3 but I managed to make a scripted animation with the Greensock tweens. But now my client wants me to repeat the animation only a few times. It has to stop on the last frame after 30 secs. But how do I do that? Hope somebody will help me with this. The file is too big for upload but here is the code: Cheers, jaswa import com.greensock.TweenLite; import com.greensock.easing.*; var Mybg1 = new bg1(); var Mybg2 = new bg2(); var Mybg3 = new bg3(); var Mybg4 = new bg4(); var Mybtn = new btn(); addChild(Mybg1); addChild(Mybg2); addChild(Mybg3); addChild(Mybg4); addChild(Mybtn); Mybtn.x = 0; Mybtn.y = 0; // URLRequest variable(where to navigate) var Amexlink:URLRequest = new URLRequest("https://xxxxxx"); // Navigation function function navigateFunc(event:MouseEvent):void { navigateToURL(Amexlink, "_blank"); } // Fire off that event when button is clicked in FLash Mybtn.addEventListener(MouseEvent.CLICK, navigateFunc); Mybg4.x = 0; Mybg4.y = 0; Mybg4.alpha = 0; Mybg3.x = 0; Mybg3.y = 0; Mybg3.alpha = 0; Mybg2.x = 0; Mybg2.y = 0; Mybg2.alpha = 0; Mybg1.x = 0; Mybg1.y = 0; Mybg1.alpha = 1; function animator(target:MovieClip,time:Number,delay:Number,alphaValue:Number,callBack:Function) { TweenLite.to(target,time,{delay:delay,alpha:alphaValue,ease:Back.easeOut, onComplete:callBack}); } var delay:Number = 1; seq1(); function seq1() { animator(Mybg1,2,2,0,null); animator(Mybg2,0,2,1,seq2); } function seq2() { animator(Mybg2,2,2,0,null); animator(Mybg3,0,2,1, seq3); } function seq3() { animator(Mybg3,2,2,0,null); animator(Mybg4,0,2,1, seq4); } function seq4() { animator(Mybg4,0,1,0,null); animator(Mybg1,0,1,1, seq1); }