Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Carl last won the day on April 4 2019

Carl had the most liked content!


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Carl

  1. ok. you didn't show any code that would involve moving the TextField so I didn't think it was expected to move. if inner and your TextField(no instance name yet provided) are separate clips living inside mc, you will need to have a separate tween to move the TextField. myTimeline.append(new TweenLite(mc1.inner, 2, {x:700,y:700,rotation:"-360"})); myTimeline.append(new TweenLite(mc1.whateverYourTextFieldIsCalled, 2, {x:700,y:700})); the inner will tween and then the text. if you want the tweens to happen at the same time (notice the negative offset value -2): myTimeline.append(new TweenLite(mc1.inner, 2, {x:700,y:700,rotation:"-360"})); myTimeline.append(new TweenLite(mc1.whateverYourTextFieldIsCalled, 2, {x:700,y:700}), -2);
  2. try this: private function swfLoaded(e : LoaderEvent) : void { var theMC:MovieClip = e.target.rawContent as MovieClip; content.addChild(theMC); theMC.setup(_accent); } also, note e.target.content targets the ContentDisplay wrapper that holds your swf. Typically I believe this is the object that people add to the DisplayList. You can still target functions on the loaded swfs root via e.target.rawContent http://www.greensock.com/loadermax-tips/ I don't know what the disadvantages of putting the rawContent directly into the displayList are over using content, besides losing some of the features that ContentDisplay wrapper may offer. It seems to work just fine in my tests. keep in mind you could do add the content/ContentDisplay object to the display list and still target the rawContent functions / properties private function swfLoaded(e : LoaderEvent) : void { var theMC:MovieClip = e.target.rawContent as MovieClip; content.addChild(e.target.content); theMC.setup(_accent); } again, just something to keep in mind. I really don't know if it will make a difference. -Carl
  3. given my trace suggestion above, as long as you are not seeing "condition1" trace out multiple times then it should work fine.
  4. can you please rephrase the problem? the way it is written it seems that what you expect and what you are getting are the same
  5. ok, that makes it much more clear. you were creating strings that contained object-looking syntax... but to flash you still just have a bunch of strings. the following will work on its own, just throw it into your function var yValue:Array = new Array(296,292,287,283,283,258,163,131,112,102,91,80,63,54,53,62,66,60,54,54,50,47,47,58,91,125,171,260,268,273,271,264,265,274); var xValue:int = 0; var loopMax:uint = yValue.length; // constructing the array var positionList:Array = new Array(); for (var column:int = 0; column positionList.push({x:column*25, y:yValue[column]}); trace(positionList[column].x + " / " + positionList[column].y); } TweenMax.to(mc, 6, {bezier:positionList, orientToBezier:true}); don't forget to activate the plugins import com.greensock.plugins.*; TweenPlugin.activate([bezierPlugin]);
  6. hi matthy, i'm having a tough time understanding how the code you posted corresponds to the behavior you are trying to accomplish. regardless, to prevent user interaction from messing with a tween that is running, you can test to see if a tween is already running like so: mc.addEventListener(MouseEvent.CLICK, glow); function glow(e:Event) { if (! TweenMax.isTweening(mc)) { TweenMax.to(mc, 3, { glowFilter: { color:0xcc0033, alpha:1, blurX:20, blurY:20, strength:3, quality:3 },repeat:1, yoyo:true } ); } else { trace("stop clicking, i'm currently tweening!"); } } once the glow tween is initiated, it will appear then disappear even if the user clicks 20 times while the tween is running.
  7. glad to hear you are enjoying the tutorials at www.snorkl.tv for the animation effect you described have you tried: import com.greensock.*; import com.greensock.easing.*; TweenMax.to(Line_1, .5, {x:200}); TweenMax.to(Line_1, 6, {x:400, ease:Linear.easeNone, delay:.5}); TweenMax.to(Line_1, .5, {x:650, delay:6.5}); //or use TimelineLite and not worry about managing the delays var tl:TimelineLite = new TimelineLite(); tl.append(TweenMax.to(Line_2, .5, {x:200})); tl.append(TweenMax.to(Line_2, 6, {x:400, ease:Linear.easeNone})); tl.append(TweenMax.to(Line_2, .5, {x:650})); test the code with Line_1 and Line_2 offstage to the right with a stage width of 640px -carl
  8. I think i may have misunderstood why you are using a String variable. Strings are used primarily for relative values in TweenLite/Max. you may want to store those values in an object. perhaps this is what you want: var positionListVar:Object = [{x:0, y:296},{x:25, y:292},{x:50, y:287},{x:75, y:283}] TweenMax.to(point_mc, 7, {bezier:positionListVar, orientToBezier:true});
  9. First, that is very cool animation you made. I really liked it. I changed things just slightly to make it easier to test, like slowing it down and removing the x/y tweens so that I could really see if it was transforming around the center point. the following code worked fine on Textfields import com.greensock.TweenMax; import com.greensock.easing.*; import com.greensock.plugins.*; TweenPlugin.activate ([AutoAlphaPlugin,BlurFilterPlugin,MotionBlurPlugin,TransformAroundCenterPlugin ]); var Clips:Array = [Line_1,Line_2,Line_3,Line_4]; var Stagger:Number = 0.5; for (var i = 0; i TweenMax.from (Clips[i],3,{autoAlpha:0, transformAroundCenter:{scaleX:3, scaleY:3},rotation:0,blurFilter:{blurX:25,blurY:25},ease:Expo.easeInOut,delay:i * Stagger,onComplete:FadeOut}); } function FadeOut ():void { for (var i = 0; i TweenMax.to (Clips[i],3,{autoAlpha:0, transformAroundCenter:{scaleX:3, scaleY:3}, rotation:20,blurFilter:{blurX:25,blurY:25},ease:Expo.easeInOut,delay:i * Stagger}); } } you will get the following error: ReferenceError: Error #1069: Property transformAroundCenter not found on flash.text.TextField and there is no default value. if you 1)didn't activate the plugin properly or 2)don't have the plugin can you confirm that you are a Really Green or higher member of Club GreenSock and that you have the bonus plugins? http://www.greensock.com/club/
  10. here is a simplified approach var distance:Number = 100; TweenMax.to(mc, 1, {x:String(distance)}) is same as TweenMax.to(mc, 1, {x:"100"}) so try wrapping your string vars in String() c
  11. the only concern i have is that the first condition may still be firing and you may be loading 2 things at once. if(condition1 == true){ //do result1 }else if(condition2 == true){ //do result2 } in the above scenario using else if, if condition1 is true, then condition2 never gets tested. when you stack the same if statements like: if(condition1 == true){ //do result1 }if (condition1 == true){ //do result2 } and you are seeing result2 work: LoaderMax.getLoader("kwestia").load(); I would think that conditon1 is still true and you are also loading LoaderMax.getLoader("salon").load(); I think nothing is changing in your app to ever make condition1 false that's why the else if statement never ran. put a trace in each if block and see what happens. function loadSubSections(): void { if (s01Instance == s01S01 && s01S01Loaded != 1) { trace("condition1"); LoaderMax.getLoader("salon").load(); } if (tableOn == 1 && tableLoaded != 1) { trace("condition2"); LoaderMax.getLoader("kwestia").load(); } }
  12. thank you for taking the time to post your solution. it could be very helpful to people searching in the future. Glad you figured it out. have fun with LoaderMax
  13. when the first if is true, the else will not run. chances are when the first if runs, the condition is true and then remains true. in your first if you should trace out the values of s01Instance and s01s01Loaded. i have a hunch s010s01Loaded is not what you think it is. give it a try.
  14. once you tell a tween to play, its virtual playhead moves from beginning to end.... just like a movie clip. once a tween has played fully to the end... telling it to play again does not rewind it back to the beginning. the reason why the first image APPEARS to have played or faded in after the sequence is because that tween had never played before. you start your sequence with fade_ut1 then you play through all the tweens and at the end of fade_ut3 you tell fade_ut1 to play for the first time. insteade of using someTween.play()... try someTween.restart() like: case "start1": fade_ut1.restart() fade_in2.restart() pauseFunksjon("start2"); break; do this for all of them. restart will force the tween to play from the beginning. once you get this working, spend some time with TimelineLite/Max it will make this sort of sequence much much easier. you won't need all the delayedCalls and manual switches.
  15. that is a great suggestion mrkantz. and your help is VERY much appreciated. one thing, in order to use repeat and yoyo you need to use TweenMax TweenMax.to (mc, 2, {_alpha:100, yoyo:true, repeat:1});
  16. The main benefit of LoaderMax is that you can store multiple loaders in one queue / list and then -load all subloaders in sequence -prioritize certain loaders -pause the load sequence -resume the load sequence -easily communicating with each loader after its loaded via LoaderMax.getLoader() or LoaderMax.getContent() etc. Every time your loadSubSection function is called you are creating a new loader:LoaderMax and appending 1 SWFLoader to it... so you really don't have a queue just a single SWFLoader in a LoaderMax. You could probably get away with just creating a new SWFLoader each time on its own and have the same functionality. Also, by declaring var loader:LoaderMax = new LoaderMax(...) inside the function you don't have access to that LoaderMax anywhere else in your code. The following code sets up a LoaderMax instance that has 3 ImageLoaders (will be the same for swf). To simulate a single function that loads a different asset into a different container I just am making a new asset load each time the user clicks on the stage. your if else statements do virtually the same thing. also each loader uses the same onComplete and onProgress handlers. import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; var queue:LoaderMax = new LoaderMax({name:"mainQueue"}); queue.append( new ImageLoader("images/photo1.jpg", {name:"photo1", container:container1, alpha:0, onProgress:progressHandler, onComplete:completeHandler}) ); queue.append( new ImageLoader("images/photo2.jpg", {name:"photo2", container:container2, alpha:0, onProgress:progressHandler, onComplete:completeHandler}) ); queue.append( new ImageLoader("images/photo3.jpg", {name:"photo3", container:container3, alpha:0, onProgress:progressHandler, onComplete:completeHandler}) ); var loadIndex:int = 0; stage.addEventListener(MouseEvent.CLICK, loadNext); function loadNext(e:Event){ loadIndex++; switch(loadIndex){ case 1: //load the first asset LoaderMax.getLoader("photo1").load(); break; case 2: //load the second asset LoaderMax.getLoader("photo2").load(); break; case 3: //load the third asset LoaderMax.getLoader("photo3").load(); break; default: trace("stop clicking, i'm done!"); break; } } function progressHandler(event:LoaderEvent):void { trace("progress: " + event.target.progress); } function completeHandler(event:LoaderEvent):void { var image:ContentDisplay = event.target.content; TweenLite.to(image, 1, {alpha:1}); trace(event.target + " is complete!"); } hopefully that code will give you some ideas on how to progress. Also, although I pointed out a few ways to make your code a little more flexible, I'm not seeing anything exactly wrong or that would prevent an asset from loading. I would put some trace() statements in each condition to make sure the logic is sound BEFORE moving forward. -Carl
  17. you can get v10 from the faq here. http://www.greensock.com/v11/ I don't believe there is a public archive on this site of all the various subversions. I've attached a version of 11.38 that I dug up from my projects Carl
  18. just remove the new introNarrativeTimeline.append(TweenLite.delayedCall(1, gameTutorialV, [])); should work fine -carl
  19. Seasonss, I would like to congratulate you on providing one of the best files I've seen that clearly illustrates your problem with no extraneous fluff thrown in. Very cool technique as well. I gotta say you had me stumped for a few minutes. it was just a syntax error GOOD TweenMax.to(timerMask_mc, 60, {shortRotation:{rotation:-360}, ease:Linear.easeNone}); BAD TweenMax.to(timerMask_mc, 30, {shortRotation:{rotation:-360, ease:Linear.easeNone}}); //note where the }s are. you had the ease set on the shortRotation obj... it happens:) and just a tip to make testing easier do this: just move your count var up before the tween var count:Number = 60; and then use it in the tween and the timer TweenMax.to(timerMask_mc, count, {shortRotation:{rotation:-360}, ease:Linear.easeNone}); var myTimer:Timer = new Timer(1000,count); then your tween and timer will always be using the same value and makes testing with different speeds easier. Great work! Carl
  20. you can pause a tween upon creation like so: var tween1:TweenLite = TweenLite.to(bildeKlipp, fadeTid,{autoAlpha: 0, paused:true}); you can tell it to play later with play() you can also force the play head back to the start with tween1.currentTime = 0 if need be
  21. I don't have anything super advanced. are you looking for something more than just something like page1Loader.pause(); page2Loader.load(); where page1Loader and page2Loader are unique LoaderMax instances with their own queues of files? by prioritize are you referring to a more intelligent system that would automatically resume the first loader after the second loader is finished?
  22. glad you liked the videos and they are helping. Carl
  23. awesome. you had me scratching my head. nice work on fixing it.
  24. that is very odd. glad to hear you got it working though. you are welcome.
  25. i think i see it, you are loading your clip into a different container than me. you have: loader.append( new SWFLoader("s01_01.swf", {name:"subSection01", estimatedBytes:3000, container:Object(root).s01s01_container, autoPlay:true}) ); and your function doesn't live in s01s01 it lives on the root stage and i was loading directly into the main timeline aka this loader=new SWFLoader("ext.swf",{container:this,x:0,y:0,alpha:0,name:"swf1",onComplete:completeHandler}); try adding one more parent to your path trace("fired from btn"); trace(this.parent.parent as MovieClip); var parentMovie:MovieClip = this.parent.parent.parent as MovieClip; parentMovie.onParentFiredFromLoaded();