Jump to content
Search Community

Carl last won the day on December 24 2023

Carl had the most liked content!

Carl

Moderators
  • Posts

    9,825
  • Joined

  • Last visited

  • Days Won

    546

Everything posted by Carl

  1. It seems you are well on your way to getting some good findings on your own. I've heard from quite a few sources that Fireworks does a much better job at compressing than Photoshop so you can start with a higher quality image at lower size: http://webdesignerwall.com/general/fire ... ompression so if you bring in a well-compressed jpg to flash you can choose "use imported jpg data" and be done with it. Or you can try to skim a few more kb off by letting Flash re-compress it. --------- for transparent images, you can bring in transparent png and then use Flash's jpg compression on the way out and you can make it smaller and still preserve the transparency. if you have the time to manually mask your images, that will probably give you a better file size savings -------- I haven't had to really crunch a banner in awhile so I'm a little rusty on all the tricks. I think you will get more thorough responses if you posted in http://forums.adobe.com/community/flash ... ns&start=0
  2. Just an FYI, this post has inspired me to create a brief tutorial on using this method with a variety of animation styles: http://www.snorkl.tv/2011/08/tile-trans ... d-masking/ thanks rhernando!
  3. no problem. from what I have heard, future versions of the Flash Player will give the developer much better control of when garbage collection can and can not happen. It will be a welcome addition for many of us! I really did enjoy your animation, its a very cool effect with little coding effort and something I don't see all that often.
  4. Hi Eckstein, The problem arises because when you use insertMultiple or appendMultiple you can only include ONE allTo. insertMultiple and appendMultiple expect a single array of tweens. each time you use allTo you are creating a new array of tweens. so what happened when you use 2 allTos inside an insertMultiple() was that you were passing in 2 arrays. the solution is to put each allTo inside its own insert or append. I don't know exactly how you intend each individual tween inside each allTo to sequence, so you can add that code where necessary. here is a simplified approach that builds a sequence of all fade out all fade in all move left all move right TIMELINE.insertMultiple(TweenMax.allTo(ARRAY, 1, {alpha:0})) TIMELINE.appendMultiple(TweenMax.allTo(ARRAY, 1, {alpha:1})) TIMELINE.appendMultiple(TweenMax.allTo(ARRAY, 1, {x:"-100"})) TIMELINE.appendMultiple(TweenMax.allTo(ARRAY, 1, {alpha:1})) TIMELINE.appendMultiple(TweenMax.allTo(ARRAY, 1, {x:"100"}))
  5. I've read this post like 4 times and I'm having a tough time understanding how it works or how it is supposed to work. It's very difficult to visualize this scenario without seeing the interactions that are supposed to trigger the loading of the various swfs. The code is a bit difficult to read. It appears as though you are using the same loader to load multiple swfs and conflicts are arising when you try to load more than one swf at a time. Once the swf is partially loaded, what happens when it gets played? does the download resume automatically? or do you have something in place to trigger that? My gut tells me that you are probably better off having a SWFLoader for each swf and it will be much easier to monitor the individual load progress. I'm also not experienced with only loading part of a swf. I know you admitted that you are new to this, and that is fine, so am I. I just wonder if wouldn't be easier to explore some of the features of LoaderMax which allow you to monitor the loading and playback of multiple assets instead of trying to get this "one SWFLoader for all" approach to work. I don't know how much help I am going to be to you, but my bet is that it would be much more helpful if you posted some files that could be tested. to make things easier the subloaded swfs don't have to be massive or have anything crazy going on. perhaps a solution will be more clear to someone else.
  6. You need to set up a VIDEO_COMPLETE event listener which will fire when the video is done playing 1: import the LoaderEvent import com.greensock.events.LoaderEvent; 2: hook up an event listener to your videoTest loader videoTest.addEventListener(VideoLoader.VIDEO_COMPLETE, done); function done(e:Event):void{ trace("done"); //add code to add replay button }
  7. Very cool animation you have there. I see the jerkiness. There may be a few factors that combined may be contributing to it 1: large stage and great amount of travel distance means a much bigger re-draw area 2: 60fps may be too demanding on some systems 3: use of glow filter 4: constant and quickly paced creation of tweens / function calls via delayedCall(.1, reproductions) ------ the unfortunate news is that I played around with your file quite a bit and messed with some of the factors above. I also attempted to do some object pooling (instead of destroying and creating objects over and over again you just re-use the same objects). For instance I used a loop to create 50 tweens (with offset delays) that would repeat constantly. This didn't show any noticeable performance gain and I had an issue with some objects overlapping. it was a quick test. I removed the bezier plugin (just did a straight tween) and also enabled FastEase for a quad ease. Nothing really made the occasional slow-down go away. It seems there are times where it can run buttery smooth for a few seconds and then it "gets a little tired". I can tell you from many years of experience with Flash that sometimes you just have to "deal with" the performance limitations of the player. Flash can run very differently based on environment: stand alone player vs flash ide test vs every browser plugin version. I'm doing some TweenMax stuff right now with a hundred clips scaling and fading while mask-revealing an image and it runs great. I know people have tweened thousands of things simultaneously with no problem. Also, I'm not an expert on Flash Player performance optimization, or code optimization for that matter. Perhaps someone else around here can see something that may be causing the player to bog down over time. Carl
  8. the best thing to do is just zip and upload your 2 flas. make them as simple as possible. I'll look at them.
  9. are you waiting until the swf is fully loaded and added to stage before trying to target myTimeline?
  10. normally I don't spend a lot of time on optimizing complex code, but this reminded me of one of my code challenges AND I had a grid loop laying around. here is my demo swf: http://snorkl.tv/dev/gridDemo/ (click the button multiple times to toggle the direction of the animation) Here is the code: import com.greensock.*; import com.greensock.easing.*; import com.greensock.plugins.TweenPlugin; import com.greensock.plugins.ScalePlugin; import flash.display.MovieClip; import flash.events.MouseEvent; TweenPlugin.activate([scalePlugin]); var cont:MovieClip = new MovieClip(); addChild(cont); var numTiles:Number = 63; var cols:Number = 9; var tl:TimelineMax = new TimelineMax({paused:true, reversed:true}); for (var i = 0; i var newTile:Tile = new Tile(); newTile.x= 25 + (i % cols) * (newTile.width); newTile.y = 25+ int(i / cols) * (newTile.height); newTile.scaleX = newTile.scaleY = 0; newTile.alpha = 0; tl.insert(TweenLite.to(newTile, .5, {scale:1, alpha:1, delay:(i % cols)*.05})); cont.addChild(newTile); } tl.insert(TweenLite.from(cont, 1, {x:600})); btn.addEventListener(MouseEvent.CLICK, toggleTl); function toggleTl(e:MouseEvent):void{ tl.reversed = !tl.reversed; tl.resume(); } pretty much everything happens in the loop that builds the grid. I noticed from your sample swfs (thanks, they were a big help) that pretty much every item in a column did the same thing. In my loop all the tiles have the same tween except the delay is based on what column they live in. I put all the tweens into a TimelineMax so that I could easily reverse the entire sequence. This is really a testament to the power of TimelineMax. To understand more about how the grid is built with the % modulo operator, read Rich Shupe's article here: http://www.learningactionscript3.com/20 ... ing-clips/ cs4 fla attached
  11. that's because you are not importing the necessary Loader classes. import com.greensock.loading.* please read the documentation and sample code for mp3Loader here: http://www.greensock.com/as/docs/tween/ ... oader.html
  12. thank you for providing the clear files. a TimelineLite/Max has a timeScale property which dictates the speed at which it plays .5 = half speed 1 = normal speed 2 = double speed to make it go faster and faster, you need to increment timeScale each time a button is pressed btn4.addEventListener(MouseEvent.CLICK, handler_goFasterRight); function goFasterRight(e:MouseEvent):void{ timeline.timeScale += .5 } Keep in mind, that the buttons for "normal speed left and right" need to set timeScale back to 1.
  13. add this to your imports up top import com.greensock.events.LoaderEvent;
  14. your code looks very good and I didn't see anything jump out that would cause the problem. before the Error fires, notice that you are getting "undefined" when trying to trace out e.target.ID that means the object that you clicked on does not have an ID property. so what you need to do is figure out what e.target is. try adding trace("the target is an " + e.target) trace("the name of the target is " + e.target.name) to the beginning of your onClick function. Most likely the problem is that inside your buttons you have other Textfields, MovieClips or Sprites that are the actual target of the CLICK event and they do not have an ID property. ----------------- to fix this add the following: nav_mc.kuchnia_btn_mc.mouseChildren = false; nav_mc.sypialnia_btn_mc.mouseChildren = false; nav_mc.salon_btn_mc.mouseChildren = false; nav_mc.lazienka_btn_mc.mouseChildren = false; nav_mc.komercyjne_btn_mc.mouseChildren = false; right after you assign all the IDs
  15. check out throwProps. It was built for doing flicky scrolly tweens http://www.greensock.com/throwprops/ note the "panel scroll" example in the faq does not require the plugin.
  16. Killing a tween does not reset the properties that were being tweened on a given object. the TweenLites that get killed simply stop running. the easiest thing to do is to manually set your glow plugin settings back to normal with a 0-duration tween prior to kill. paste this into an fla with an mc on stage import com.greensock.*; import com.greensock.plugins.*; import flash.events.MouseEvent; TweenPlugin.activate([GlowFilterPlugin]) var myTween:TweenLite = TweenLite.to(mc, 5, {glowFilter:{color:0xff3366, alpha:1, blurX:15, blurY:15, strength:20}}); stage.addEventListener(MouseEvent.CLICK, killTweens) function killTweens(e:MouseEvent):void{ TweenLite.to(mc, 0, {glowFilter:{color:0xff3366, alpha:0, blurX:0, blurY:0, strength:0}}); TweenLite.killTweensOf(mc); } if you were using TweenMax, you could also just rewind the tween back to a currentProgress of 0 right before killing it. does that help?
  17. Great to hear. I'm glad the tutorials helped with your project. Thanks for the update.
  18. your greensock files are quite old. opamint is using more recent ones. that is why your swf wouldn't compile. you can download the latest greensock files from http://www.greensock.com/tweenlite it seems your project is much more complex than my initial misunderstanding. I don't even know that it is possible to adjust the alpha of a section of a movie clip. there may be someone more experienced around here that can help you further.
  19. its easiest just to upload the file here. use the "upload attachment" feature. make sure your fla is saved as Flash CS5 or lower and zip it. make the fla as "bare-bones" as possible. thanks
  20. first, very nice work you have done so far. looks really nice. From what I gather your problem is that you have a TimlineMax dictating the sequence in which certain elements should tween in and out, but you also have buttons that are telling elements that are controlled by the TimlineMax to be tweened by new TweenLites. Your file is quite complicated and I don't have the time to fix it, but I have a whole series of tutorials for navigating a TimelineMax. Basically you add labels to your timeline before each "section" animates in. You then have your buttons tell the TImelineMax to tweenTo("whateverlabelyouwant") or gotoAndStop("whateverlabelyouwant"); I believe a lot of the concepts discussed in the tutorial will apply to your project. start here: http://www.snorkl.tv/2011/03/bullet-pro ... o-section/
  21. I really don't understand your recent question at all. I assume there are some innocent typos. after reading greensock's response I will go ahead and assume you want the horizontal (red) path to go BELOW the blue gradient. as greensock mentioned it all has to do with stacking order. you need to make the blue and red gradients into movie clips so that you can stack paths above and below them as you need. I'm assuming the order you want is: redBg red path red path followers blue bg blue path blue path followers ------ the code looks like this: import com.greensock.*; import com.greensock.easing.*; import com.greensock.motionPaths.*; var boarder:mcBoarder; var boarder1:myBoarder;//movie clip from library //blue bg var path2:LinePath2D = new LinePath2D([new Point(200, 100), new Point(200, 300)]); //red bg var path3:LinePath2D = new LinePath2D([new Point(100, 200), new Point(400, 200)]); my_btn.addEventListener(MouseEvent.MOUSE_DOWN, createpath); function createpath(event:MouseEvent):void { addChild(redBg); addChild(path3); for (var k:Number = 0; k boarder1=new myBoarder(); path3.addFollower(boarder1, k / 6, true); addChild(boarder1); trace(boarder1); } addChild(blueBg); addChild(path2); for (var i:Number = 0; i boarder=new mcBoarder(); path2.addFollower(boarder, i / 6, true); addChild(boarder); trace(boarder); } } TweenMax.to(path2, 5, {progress:1, repeat:-1, ease:Linear.easeNone}); TweenMax.to(path3, 5, {progress:1, repeat:-1, ease:Linear.easeNone}); zipped cs4 fla attached
  22. use the loader's unload() method. http://www.greensock.com/as/docs/tween/ ... ml#unload() if you want to totally remove the loader from memory and flush the content, use dispose(true)
  23. i think you need: This ComicScene_mc.addChild(ComicDisplay.rawContent) instead of ComicScene_mc = ComicDisplay.rawContent;
  24. I can't open your fla (cs5.5), but if i remember correctly from your previous post it was quite difficult to work out.
×
×
  • Create New...