Jump to content
Search Community

trispo

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by trispo

  1. You are repeating infinitely with repeat : -1 Try this: stop(); import com.greensock.*; import com.greensock.easing.*; var TA:TimelineMax = new TimelineMax({repeat:1}); // substitute -1 with +1 TA.append( TweenMax.to(Logo, 2, {x:500, y:342.5, delay:0.5, ease:Strong.easeOut})); TA.append( TweenMax.to(Logo, 2, {x:-500, delay:6})); TA.append( TweenMax.to(Banner, 2, {rotation:0, delay:1, ease:Strong.easeOut})); TA.append( TweenMax.to(Banner, 2, {x:1000, delay:3, ease:Strong.easeOut}));
  2. On this site, we are not using scrollrect. To detect whether a tile is on stage or not we are simply using Math. We know the width and height of the tile and the width and height of the stage. So we can simply calculate which tile is on stage and which not. All tiles are positioned in one container sprite which is moved across the stage. I'm not allowed to tell more details here but trust me it's no rocket science.
  3. Well, fortunately I'm working in the agency behind capri-sonne.com. The grid loading is no rocket science. We have two versions of every tile a high-res and a low-res one. The low-res ones are loaded during the preloading process and displayed immediately. Then while "flying" around we check which tiles are currently on stage and whether the high-res versions of those tiles have already been loaded. If yes show them if not load them and show them afterwards. It's that simple. trispo
  4. Hey _Vlad_, did you create a mouse selection mode yet? I would be interested in it, too. Thanks, trispo
  5. OK, thanks for the quick reply. I knew this would be slower. I'll think about an inherited class. Maybe I'll post it here. Thanks anyways.
  6. Hi Jack, when using masked display objects in an AutoFitArea it obviously does not recognize the "visible" width and height of that object. I think you can easily provide such a feature. Colin Moock has published methods which you could use: http://www.moock.org/blog/archives/000292.html I hope you will give us the option to use visible widths and heights. Thanks trispo
  7. Sorry, I didn't recognize that your are using a previous version of the Tweening Engine. I recommend updating to the current version 11! The first line is indeed wrong. You have to substitute "e.target.textbox_mc" with your target object. I don't know whether you have it on the stage already or whether you instantiate it dynamically. Hope that helps. You can upload a simple fla file then I would see what you are doing wrong. trispo
  8. You use a local variable in your mouse over handler. Local variables will not be accessible elsewhere in your code. So you have to declare your myTween variable outside of your mouse over function. I encourage the following: var myTween:TweenMax = new TweenMax(e.target.textbox_mc, 1, { x:0, y:0, alpha:1, overwrite:2, paused: true}); function onMouseOver(e:MouseEvent):void { myTween.play(); } function onMouseOut(e:MouseEvent):void { myTween.reverse(); } trispo
  9. Hi, I've put together a little example. I hope this explains enough what you have to do. Personally I would create a custom class for the Lightbox which makes it easy to reuse it. Look at it and let me know if you have problems understanding it. trispo PS: The image used is "borrowed" from google images. It is not mine and may not be used in your projects without asking the copyright owner.
  10. I assume your photo on your site is displayed with flash player, right? Then you'd add a MouseEvent.CLICK event listener to that sprite displaying the photo and in the handler function create a loader instance that loads the larger version. photo.addEventListener(MouseEvent.CLICK, onPhotoClick); function onPhotoClick(event:MouseEvent):void { var loader = new Loader(); loader.load(new URLRequest("url_of_your_larger_photo"); addChild(loader); } That should display your larger photo. If you want a nice border and a close button you have to do extra work. I can post an simple example if you want.
  11. You could subclass from Sprite or SimpleButton (depending on your liking) and write the code you've posted in that subclass. Of course your buttons have to be of the type of that subclass then.
×
×
  • Create New...