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. yeah. just assign each button the variable that you need. Check out my map tutorial it uses the same concept to display the names of each item that you roll over. http://www.snorkl.tv/2010/11/part-1-bui ... /#more-381 import com.greensock.*; description.storeName_txt.text = ""; description.phone_txt.text = ""; map_mc.buttonMode=true; map_mc.addEventListener(MouseEvent.MOUSE_OVER, mapOver); map_mc.addEventListener(MouseEvent.MOUSE_OUT, mapOut); map_mc.spatulaCity.storeName = "Spatula City"; map_mc.spatulaCity.phone = "917-897-0987"; map_mc.justInCaseCases.storeName = "Just In Case Cases"; map_mc.justInCaseCases.phone = "917-897-3227"; map_mc.chandlersChandeliers.storeName = "Chandler’s Chandeliers"; map_mc.chandlersChandeliers.phone = "917-897-8376"; map_mc.gunsPlus.storeName = "Guns Plus"; map_mc.gunsPlus.phone = "917-435-2345"; map_mc.potsNPans.storeName = "Pots N Pans"; map_mc.potsNPans.phone = "917-954-6547"; map_mc.campOut.storeName = "Camp Out!"; map_mc.campOut.phone = "917-934-9047"; function mapOver(e:MouseEvent):void{ var mapItem:MovieClip = e.target as MovieClip; description.storeName_txt.text = mapItem.storeName; description.phone_txt.text = mapItem.phone; description.gotoAndStop(mapItem.name); TweenMax.to(mapItem, .5, {tint:0xFF9900}); TweenMax.fromTo(description, .5, {alpha:0, x:50, blurFilter:{blurX:80}}, {alpha:1, x:10, blurFilter:{blurX:0}}); } function mapOut(e:MouseEvent):void{ var mapItem:MovieClip = e.target as MovieClip; TweenMax.to(mapItem, .5, {tint:0x990000}); }
  2. check out this one too: http://www.snorkl.tv/2010/08/assign-eve ... enttarget/
  3. here are all the files that were with the TweenFilterLite.as file. *note this stuff is from 2008
  4. thanks to both of you for sharing and welcome to the forums! Carl
  5. that is absolutely wonderful. very very cool. the mouse-reactive background is a very nice touch.
  6. yeah, even though I don't understand all of it, what you want is totally possible. its just a matter of how you access and store your data. Unfortunately I really can't dedicate any more time to this. Try to summarize your problem as concisely as possible and give it a shot in the adobe flash forums. http://forums.adobe.com/community/flash ... ns&start=0 where there are people who eat this stuff up. Best, Carl
  7. attached is version of TweenFilterLite.as I had laying around it is from 2009.
  8. i don't understand why buttonA1 modifies GE1 twice or why button A2 modifies GE2 twice. you could probably write one function that would allow any button to modify any bars in any graph. import com.greensock.*; function modifyGraph(graph, value1, value2, value3){ TweenLite.to(graph.bar1, .5, {_height:value1}); TweenLite.to(graph.bar2, .5, {_height:value2}); TweenLite.to(graph.bar3, .5, {_height:value3}); } button1.onRelease = function(){ modifyGraph(calciumDeposits, 80, 90, 30); } button1b.onRelease = function(){ modifyGraph(calciumDeposits, 45, 20, 90); } button2.onRelease = function(){ modifyGraph(frogs, 80, 30, 60); } button2b.onRelease = function(){ modifyGraph(frogs, 10, 80, 20); } all your graphs should contain a generic bar1, bar2, bar3 movie clips. each new graph just needs to have its own unique instance name for this to work. attached is an example. there are a dozen other ways to do this, but this will work for getting started.
  9. The general rule is that if you charge people to use your end product then a license is required. The license rules do not take into consideration what you plan to do with the money, just the fact that you are charging people to access your work.
  10. yes, if you pass in a value in quotes it will be a relative value TweenLite.to(mc, 1, {x:"100"}); this will move an object called mc 100 pixels to the right of where it is. see tip #4 http://www.greensock.com/tweening-tips/ enjoy Carl
  11. this should help: viewtopic.php?f=6&t=3268
  12. Hi Maggiee, It seems you may get a better response if you post in a forum relating to CSS. This thread deals specifically with loading a css file into flash. IE conditional statements are not at all related to this discussion.
  13. Bonus “physics2D” and “physicsProps” plugins for tweening objects based on velocity, acceleration, friction, etc can be seen in the plugin explorer. Keep in mind they require a Club GreenSock Membership "really green" or higher membership: http://blog.greensock.com/club/ I'm not so sure it is meant to achieve the effect that you want as your force and friction will be directly linked to the balls position in various curves. to do what you want is actually quite complex If you want an object to go faster or slower based on its position in a bezier curve you may want to look into Box2D which is a very robust physics engine http://box2dflash.sourceforge.net/ I'm not even sure Box2D has what you want built in.
  14. Jamie, As long as you keep answering the difficult questions, I think things are going to go really smoothly in here;) Carl
  15. you should familiarize your self with the basic GreenSock SWFLoader: http://www.greensock.com/as/docs/tween/ ... oader.html It is very easy to load a single swf and the documentation is very detailed. As for loading a swf that loads a swf and tracking the overall progress read this: viewtopic.php?f=6&t=5099 It may also be beneficial to read the documentation on LoaderMax. Once you have something sort of working, people can direct you on how to get around problems. In basic terms you create a LoaderMax that contains a SWFLoader that loads about.swf. about.swf will contain its own SWFLoader that has a requireWithRoot property: --- There is no built-in progress animation.
  16. Yeah, the problem is that you can't fade out the main timeline. Jamie's bitmap capture is very cool, but if you have any say in the matter it might be less complicated (for a beginner) to just restructure your file before you get too far. Once you start doing more with as3 you will find its better to have only 1 frame in your main timeline. I would suggest: 1: converting each frame to its own movie clip and then you can fade each movieclip when needed (as jamie also suggested). the difficulty for a beginner may be that you have to keep track of which clip is showing, so that you can fade it out. Although more difficult you could do a cross-fade where one clip is fading out WHILE the other clip is fading in. 2: paste all your main timeline frames into a movie clip. with this method you just need to tell one clip to fade and one clip which frame to go to. (note doing a true cross-fade would be impossible). import com.greensock.*; import flash.events.MouseEvent; black.addEventListener(MouseEvent.CLICK, blackHandler); function blackHandler(e:MouseEvent):void{ //fade out the container, when fade is done call fadeIn(1); TweenLite.to(container_mc, .5, {alpha:0, onComplete:fadeIn, onCompleteParams:[1]}); } blue.addEventListener(MouseEvent.CLICK, blueHandler); function blueHandler(e:MouseEvent):void{ //fade out the container, when fade is done call fadeIn(5); TweenLite.to(container_mc, .5, {alpha:0, onComplete:fadeIn, onCompleteParams:[5]}); } green.addEventListener(MouseEvent.CLICK, greenHandler); function greenHandler(e:MouseEvent):void{ //fade out the container, when fade is done call fadeIn(10); TweenLite.to(container_mc, .5, {alpha:0, onComplete:fadeIn, onCompleteParams:[10]}); } function fadeIn(frame){ container_mc.gotoAndStop(frame); TweenLite.to(container_mc, .5, {alpha:1}); } **container_mc is a movieclip that has keyframes on 1, 5, 15 denoting sections black, blue, green respectively. attached is a sample of #2.
  17. your swf size and connection speed is going to determine how fast the file will load. LoaderMax can't do anything to speed up a loading process. If you are noticing a delay you may want to set auditSize to false. auditSize : Boolean - By default, when the LoaderMax begins to load it quickly loops through its children and if it finds any that don't have an estimatedBytes defined, it will briefly open a URLStream in order to attempt to determine its bytesTotal, immediately closing the URLStream once the value has been determined. This causes a brief delay initially, but greatly improves the accuracy of the progress and bytesTotal values. Set auditSize to false to prevent the LoaderMax from auditing its childrens' size (it is true by default). http://www.greensock.com/as/docs/tween/ ... erMax.html
  18. very cool. I don't know how well I would have done with dotted curves.
  19. just realized the above advice is bad and doesn't work for LoaderMaxVars. sorry about that. carl
  20. try: vars.onInit = initEvent; i haven't tried it on a VideoLoader, or with a VideoLoaderVars object but on a simple tween: import com.greensock.*; var vars:Object = new Object(); vars.onComplete = test; vars.x = 200; TweenLite.to(mc, 1, vars); function test(){ trace("test"); } that works fine. let me know if it works for you. Carl
  21. if gotoAndStop is jerky, try doing a frame tween TweenMax.to(island_mc.ballAnimation_mc, .5, {frame:Math.round(e.target.progress * 100)}); but keep in mind that if your loading is sporadic, the animation will reflect that.
  22. if you are using the GreenSock classes in your file you can use a delayedCall. TweenLite.delayedCall(30, someFunction); function someFunction(){ //do whatever you need to make your video play }
  23. yup, here are 2 ways: Place eventListener on the loader's content var video:VideoLoader = new VideoLoader("final.flv"); video.content.addEventListener(MouseEvent.CLICK, clickHandler) function clickHandler(e:MouseEvent):void{ trace("clicked"); } video.load(); or if you place your video into a container clip on the stage, put it on the container var video:VideoLoader = new VideoLoader("final.flv", {container:mc}); mc.addEventListener(MouseEvent.CLICK, clickHandler) function clickHandler(e:MouseEvent):void{ trace("clicked"); } video.load();
  24. "assets/video.flv" refers to the location of the video.flv file in relation to your swf file. no. I don't know what myNatureScene refers to. currentProgress usually refers to how much of TweenLite or TimelineLite has played. It is not used to control where the playhead is on a VideoLoader. You should look into reading the documentation on playProgress or gotoVideoTime if you want to control the playhead position: http://www.greensock.com/as/docs/tween/ ... ayProgress Which ever method you use will not go INSIDE the line of code that is used to create your VideoLoader. It will come after and more specifically only be executed once the video has loaded. video.playProgress=.5;
×
×
  • Create New...