Jump to content
Search Community

Carl last won the day on December 24 2023

Carl had the most liked content!

Carl

Moderators
  • Posts

    9,824
  • Joined

  • Last visited

  • Days Won

    546

Everything posted by Carl

  1. i'm not at all familiar with LinePath2D, but I think it may be because all your points are being placed in the same array: points.push(new Point(point[0],point[1])); I gather that your xml is divided into 2 separate nodes so that each of them is for a separate group of points forming a line.' by putting all the newPoint()s into points, I think LinePath2D sees it as one long line.
  2. glad you are enjoying this. and yes, storing your rurs in an array is very helpful. just to be clear. my previous code did not create 20 rurs. there were only 10.
  3. it is important to note that in GreenSock's solution he is not directly tweening the rotation of myMC. he is tweening the currentRotation property which lives within the scope of the main timeline, in this case "this". the main timeline has a var/property called currentRotation. when currentRotation gets tweened, the the onUpdate function updates the rotation of myMC. his code was written for a very exact solution to the code you specified. If you want to implement his suggestion in another project, feel free to modify it to suit your needs. In general, yes, you can tween any property of any object, you are not forced to use "this". you simply reference the object who's properties you want to tween.
  4. Hi Jon, addChild simply places a displayObject at the highest depth of the display list. There is no duplication, its the same symbol just put higher in the stack. when your loop is running it is creating many rurs. everytime createRur gets called... a new Rur is created. you are referencing that Rur with the variable rur. everytime you use the term rur in your function, flash knows that you are referring to the most recently created Rur. that rur gets put into nestedTl and now that same rur is being used a parameter in the addCallBack method. since all this happens within the same function, rur doesn't need a unique. if later on in your code you want to access specific rurs, you would then give them a .name property and access them with getChildByName("mySpeciallyNamedRur"). ---- if you are migrating from as2 and are used to everything being referenced by instance name it can be confusing. read both pages here http://theflashconnection.com/content/f ... able-names and this http://theflashconnection.com/content/c ... s-loop-as3
  5. The code you showed is a bit lacking, so there isn't a whole lot to offer advice on. What you want to do is create a VideoLoader that points to the location of your video file. ( i have never tried loading off of a dvd ) if it is a single video file, there is no need for an array or a LoaderMax. A single VideoLoader will handle it just fine. http://www.greensock.com/as/docs/tween/ ... -list.html If you are loading multiple videos, you could: 1: append VideoLoaders to a LoaderMax http://www.greensock.com/as/docs/tween/ ... erMax.html 2: create an array of video urls and throw it into LoaderMax's parse method: http://www.greensock.com/as/docs/tween/ ... tml#parse() 3: keep all of your video urls in an external xml file and once the xml is loaded all the videos will start loading using XMLLoader: http://www.greensock.com/as/docs/tween/ ... oader.html LoaderMax is very powerful and offers a lot of features, with that though there is a bit of study time involved at the beginning. When learning LoaderMax, I found this tutorial very very helpful as it covers a large percentage of what you will need LoaderMax to do when working with video. http://active.tutsplus.com/tutorials/ac ... e-premium/ I would strongly recommend starting small with one VideoLoader and get it to work as you need, then look into adding multiple VideoLoaders to a LoaderMax. Once you get some code working, feel free to come back with questions.
  6. sorry for the bad news, but from reading the post you linked to, it seems that there is really nothing that can get around specific flash player / module restrictions noted in that post. LoaderMax can only make use of features that are baked into Flash Player
  7. this isn't a common request for bitmaps nor does it appear to be a very straight-forward thing to do. a few people have discussed a variety of techniques here: http://bit.ly/jYQHyN I really don't have a better answer.
  8. nice work on your file. It reminds me of the type of thing I enjoy building. that was a tricky challenge but i think this solution will work well for you. replace your createRur with this: function createRur(count:Number) { // create a Rur (attach symbol in library with Class Rur) and position on stage var rur:Rur=new Rur(); rur.x = stack1X; rur.y = stack1Y + count * spacing; addChildAt(rur, 0); trace(rur.name); var nestedTl:TimelineMax = new TimelineMax(); nestedTl.insert(TweenMax.to(rur, 1, {x:stack2X, y:stack2Y - count * spacing, ease:Circ.easeInOut})); tl.append(nestedTl, -.5); // NEW // //halfway through the current rur's animation call setDepth: tl.addCallback(setDepth, tl.duration-.5, [rur]); } add this below createRur function setDepth(rur:Rur):void{ addChild(rur); } BTW: I duplicated all your rurs and am keeping them as payment
  9. attach a zip of your fla and I will give it a try
  10. Welcome to the club! did you activate the plugin? TweenPlugin.activate([PhysicsPropsPlugin]); http://www.greensock.com/as/docs/tween/ ... lugin.html
  11. I'm not seeing the animation stop. take a look:
  12. try this: import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.MovieClip; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.display.Loader; import flash.display.Sprite; import flash.net.URLRequest; import flash.events.Event; import flash.events.MouseEvent; import gs.easing.Strong; import gs.TweenLite; import com.greensock.TimelineLite; import com.greensock.*; import com.greensock.easing.*; var timeline:TimelineMax = new TimelineMax(); if (stage) { init(null); } else { addEventListener(Event.ADDED_TO_STAGE, init); } function init(e:Event):void{ stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; stage.addEventListener(Event.RESIZE, onResize); onResize(null); } function onResize(e:Event):void { trace("resize"); timeline.gotoAndStop(0); timeline.clear(); bg1_mc.width = stage.stageWidth; bg1_mc.height = stage.stageHeight; ( bg1_mc.scaleX > bg1_mc.scaleY ) ? bg1_mc.scaleY = bg1_mc.scaleX : bg1_mc.scaleX = bg1_mc.scaleY; bg1_mc.x = 0; bg1_mc.y = 0; bg_mc.x = 30; bg_mc.y = 30; bg_mc.width = stage.stageWidth - 60; bg_mc.height = stage.stageHeight - 60; timeline.insert(TweenMax.to(bg1_mc, 20, {delay:0, width:bg1_mc.width*1.3, height:bg1_mc.height*1.3, repeat:-1, yoyo:true})); timeline.play(); } NOTE! you are using a very out-dated version of greensock. I would recommend updating to v11.
  13. the behavior you describe appears to be expected. if you have a TimelineMax scaling an object and then you have other code in onResize() that is changing the width and height of that object there is going to be a conflict. you should probably clear() the timeline onResize and then re-populate it with the tweens that you need
  14. TweenMax.fromTo(Object(this).marqDisplay_mc, 1, {blurFilter:{blurX:20}}, {blurFilter:{blurX:0}}); there is the chance that if the user clicks while this tween is happening, that the blur could be at 10 and then jump TO 20 and tween down to 0. or maybe try tweening the img itself and not its container (imgloaderInfo.content)
  15. You could approach this a few ways. you could have a master timeline that contains timelines for each banner. once all the child timelines are built you could append them to the master with labels: var main:TimelineMax = new TimelineMax(); var banner1:TimelineMax = new TimelineMax(); banner1.append(tweens) banner1.append(moreTweens) var banner2:TimelineMax = new TimelineMax(); banner2.append(tweens) banner2.append(moreTweens) ... //add banner timelines to main with labels main.addLabel("banner1Start"); main.append(banner1); main.addLabel("banner2Start", main.duration); main.append(banner2) //to control the main timeline main.gotoAndPlay("banner2Start"); ---------------- the above is pseudo-code to illustrate a basic approach. What you are describing would work really well with this OOP approach: http://www.snorkl.tv/2011/05/real-world ... ase-study/ Or for something a little different: http://www.snorkl.tv/2011/03/teaser-bul ... ansitions/
  16. by putting the () parenthesis afte the function name you are telling the function to run as soon as the line of code is executed. what you want to do is provide a reference to the function by name BAD TweenLite.to(window,0.1,{alpha:0,height:1, onComplete:newWindow(i)}); GOOD TweenLite.to(window,0.1,{alpha:0,height:1, onComplete:newWindow, onCompleteParams:}); all arguments for the onComplete get passed in via an array in onCompleteParams. that should do it. C
  17. I hate to say it, but I doubt the compiler is wrong. What you can do to find the null object is try to trace out every element that you are tweening right before the tween takes place. for instance: function do2():void{ trace(cap_nu12); tl2.insert(TweenMax.to(cap_nu12, speed2 + 0.1, {y:220.80, delay: speed2 + .3, onComplete: goto2})); } do this for every tween in the script that is causing the error when you test your movie you will get a trace of null for the object that isn't found.
  18. yeah, as far as I know you can't mix and match the loading of AVM1/2 movies.
  19. I think what you want to access is the rawContent of your swfLoader. thumbnail = LoaderMax.getContent(swf.@name).rawContent then you can target all the properties and methods that you need of that loaded swf such as thumbnail.gotoAndStop(5) read tip 1: http://www.greensock.com/loadermax-tips/
  20. autoAlpha is a plugin so it needs to be manually activated in TweenLite and it does add a miniscule amount of size to your swf. Some people may consider that a benefit of using regular alpha.
  21. autoAlpha effects an object's visible property as well as alpha. this is handy when you want to fade out a button that responds to mouse events. if you do an alpha tween to alpha:0 on a button, it will be fully transparent, but still clickable. if you do an autoAlpha:0, it will fade the alpha to 0 and in addition set the visible to false when the fade is done. http://www.greensock.com/as/docs/tween/ ... lugin.html
  22. when running your swf and clicking on something I got this error: I hunted down dow2() in cap_3. I got as far as looking at the cap_3 movie clip with 4 frames that contained up to 60 lines of very similar code. inside that 60 lines of code I found dow2 with a bunch of functions nested inside of each other that contain many objects. function dow2():void { cap_nu11.addEventListener(MouseEvent.CLICK, lovit2); function lovit2(event:MouseEvent):void{ var mySound:Sound = new punch(); var myChannel:SoundChannel = mySound.play(); cap_nu12.visible = true; cap_nu11.visible = false; splat2.visible = true; //var vi = MovieClip(parent).viata; //MovieClip(parent).viata = vi + 1; tl2.insert(TweenMax.to(splat2, speed2 + 0.2, {alpha:0, visible:0, onComplete: do2})); function do2():void{ tl2.insert(TweenMax.to(cap_nu12, speed2 + 0.1, {y:220.80, delay: speed2 + .3, onComplete: goto2})); } } var rade2:Number = random2(2,4); tl2.insert(TweenMax.to(cap_nu11, 0.4 , {y:229.25, delay:rade2, onComplete: goto2})); } in short, it would take someone like me hours to figure out what exactly the null object is. i also see that the error you got is different than mine. All I can tell you is that these 1009 null object reference errors simply mean that you are trying to run some sort of operation on something that doesn't exist. most of the time it is because a symbol has the wrong instance name or you mis-typed something. In your case it may be that there is a scope issue because so many functions are living inside each other. Sorry I can't be of more help. The swf did seem to run ok until I started clicking on things.
  23. I use autoAlpha on the main container clips so that in the case that their child elements have buttons or mouse interactivity... those features won't be active while that section is not being shown. glad you got it working
  24. it looks like you are de-blurring the parent marqDispplay from 20 and then separately removing a blur on imgArr[0].. which doesn't appear to ever have had a blur on it. that's not the real problem though. assuming the container marqDisplay_mc initially has no blur, then tweening FROM blurX:20 will blur from 20 to 0 as expected. if that tween is running and the current blurX is 10 when the user quickly hits "next" well.. then your FROM tween is going to blur FROM 20 to 10. a fromTo tween may help in this situation.
×
×
  • Create New...