Jump to content
Search Community

Big Bad Roo

Members
  • Posts

    40
  • Joined

  • Last visited

Everything posted by Big Bad Roo

  1. Ahh - this is one instance for mobile that I can load MCs into and out of that is the scrolling area for the whole screen. I realised I really needed to have ALL of my screens be scrollable, and this would be better that having a scroll instance for each screen's class. Cheers Jack
  2. I think I'm not understanding some class fundamentals. To set up that scrollable.setScrollClip(myClip); scenario, wouldn't you need... private var scrollable:Scrollable = new Scrollable(); ...in every class that uses it, and therefore you'd have (if you have 30 classes controlling 30 screens), 30 separate instances of scrollable, ie 30 separate scroll screens? How do I have just one Scrollable that all classes have access to using scrollable.setScrollClip(myClip);? The only way I can see how is with a getter/setter, but then you'd have to inject the model with that G/S into all your classes that need scrolling.
  3. Thanks Jack That's kind of what I've done, but what if you have many classes that you want to access the one instance of Scrollable? My current problem is I have many screens I want to use in Scrollable (one displayed at a time), so I'm ending up with a huge class accomodating all these screens and their logic. I'd rather have many smaller classes, all able to send movieclips to one central Scrollable, but I'm unsure of the best way to set it up - have classes send their clips to a central model that talks to Scrollable, or create Scrollable, and inject it into the constructor of all the classes that need access to scrolling as in... scrollable.scrollClip = null; scrollable.scrollClip = _myMovieClipFromMyClass; each time I want to remove the old scrolling clip and add a new one.
  4. Hi I've set up a class that uses the ThrowPropsPlugin - it accepts a movieclip for scrolling in an AIR iOS project. Currently I'm setting this class up as a new instance in every class I need scrolling in, but it seems wasteful. Is there a standard way to have one such scrolling class, that all your classes send movieclips to for scrolling? Is it a matter of having a var in a global model that all classes send movieclips to, and then that var dispatches the movieclip to the scrolling class? Or is a better way to create the class once, and inject it into the constructor of every class that needs scrolling? Cheers
  5. OK - this way has worked wayyyyy better. The most items ever displayed are 57, but it feels continuous when scrolling through. Cheers Carl.
  6. Hi When I navigate away from a page that contains a blitmask, the blitmasks's content mc stays visible above the page I navigate to. I was getting around it by killing the blitmask and recreating one when navigating back to it's page, but I figure there must be a way to just hide it. mc.visible = false, or even removeChild.mc aren't hiding the mc I send to the blitmask. Cheers
  7. Better question (after discovering and playing with LoaderMax), with regard to displaying a loaded remote image... The display in my AIR project is set up like this... - stage has been passed into my controller, and I'm setting up the main display objects like so... _stage.addChild(mc);// a container mc mc.addChild(_UI); (UI made in Flash Pro) _UI.addChild( mySPR ); The rest of my display objects are created dynamically and added to mySPR - everything displays fine. I used the first sample code on the LoaderMax page https://www.greensock.com/loadermax/ to test download a remote image off my server that I want to load into mySPR. On running - it's telling me "LoaderMax 'mainQueue' is complete!", but I can't see the image. With the display set-up above in mind, what do I need to change in the following lines of code to have the image appear in mySPR? queue.append( new ImageLoader("https://www.mysite.com/books/mylogo.jpg", {name:"photo1", estimatedBytes:2400, container:mySPR, alpha:0, width:250, height:150, scaleMode:"proportionalInside"}) ); function completeHandler(event:LoaderEvent):void { var image:ContentDisplay = LoaderMax.getContent("photo1"); TweenLite.to(image, 1, {alpha:1, y:100}); trace(event.target + " is complete!"); } Is the downloaded image now in 'image'? I tried mySPR.addChild(image), but no go there either. Thanks for taking a look.
  8. Hi guys Just wondering if there is a Greensock solution, or if someone can guide me to what to research for... ...loading and displaying a series of images from a server into mobile device native apps? Like how the Facebook app loads profile images into your newsfeed? Cheers
  9. re autoUpdate - do I need it then? What does it do if the target position has changed that wouldn't happen if you didn't have autoUpdate on? re target size - the width is always 640, and the height is roughly 10 000 for 50 items loaded each pagination search (give or take depending on the text involved). So 4 pagination searches will give you a total height of 40 000. I'm changing my strategy as I've realised this isn't sustainable - continually adding to the size of the target bitmap each search will kill everything pretty quickly. I'm now making it so that 60 items is the most EVER shown, and coding backwards pagination as well as forwards - this will make the bitmap at most 640 x 12000. Backwards pagination will get it's data from the local array holding items already searched, so it should be very fast - just rebuild the sprite holding the search text, and readjust position. Forwards pagination does what it currently does - gets the next 50 items from the server. I'm about 1/2 way through coding it - I'll let you know how it goes. Thanks Carl
  10. 'twas a 'how long is a piece of string' question I'll admit! Cheers Carl.
  11. Hey guys How do you handle/speed up updating display changes with large scrolling data? eg if I click a button in the scroll area, I now need to update the blitmask, which can take a while, and hang the display (button appears sluggish) or stop any new scrolling until it's updated. Also, is blitMask.autoUpdate = true; a substitute for calling blitMask.update(null, true); after any display changes like buttons being switched? I've set blitMask.autoUpdate = true; but it's not updating the blitmask Cheers
  12. My bad - I meant to ask where should... onStart:blitMask.enableBitmapMode go in the above code?
  13. Hi My project is set at 12fps as it's a blog type app, so no serious animation needed, except when scrolling the text. Just wondering is that's a good rate when using throwprops? I see some examples are at 60fps - what's less taxing for, say, an iPhone? Also, do you need to adjust (in mouseMoveHandler): if (t - t2 > 50) { y2 = y1; t2 = t1; y1 = mc.y; t1 = t; } ...according to your frame rate? Cheers
  14. OK - after playing around, I realised it was my positioning of blitMask.update(null, true); that was causing most of the problem. I had it in the mouseDownHandler to automatically capture any button changes within the scroll display. I guess because the bitmap is large, it was taking a while to capture it before scrolling. Turns out the scrolling is smooth ven with a big bitmap, but... Slowly getting the hang of ThrowProps - thanks for your time, help and patience.
  15. Gidday I haven't nailed this yet - where does it go? ThrowPropsPlugin.to(mc, {throwProps:{ y:{velocity:yVelocity, max:bounds.top, min:bounds.top - yOverlap, resistance:300} }, onUpdate:blitMask.update, onComplete:blitMask.disableBitmapMode, ease:Strong.easeOut }, 10, 0.3, 1); Cheers
  16. Gidday I'm using blitmask to display a sprite that holds text based items from a search. I have a pagination button at the bottom which retrieves the data from the server (50 items per search), appends them to the sprite inside blitmask, and then I blitmask.update(); The process works fine layout-wise. However, scrolling response degrades the more text I load in, and after 3-4 pagination searches is unusable. I thought the problem may have been that I had a new display object for each item, with each object containing a dynamic text field and a couple of buttons. So I tested just having one giant text field that gets the search returns appended to it each search, and no buttons. Same thing happens - after the first search, the scrolling degrades until unusable after 3-4 searches. I thought maybe my appending process was screwing with something, so I set my server to send 200 items per search to test how things work without using pagination. Straight away, the scrolling is very sluggish and unusable. So I'm wondering... a. is this typical when the resulting bitmap in the blitmask is very long? b. what's a general height size for bitmaps (in phones) to keep blitmask happy? c. how do other apps such as blogs do this using blitmask? Do they limit how many blog entries pagination can show ie is there a better way to achieve what I want? Thanks for your time and help.
  17. Nope - I buggered it up while playing around turning bitmapMode on and off to allow button access in the scrolling mc. I forgot to turn it back on in the mouseMoveHandler. It's all working nicely now mate.
  18. Hi guys I have a fairly long mc that basically contains a feed. When I flick it on the phone, it scrolls beautifully. However, it get's jumpy when dragging it slowly. Any tips for smoothing it out? Cheers
  19. Thanks Bassta - I'm taking look at it today. Cheers.
  20. OK - the wildcard seems to do the trick in the constructor: public function Scroll( _mc:Sprite, _bounds:Rectangle, _parentMC:* ) It's working the same as using just the ThrowProps demo code now. Not sure if it's bad practice passing a whole UI into the constructor, but it doesn't seem to trip up.
  21. Working on it now. Would it need to be instantiated in each class you use it in? Or is there another way that would be better to aim at? The way I've got it now, my parent class is instantiating it like: _scroll = new Scroll( mc, bounds, parentUI ); ...where parent UI would be use, for example, in the mouseDownHandler like... yOffset = _parentUI.mouseY - mc.y; Problem with that is, the scroll class can only take that UI. I'm still new to working with classes. I'll try a wildcard in the scroll classes constructor - see if it will accept parent UI. I'd still have to import all the UI classes into the scroll class, but that's still better than having to copy all the scroll code for every class that uses it.
  22. Yeah - so that I'm not repeating the same scrolling code in all the screen controller classes.
  23. Gidday I have my iPhone app screens each set up with a controller that instantiates a screen view eg Home, Screen 2 etc Currently I have the ThrowProps example set up in each of these screen controllers - so each has mouseDownHandler, mouseUpHandler etc I'm guessing this isn't they way you intended it to be used - is it possible to set it up so that you have one copy of the mousehandler functions in a class, and can feed that class' blitmask a movieclip from anywhere in your project for scrolling? If so, any hints on how to set this up? Cheers!
×
×
  • Create New...