Jump to content
Search Community

isaacalves

Members
  • Posts

    30
  • Joined

  • Last visited

isaacalves's Achievements

0

Reputation

  1. Hey Carl, I'll check out other forums. Thanks a lot for your attention and suggestions!! Cheers
  2. Hey Carl, what's up? That's not really a problem... for example... in that case, when I have a 'component SWF' (StatusPanel) that gets loaded in two or more 'pages SWFs', I can do something like this: I declared the 'component SWF' as a class variable of the class of the 'page SWF' that'll load it. If I use strong typing I get plenty of errors. private var statusPanel:*; and then when it gest loaded, in the SWFLoader onComplete handler: statusPanel = e.target.content.getChildAt(0); and when i want to dispose it i'll do: if (statusPanel) statusPanel.dispose(); That doesn't seem to be a good practice... I'm actullay asking for suggestions on how to build/structure a website/app with a modular approach. What I do now is basically use the Flash IDE to build the library of MovieClips, embedded small bitmaps, fonts, etc, and pre arrange this stuff on the stage. And then I use TextMate for coding, trying to keep as modular as possible in order to have consistency and reuse code. What happens is that i eventually face some situations where I have to decide whether I'll make something a different SWF, a MovieClip in the library that'll be linked to a Class and I'll instantiate in AS3, or leave it already added to the stage in the FLA... No big deal, I just would like to know other people's thoughts on that. As well as on handling 'pages SWFs' with Greensock's SWFLoader. I've used some frameworks like Gaia, a couple of times already, but I'm trying to do things on my own now...I graduated in design but in terms of code i'm an autodidact, so stuff like MVC frightens me up yet... Cheers!
  3. I'm building a website - using Flash IDE and Textmate - from scratch using just a couple frameworks (Greensock for tweening and loading), and a singleton class to handle the whole thing. I'm not using any framework like Gaia, for instance, or any other MVC framework. The singleton helps me keep track of the pages and components, in a way I can add objects to it, and then have access to them whenever I am. I mean, For example, on the constructor of each swf's class I have something like this: _app = myApp.getInstance(); _app.addObject("contactpage", this); Some pages are quite complex, with panels, menus and galleries, etc, so I've linked some movieclips that are already on stage to separated classes, to provide an easier maintenance of the code. Then i have some movieclips on the library with linkage IDs for instatiating on ActionScript. Finally I have also some components that are separated SWFs, cause they must be on different pages. For example, I have a StatusPanel that appears both on the OrderPage and the GalleryPage. I have dispose() methods in each classes, in order to avoid errors and CPU consuming. Though it's organized in my own way, I sometimes face problems for example, when I want to access the dispose methods of loaded SWFs that are loaded with SWFLoader for example. Well I can circumvent that but the whole thing becomes messy each time.. What do you guys think? Which are the best practices on that issue? Thanks!
  4. that's just perfect! thanks a lot!! by the way, i saw a tutorial by you two days ago, which inspired me to make my own 'OOP slideshow' presentation...
  5. Thanks a lot! Tweening the 'frame' attribute works really nice. I'm using the code below to make the globe spin. TweenMax.to(globe, speed, {frame: 360, repeat: -1, ease:Linear.easeNone}); Now let's say the globe is currently on frame 19. Can I make it Tween to the frame 18 without moving back on the timeline? That means tweening to 360 then restart at 0 until 18 and the loop that? Is it possible to do something like that? What I'm trying to do is to control the globe with a slider, that sets a speed (that is used to calculate the duration of the tween) and then tell the Globe to tween to the previous frame, depending on the currentFrame, in a loop (repeat: -1). But it needs to move forward, always. I've tried associating the slider with the duration of the tween but it doesn't work as I expected... any ideas? Thanks!
  6. Can I change the frame rate of AS2 dinamically? In order to smoothly accelerate or deaccelerate an animation like this: http://activeden.net/item/spinning-3d-e ... of-5/81611 Maybe the best solution is convert it to AS3? Is is possible to use the TimelineLite/Max methods on a timeline-based animation like this globe? Or attach this globe in a TimelineLite/Max instance? I guess there's no much code on this animation, and that actually all I need are those frames... Or maybe use some 'fisheye' effect with displacement filter on a flat map image? Since this project I'm working on is not for web, there won't be any problem on loading 360 frames for an animation, though... What do you people recommend? Thanks!
  7. Thanks for clarifying me that. Cheers!
  8. Hi, I solved my problem using the offset parameter of the append method, as in this case nearly all tweens are appended in a for loop. So I'd still like to know why it didn't work the other way cause normally I'd like to use the 'stagger' properties of the timeline constructor. tl.append(new TweenLite(mc.getChildAt(j), 1, {alpha: 1}), -.9); Thanks
  9. I want the tweens to be delayed from each other by 0.1 second. var tl:TimelineLite = new TimelineLite({align: TweenAlign.NORMAL, stagger: 0.1}); var j:int; for (var i:int; i < map.numChildren; i++) { var mc:MovieClip = map.getChildAt(i); j = 0; for (j; j < mc.numChildren; j++) { tl.insert(TweenLite.from(mc.getChildAt(j), 1, {alpha: 0})); counter ++; } } I tried using TweenAlign.SEQUENCE and stagger = -0.9 - I should get the same result right? But they all start at the same time.. and if I use "append" they go on sequence - no stagger... what am I missing here? Thanks in advance
  10. myVideoLoader.duration doesn't return the correct value. It should return 50 but it returns 200. That happens only with a specific .flv file that I am loading with VideoLoader. And in the last version of this video (the same video, just compressed differently) it didn't have that problem. Why does that happens? Thanks in advance
  11. Hey Jack, there's something weird going on when it loads and displays the image. I am not able to click on areas adjacent to the image, it seems that there's a transparent rectangle of the original size of the image ( cause i've set width, height, and propInside in the ImageLoader ). I called an eventListener from the imageHolder and it traces like i was clicking on a bitmap, and if i trace the width of the container of the image loaded, it traces the original width. Why does that happen?
  12. Yeah I was doing something really dumb, maybe too much motivated with programming. Still a long path though. So, I just eliminated 150 lines of code. Thanks a lot !
  13. You mean I don't need a different maximum width and height value for 'portrait' and 'landscape'? I guess I'm complicating things in vain... one MAX_WIDTH and one MAX_HEIGHT are enough.. thanks!
×
×
  • Create New...