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. just to clear things up, gotoAndStop is a valid method of TimelineLite and MovieClip. Although it wasn't clear in the initial post, it is not soupking's custom function. http://www.greensock.com/as/docs/tween/ ... toAndStop() SoupKing, I'm sorry but I don't really understand the question as I don't see any code pertaining to an actual TimelineLite instance. if menu_mc.feature1_mc is a MovieClip and lets say m1 = 5. if feature1_mc has a frame 5, then menu_mc.feature1_mc.gotoAndStop(m1) should work fine. I don't see how this relates to a TimelineLite/Max though. Carl
  2. thank you for posting the simplified file and code. very helpful to see just the elements that are causing the problem. The trouble is this, with as2 _alpha values go from 0 to 100. the fix is quite easy, now that I can test the file: stop(); import com.greensock.*; import com.greensock.easing.*; var timeline:TimelineLite = new TimelineLite({/*onComplete:playtii*/}); //fade-in timeline.append(TweenLite.from(mc, 1.7, {delay:.2, _xscale:80, _yscale:80, _alpha:0, ease:Expo.easeOut})); //fade-out timeline.append(TweenLite.to(mc, .7, {delay:.2, _xscale:80, _yscale:80, _alpha:0, ease:Expo.easeOut})); //here will be some animation of other MCs then i want to show again the sleekMC //fade-in timeline.append(TweenLite.to(mc, 3, {delay:1, _xscale:180, _yscale:180, _alpha:100, ease:Expo.easeOut})); hope this helps. also, in the future, please refrain from using URGENT in post titles. everybody's issues are of equal importance. A lot of people who help out in forums will read that as IGNORE! thanks. Carl
  3. i made a sample file for easing the timeline but forgot to attach it last night. take a peek
  4. glad to see you making such quick progress. its a lot of fun. There's a lot to learn, but don't get overwhelmed, what you can do with a little core knowledge can go a long way. I found I learned the most by just -reading through the documentation and experimenting with the features I was reading about -and spending time just reading through the forum posts. there is a literal gold mine of information in here. keep up the great work. Carl
  5. yes, you can put the allTo into a TimelineLite and then ease the currentProgress of the timeline: var mcs_array:Array = [put a bunch of mcs here]; var tl:TimelineLite = new TimelineLite({paused:true}); //append allTo to timeline tl.appendMultiple(TweenMax.allTo(mcs_array, 1, {y: 100}, .2)); //tween the timeline's currentProgress //experiment with durations and ease types in the next line TweenLite.to(tl, 5, {currentProgress:1, ease:Circ.easeIn}); you can get some really cool effects, try adding a bounce and the timeline will play and rewind in a bouncing motion. the code above will start the tweens in the timeline very slow and progressively get faster. this will progressively decrease the stagger amount and also make the playback of the tweens faster if you want the tweens to playback at their normal rate, but have the stagger amount decrease over time, then you can't do allTo, you'll have to do a loop like Zync suggests here: viewtopic.php?f=1&t=4589
  6. thanks for posting your file and code. it really helped. I'm not exactly sure why the blink was happening, but I have a solution. Instead of using a negative delay, use a negeative offset parameter. test the following code import com.greensock.*; import com.greensock.easing.*; var MainTimeline:TimelineLite = new TimelineLite(); // mc1 MainTimeline.append(TweenLite.to(_root.mc1, 0, {_x:-100, _alpha:0 } )); MainTimeline.append(TweenLite.to(_root.mc1, 1, {_x:212, _alpha:100, delay: .2, ease:Back.easeOut })) ; MainTimeline.append(TweenLite.to(_root.mc1, 1, {_x:595, _alpha:100, _xscale:43, _yscale:43, delay: .5, ease:Back.easeInOut })) ; // mc2 MainTimeline.append(TweenLite.to(_root.mc2, 0, {_x:-500, _y:30 } )); MainTimeline.append(TweenLite.to(_root.mc2, 1, {_x:112, _y:30, _xscale:110, _yscale:110, ease:Sine.easeOut }), -.75) ; MainTimeline.append(TweenLite.to(_root.mc2, .5, {_x:10, _y:9, _xscale:90, _yscale:90, delay: 2, ease:Back.easeOut })) ; // mc3 MainTimeline.append(TweenLite.to(_root.mc3, 0, {_x:737, _alpha:0 } )); MainTimeline.append(TweenLite.to(_root.mc3, 1, {_x:281, _alpha:100, ease:Sine.easeOut }), -.75) ; it seems to get rid of the blink when I test. let me know if this works. thx. carl
  7. what is the total duration for the tween? you may have luck with just using the proper ease for easeOut: http://www.greensock.com/roughease/ Quint.easeOut slams on the breaks right around 70% change in value. try it with a 2 - 3 second duration. there are other ways, but it would help to have an idea of how long the tween lasts after the 1 second point in time. easiest way may be to just have 2 tweens. have you tried: one for 0 to .7 scale and another delayed for the .7 to 1 scale
  8. glad to hear it worked. you're welcome.
  9. button.addEventListener(MouseEvent.CLICK, goBackToRoot) function goBackToRoot(e:MouseEvent):void { LoaderMax.getLoader("oswiecenie").rawContent.backToRoot(); }
  10. you are very close. rawContent is a property of the SWFLoader, not the container that the swf gets loaded into. try this: function onLoadSWF(event:LoaderEvent):void { LoaderMax.getLoader("oswiecenie").rawContent.backToRoot(); } it looks like in your code the above function is nested inside goBackToRoot, which could cause problems.
  11. thanks for posting your results. hopefully this will prove useful to others in the future.
  12. wow, this was a real head scratcher. i figured out the problem, but I don't have a full solution. nor do I know why air2 handles it different than FP10. Here's the deal. notice how in your timeline in the Startseite layer, the frames for that layer end at frame 3? I understand you don't want that stuff showing up on frame 10, but once the playhead jumps past frame 3, all the stuff in frame1 gets removed. when you gotoAndStop(1) after timeline2 plays... none of that stuff is "there" thus the null object errors. if you extend the frames in layer StartSeite out to frame 10 (click on frame 10 in startseite layer and press f5) and test, the app will jump back to frame1 when you press the button after the second timeline runs. There will not be any errors. BUT the animation doesn't appear to play because your timeline has tweens with allFrom alpha of 0 and the movieclips have already had their alphas set to 0 the first time the timeline played. make sense? -------- if is necessary to get this working in air2 I think the only solution is to -keep all your assets and code on frame 1 -adjust your script so that all the timeline2 assets are invisible until timeline2 is told to play -timeline2 starts out with {paused:true} instead of having gotoAndStop(1) or gotoAndStop(10) as you onReverseComplete functions. you will have var timeline:TimelineMax = new TimelineMax({onComplete:function ():void {timeline.pause();}, onReverseComplete:timeline2.restart}}); var timeline2:TimelineMax = new TimelineMax({paused:true, onComplete:function ():void {timeline.pause();}, onReverseComplete:timeline.restart}}); ------- hope this helps carl
  13. a few things. getDepth() and .depth are not part of AS3 of LoaderMax. managing the stacking order of objects in AS3 is a bit different than as2 but far better. if _aImages[0] actually does reference a ContentDisplay or any DisplayObject there are a few things you can try test addChild(_aImages[0]) //this should put the image on the top of everything else. this assumes your images are not in some other container. you didn't show what you are putting in your array or how you are adding your items to the DisplayList so I have no idea where they are or how to target them. by chance if you loaded them all into a parent clip you would do: imagesHolder_mc.addChild(someInstance) to move someInstance to the top. to figure out the depth of a clip you would use getIndex() check http://help.adobe.com/en_US/FlashPlatfo ... #addChild() and read about every method that uses the word Child or Index. I think you have a good idea about how these things work, but you need to figure out where the images/ContentDisplay objects are before you can move them around. try trace(getIndex(_aImages[0])) somewhere in your code after the images load. if you can get addChild and getIndex to work, then you should be able to test swapChildren(someImage, anotherImage)
  14. what are the results of your traces? can you confirm that a_images[1] targets your ImageLoader? its hard to give any real assistance without seeing how the array is built or how you added the Loaders to the displayList. can you post more code or a simplified set of files that exhibits the problem?
  15. no problem, i'll give it a look a bit later. Just to be clear, I have no experience with exporting for AIR and don't know how it may differ. Carl
  16. Carl


    it is very difficult to understand your question. you can build your project many ways, and yes you will need AS3. option 1: easier to do. less flexible every landing page can have its own swf and load its own xml which states which video should load redLanding page loads red.swf which loads red.xml which has info on red.flv greenLanding page loads green.swf which loads green.xml which has info on green.flv blueLanding page loads blue.swf which loads blue.xml which has info on blue.flv option 2: more complicated to get working but more flexible for future landing pages and easier to make changes every landing page can use the same swf but it tells the swf which xml to load via flashVars redLanding page loads videoLoader.swf and tells it to load red.xml which has info on red.flv blueLanding page loads videoLoader.swf and tells it to load blue.xml which has info on blue.flv greenLanding page loads videoLoader.swf and tells it to load green.xml which has info on green.flv option 3: every landing page loads the same swf which loads the same xml file with all the info on all the videos. the landing page tells the swf what VideoLoader to load from the xml. from your description this is most likely what is happening now and if it works, it should be quite fine. all landing pages load videoLoader.swf which loads videosList.xml which contains info on each video. each landing page communicates to the swf which VideoLoader to initiate. for options 2 and 3 you will need a solid understanding of LoaderMax / AS3 and experience passing variables from html to flash. you can probably get option 1 to work by reading the documentation and examples on greensock.com
  17. i built a similar yet simplified file that works in cs5 with no errors: frame 1 import com.greensock.*; mc1.addEventListener(MouseEvent.CLICK, function(e:Event):void{trace("hello"); timeline.reverse()}) stop(); var timeline:TimelineMax = new TimelineMax({onComplete:function ():void {timeline.pause();}, onReverseComplete:function ():void {gotoAndStop(10)}}); timeline.append(TweenMax.to(mc1, 1, {scaleX:1.5})); frame 10 mc2.addEventListener(MouseEvent.CLICK, function(e:Event):void{trace("goodbye"); timeline2.reverse()}) stop(); var timeline2:TimelineMax = new TimelineMax({onComplete:function ():void {timeline2.pause();}, onReverseComplete:function ():void {gotoAndStop(1)}}); timeline2.append(TweenMax.to(mc2, 1.5, {scaleX:1.5})); i thought maybe the gotoAndStop(0) or all the anonymous functions could have been the problem, but it works. see attached and test. if you want to provide your file i'll take a look at it
  18. mr doobs profiler is probably as good as they get. i haven't done any comparisons but I used SWFProfiler to test yours. http://www.lostinactionscript.com/blog/ ... -profiler/
  19. very glad you got it working. the code i posted with append using a negative offset has no errors and will work fine. this is a very common technique. perhaps it is explained better here: http://www.greensock.com/as/docs/tween/ ... ml#append(); it could come in handy in the future. c
  20. ok, that makes it more clear. keep in mind the following 1: i'm guessing you are using KEY_DOWN. KEY_DOWN fires repeatedly while a key is held down. test this code and hold down any key for 3 seconds. stage.addEventListener(KeyboardEvent.KEY_DOWN, downHandler); function downHandler(keyEvent:KeyboardEvent) { trace("some key is down"); } you will see that it traces as long as the key is held down. i imagine you are using this behavior to move your ship. 2: TweenMax.to() tweens always start at the display objects CURRENT value and tweens to the target value. yoyo brings them back to the starting value --------------- what's happening with your glow tweens is that as you hold down a key (just a guess) the tweens are being constantly re-created with new starting values. lets keep it simple and say every time you press a key an mc tweens to an x value of 100 with a duration of 2 seconds this mc is on the stage with an x of 0. TweenMax.to(mc, 2, {x:100, repeat:1, yoyo:true}); USER INTERACTION 1:Optimal the instant you press a key the tween starts moving from 0 to 100. if you release quickly it will go to 100 and yoyo back to 0. USER INTERACTION 2:reality NOW, lets say you press a key to initiate the same tween. mc starts at 0 making its way to x:100 1 second later you are STILL holding the key down. the tween gets regenerated and now you are starting a new tween at 50. you release. the mc moves from 50 to 100 and BACK to 50. ------- i believe this is what is happening with your glows. (i don't know for sure as i haven't seen the code) if you start your swf and press a key very quickly the glow yoyos nicely. as you repeatedly press more keys you are repeatedly starting new tweens with new start values. -------- I can't trouble shoot your implementation without seeing it. at this point i would see if KEY_UP is acceptable (fires only once). every time you tween to a new glow color, you might want to try using an onComplete handler to remove the glow as opposed to yoyo. -------- please experiment with these suggestions. for me to do this for you would take a bit more time than i currently have. once you have made some adjustments you can post an fla with just the mc and the key interactions and it will help us trouble shoot it further. Carl ps. your game looks like it is really coming along. nice job!
  21. i tested your code and I've seen no increase in memory usage. it stays virtually constant. please provide a sample fla Carl
  22. i haven't tested this yet, but it seems like a very taxing approach whether you are using tweenmax or not. you are constantly creating new tweens and overwriting them the instant they start. no tweens ever even finish. try having a short duration and run the flick w/ onComplete instead. see if this works better flck(); function flck():void { if (this.currentFrame == 2) { var brt:Number = Math.random(); TweenMax.to(glow, .1, {colorMatrixFilter:{brightness:brt}, onComplete:flck}); } } you can try making the duration even shorter like .05 if that isn't quick enough. pls let us know if you see less memory problems.
  23. i can confirm it is not working in firefox. i tried to load an image directly from http://h3games.awardspace.com/test/test/pic13.jpg and got a very strange error message in firefox h3games.awardspace.com] [Mon Mar 14 20:32:49 2011] [error] [client] Premature end of script headers: f403.php Error 500: Script Execution Failure Description: The server encountered an internal error or misconfiguration and was unable to complete your request. Most common reasons for returning this error message are: • File Upload Mode When you upload Perl, CGI scripts via FTP you should use always ASCII mode. If you get "Error 500: Script Execution Failure" you should check whether your FTP client uses ASCII mode when uploading your scripts, because if it uses BINARY mode to upload your scripts they won't work on the server. The problem caused by wrong upload mode is associated with the way different operating systems handle the "end of line" character. Unix system uses a "line-feed" (LF), Windows uses a "carriage-return" (CR) and "line-feed" (LF) pair. That's why it is very important that you set the uploading mode to ASCII. • File Permissions When you upload scripts via FTP the file permissions are set by default to 755. If you get "Error 500: Script Execution Failure" you should check whether your scripts have 755 permissions. Otherwise your scripts have lower level of permissions and does not support execution upon request. The octal representation of the 755 permission is equal to the following textual format: -rwxr-xr-x Most FTP clients support the CHMOD command which is used for setting file permissions. In case you have set improper permissions to your scripts, use your FTP client and set "Read, Write, Execute" permissions for the owner, "Read, Execute" permissions for the group and everyone else. • Script Errors This is the third well known reason for getting "Error 500: Script Execution Failure" upon execution of your scripts. Check your scripts for any obvious syntax or programming errors to make sure your code is not broken. Remember: When you get a "Error 500: Script Execution Failure", you should always check for any file uploading problems (ASCII/BINARY) and the executable permission settings. Once those are checked and verified, it looks like there is a syntax error or some other problem in the script. -------------- visit that image link and ff and see if you get the same message. no error with safari
  24. and what happens if you click 3 times? does it tween back to a yellow glow? does it always alternate?
  25. what happened when you tried offsetting the start time of the text tween as I suggested in the second group of code in my response above? C