Jump to content
Search Community

Zync

Members
  • Posts

    72
  • Joined

  • Last visited

Everything posted by Zync

  1. Hey mate, Remember in Gaia that the top left isn't truly the TOP-LEFT if your centering your content via the included panel in the framework. What you can do is run a Gaia.api.getSitePosition() to find how far the site's top left has shifted and use a bit of math in your positioning code. Cheers -Z
  2. OK did a bit of a re-record and part 1 and 2 are up on Youtube. Links are below. part 3 should be up before the weekend too. Cheers again for the Shockingly green membership as well PART1: PART2:
  3. Yeah thats weird, the code hinting works fine in the Flash CS5 Actionscript editor, but its no dice in FlashDevelop. Ah well must be a flash Develop bug, cheers for ya help.
  4. G'day guys and girls, So I thought I'd take a go at making a video tutorial for LoaderMax after introducing it to my 2nd year AS3 class this year. I'm a University Teacher from Melbourne, Australia by the way. It's going to be a 2 part and the first part is available for download below. This is meant to be a really basic concept of how you could go about building a gallery from scratch, so it's probably not going to be as optimized as it could be and its also aimed at a relatively new (2nd year Uni students) actionscript developers. Unfortunately I didn't realize Youtube has a cap of 15mins and the first part runs for 18, but I might end up re-recording it for Youtube or just try and find another place to host it. For the moment though you can grab it from my site. Tutorial Assets: DOWNLOAD ~ 600KB PART 1: Loading our XML and Thumbnails DOWNLOAD - 18mins ~ 40meg mp4 PART 2: Loading our main Image, setting up click Handlers & Tweens COMING SOON Cheers all, comments and constructive crits always welcome -Z
  5. Nah I dont think Flash develop is on the Mac, but I'm definitely on a win 7 pc. And I also just realized I put this in the loading forum, oops. It works without any dramas with Loadermax though, the code hinting for vars that is
  6. G'day mate, Just wondering if TweenMaxVars have changed at all from the blog post you have on your site? I'm trying something like this: TweenMax.to(thumbHolder, 0.5, new TweenMaxVars().autoAlpha(0)) But when I put a . after the autoAlpha setting I'm not getting code hints to apply other props to the TMV object. With loadermax this chaining system works perfectly but has something changed with TweenMaxVars? I'm getting code hints for toExponential, toString, toFixed etc while trying to chain. Is it not returning a TweenMaxVars object or something? Cheers. using Flash Develop btw. Cheers -Z
  7. G'day mate, With TweenLite (and TweenMax) you don't need to create a new instance of it every time when adding it to a timelinelite/max. You can just go TweenLite.to() etc. Try this: var timeline:TimelineLite = new TimelineLite(); timeline.append(TweenLite.to(TA_mc, 6, {rotation:360})); timeline.append(TweenLite.to(TA_mc, 6, {x:"600"})); timeline.append(TweenLite.to(TA_mc, 6, {y:"400"})); timeline.append(TweenLite.to(TA_mc, 6, {alpha:0}));
  8. Hey ya mate, Based on your first post, why do you have 2 progressHandlers in there? function progressHandler(event:LoaderEvent):void { progressBar.scaleX = event.target.progress; } function progressHandler(event:LoaderEvent):void { myTextField.text = int( loader.progress * 100 ) + "%"; } You can put the myTextField.text change in the first progressHandler and ditch the second all together.
  9. Oh thats awesome, cheers mate for including this in.
  10. Sorry for the triple post but figured it out.. I think, in case anyone else wanted to know. If there's a better way please let me know but I think this works. So what I did was assign properties to my LoaderMaxVars object like so (index, title and desc): var iLoad:ImageLoader = new ImageLoader("images/" + xImgList[i].@url, new ImageLoaderVars() .centerRegistration(true) .name(xImgList[i].@name) .width(100) .height(100) .container(thumbHolder) .x((i%2)*100) .y(int(i / 2) * 100) .prop("index", i) .prop("title", xImgList[i].@title) .prop("desc", xImgList[i].@desc) ) Setup an Event Listener as per normal for the ContentDisplay object. And in the on click function I can access the vars by getting the ImageLoader object's vars?: private function thumbClick(e:MouseEvent):void { var vars:Object = ImageLoader(e.currentTarget.loader).vars trace(vars.title) } That seemed to do the trick
  11. Hey ya, Sorry to keep bugging ya mate, but any dice on how to access those prop values from the contestDisplay object reference?
  12. I think my brain just tripped and fell over inside my head but how do i access said property? I've got: var img:ContentDisplay = LoaderMax.getContent("p" + (i + 1)); but trace(img.index) or trace(img.data.index) both dont seem to work? Is there a getter in the content display class to get the prop value based on the key? private function xmlLoaded(e:LoaderEvent):void { var xLoad:XML = e.target.content; xImgList = new XMLList(xLoad.img); var thumbLoader:LoaderMax = new LoaderMax({name:"thumbLoader"}); thumbLoader.addEventListener(LoaderEvent.COMPLETE, thumbsLoaded); for (var i:int = 0; i < xImgList.length(); i++) { trace(i) var iLoad:ImageLoader = new ImageLoader("images/" + xImgList[i].@url, new ImageLoaderVars().centerRegistration(true) .name(xImgList[i].@name) .width(100) .height(100) .smoothing(true) .scaleMode("proportionalOutside") .crop(true) .container(thumbHolder) .x((i%2)*100) .y(int(i / 2) * 100) .prop("index", i) ) thumbLoader.append(iLoad); } thumbLoader.load(); } private function thumbsLoaded(e:LoaderEvent):void { for (var i:int = 0; i < xImgList.length(); i++) { trace("i: " + i); var img:ContentDisplay = LoaderMax.getContent("p" + (i + 1)); img.addEventListener(MouseEvent.ROLL_OVER, thumbOver); img.addEventListener(MouseEvent.ROLL_OUT, thumbOut); img.addEventListener(MouseEvent.CLICK, thumbClick); trace(img.index) } }
  13. Hi ya, Firstly, gotta say loving Loadermax, but trying to wrap my head around this contentDisplay class. In the old days I could freely attach variables to my movieclips so that I could specify an index for example for a button thumbnail, and when i clicked on that thumbnail I could get that index and do stuff with it, like grab text from XML using the index as a position. Is this possible with the ImageLoader when adding it to the stage or before it? Don't suppose I could just add an index value to the vars huh? private function xmlLoaded(e:LoaderEvent):void { var xLoad:XML = e.target.content; xImgList = new XMLList(xLoad.img); var thumbLoader:LoaderMax = new LoaderMax({name:"thumbLoader"}); thumbLoader.addEventListener(LoaderEvent.COMPLETE, thumbsLoaded); for (var i:int = 0; i < xImgList.length(); i++) { trace(xImgList.@title) thumbLoader.append(new ImageLoader("images/" + xImgList.@url, new ImageLoaderVars().centerRegistration(true) .name(xImgList.@name) .width(100) .height(100) .smoothing(true) .scaleMode("proportionalOutside") .crop(true) .container(thumbHolder) .x((i%2)*100) .y(int(i / 2) * 100) .index(i) )); } thumbLoader.load(); }
  14. Hmm ok seems like I got the same problem still. Downloaded the latest as2 versions of everything but still the timeline wont restart. In fact I cant even find the restart function in TimelineLite? Or am I just being a noob? EDIT: Ah nvm that last bit, its in tween core huh. But yeah still nada on restart
  15. Awesome Jack, love your work, thanks heaps for that.
  16. Yeah it just doesn't restart the tween. The onComplete event fires fine but even with this.tl.restart() the timeline doesnt restart. Is that because the clip is already alpha'd at 0? Timelinemax doesnt seem to have this problem tho with the restart:-1 paramater
  17. Hi ya, I'm working on a quicker banner ad that needs to use AS2 but for some strange reason the restart isn't working as intended for me. Probably some nooby mistake I'm making but it seems OK code wise? import com.greensock.TimelineLite; import com.greensock.TweenLite; /** * ... * @author Zync */ class cp720Banner extends MovieClip { public var coxPlateFeature:MovieClip; public var theRace:MovieClip; public var tattsCoxPlate:MovieClip; public var sat23:MovieClip; public var moonVal:MovieClip; public var nova:MovieClip; public var onSale:MovieClip; public var logos:MovieClip; public var tl:TimelineLite; public function cp720Banner() { var nScreenTime:Number = 0.5; tl = new TimelineLite({onComplete:restartMe}); tl.timeScale = 1; tl.addLabel("start", 0); tl.append(TweenLite.from(coxPlateFeature, 1, { _alpha:0, delay:nScreenTime } )); tl.append(TweenLite.from(theRace, 1, { _alpha:0 } )); tl.append(TweenLite.to(theRace, 1, { _alpha:0, delay:nScreenTime } )); tl.append(TweenLite.from(tattsCoxPlate, 1, { _alpha:0 } )); tl.append(TweenLite.to(tattsCoxPlate, 1, { _alpha:0, delay:nScreenTime } )); tl.append(TweenLite.from(sat23, 1, { _alpha:0 } )); tl.append(TweenLite.to(sat23, 1, { _alpha:0, delay:nScreenTime } )); tl.append(TweenLite.from(moonVal, 1, { _alpha:0 } )); tl.append(TweenLite.to(moonVal, 1, { _alpha:0, delay:nScreenTime } )); tl.append(TweenLite.from(nova, 1, { _alpha:0 } )); tl.append(TweenLite.to(nova, 1, { _alpha:0, delay:nScreenTime } )); tl.append(TweenLite.from(onSale, 1, { _alpha:0 } )); tl.append(TweenLite.to(onSale, 1, { _alpha:0, delay:nScreenTime+1 } )); } private function restartMe():Void { tl.restart(); } }
  18. Zync

    zoom in & out

    Not to drown out transformAroundPoint from Greensock (which looks pretty damn awesome) but for animating zooms and pans I've always found using Greensock Tweening with As3 vCam to be the best simple solution. Check out as3 vCam and use it with TweenLite/Max for some awesome results. http://bryanheisey.com/blog/?p=1
  19. Hi All, This is my first site using TweenMax and TimelineMax. Firstly just want to say thanks to Jack and the Greensock community for making this possible. http://www.squishthegrapes.com.au Almost all of the animation was done with Tweenmax and the Feet were tweened with Timelinemax. The competition is only open to Australian resident but all can play the game. Now live here: http://www.zyncinteractive.com.au/portfolio/stg/
  20. I would love to see how the structure of the animation works too on the main page. Its great having the APi but how to structure long animations like that would be even more helpful.
  21. I dont think this functionality is there in TweenLite as it's meant to be a cut down version of TweenMax. It is definitnely there in TweenMax tho. Have a look see here: http://www.greensock.com/as/docs/tween/ ... ml#fromTo() You could fake it in TweenLite I think though. Try this: TweenLite.from(myClip, 1, { x:100, y:100, delay:1, onComplete:function() { TweenLite.to(myClip, 1, { x:200, y:200 } ) } } );
×
×
  • Create New...