Jump to content
GreenSock

soupking

Members
  • Posts

    117
  • Joined

  • Last visited

Everything posted by soupking

  1. Hi everybody, First off I want to say thanks to Jack for making such an awesome platform. I don't usually program HTML docs, but when I do I choose GreenSock. I'm actually more into Cinema 4D and that sort of troubleshooting but I need to build my portfolio and I'm using a video background and don't want to deal with loading stuff through Flash. So I'm going through the motions of learning how to build a set of thumbnails in a JS environment. I have this conundrum where I have thumbnail rollovers using CSS3 alpha hover styles with two images that look great but I want to do a staggered cascading reveal of my thumbnails like I used to do in Flash. So I'm using HTML Canvas and EaseJS to animate them in. However, I'm stuck with the issue of having two sets of code where one does interaction and the other does the animating. I've run into the duality before but I'm really out of water here. If somebody could tell me what the best overall code approach would be to use a cascading/staggered thumbnail reveal and double image rollover would be for a portfolio thumbnail set I'd really be grateful. I can gravitate to anything that's out there but I'm having a hard time making CSS work in an x,y canvas environment that feels more like a vector object. How would you guys go about this? Thanks for any suggestions as I'm really a software guy these days.
  2. I must have the wrong idea about TimelineLite. This must be more of an AS3 issue then than a Greensock issue. I'll see what I can do about this not working. Thanks Carl!
  3. Wow, okay. heh, and I thought my studies were at a plateau. Goodness...Okay, I guess I'm going to learn about TimelineLite now. If you've seen my other post you'll know I'm retarded. Everybody's way up the mountain. I feel like a snowboarder still figuring out how to get my dang ski boot in binding. It's a bit late, so I'll probably work on this tomorrow. Thanks a bunch for the small snippet. That stuff is like gold to me. I'm a lot better at line-by-line to chew on rather than dissecting full ideas at a time. Peace, -soupking
  4. Hi everybody, I know...dumbest question ever. But there's no example of this anywhere that I can find. I've got this: public function gotoAndStop(timeOrLabel:*, suppressEvents:Boolean = true):void and this: myTimeline.gotoAndStop(2) I've gone through documentation and examples and I can't figure out how to attach it to movieclips and what the basic syntax is. function switchMenu(m1:Number, m2:Number, m3:Number, m4:Number) { menu_mc.feature1_mc.gotoAndStop(m1); menu_mc.feature2_mc.gotoAndStop(m2); menu_mc.feature3_mc.gotoAndStop(m3); menu_mc.feature4_mc.gotoAndStop(m4); } I can't use a variable for a frame value so I was hoping TimelineLite could help. Am I right in asking? As always, thanks for reading. You guys (and you know who you are) have been very helpful.
  5. Is there a way to ease the total stagger of AllTo? I know it's possible to ease each individual tween within, but is the entire array tween 'easable' in it's entire whole somehow?
  6. Awesome. The first one works. Saved!!! Thank you!!! I already tried the 2nd you propose, but I've had an array of errors. Probably starting out because I didn't put in the parent container_mc. However, I never would have figured that out that the container_mc was the parent. I was threading with a gentlemen named Carl, and he said to swapDepths that I should container_mc.addChild(_imageArray). However, that then seemd odd to me because it's like I'm instance the loaded content twice. ? Anyway, this will keep me moving forward. Thanks a bunch for the help. This code snippet is much cleaner than where I was headed.
  7. Ohhhhhhkay okay, So, I think I'm getting it more now. Yes, you're absolutely right. depth commands aren't in the ContentDisplay properties model. If this wasn't so esoteric I'd just search online. Before I had this: queue.append( iLoader = new ImageLoader("_images/"+xml.feature[i].@url, { name:xml.feature[i].@name, container:container_mc }) ); // array image by name _aImages.push(iLoader.content); Which loaded them into the container_mc, but they're not instanced on the stage as "depthable" (let's say) until I write something like container_mc.addChild(_aImages) in a loop or something. Right? Cuz I thought that somewhere in the fancifulness of the loader that it added them to the stage without my knowing. That's where I'm off-base huh? I just need to addChild(). If I'm getting this right, I should have this down shortly. I'll give it a shot. Thanks a bunch Carl. Without all the help from all you guys, I'd never get this thing built. It's just that I understand that it's hard to help people sometimes because what is "obvious" can vary quite extensively. EDIT: Yes, you're right on the money. However, I can't get getIndex(_aImages[0]), getChildIndex(_aImages[0]), or indexOf(_aImages[0]) to work. I also tried them inversely as well because it gave parenting issues and all I can get trace(container_mc.getIndexOf()); but the rest gives me errors: trace(container_mc); for (var q:Number =0; q<4; q++) { container_mc.addChild(_aImages[q]); trace(getChildIndex(_aImages[q])); //ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. trace(indexOf(_aImages[q])); //Error #1180: Call to a possibly undefined method indexOf. trace(_aImages[q].indexOf()); //Error #1069: Property indexOf not found on com.greensock.loading.display. } This ContentDisplay just won't budge into being a stage object with a depth. Grrr. I guess I'll keep plugging away. I just don't know what I can find online as demo info. I can get an MC to show up easily. I feel like this shouldn't be so difficult, you know?
  8. I understand the basics of the display object model. container_mc.addChild(LoadedObject_12); It's essentially the same thing I don't understand LoaderMax because I can't treat the objects loaded like MovieClips in that they are at a depth: http://www.greensock.com/as/docs/tween/ ... etail.html I can tween them, but I can't re-stack them. My major issue right now is referencing what is in the container as a separate depth. I imagine that I can GetByName, but every swapDepths, getDepth() function I've thrown at it is rejected. I want to be able to do this: http://www.as3dtk.com/?p=493 See my issue? I've seen slideshows that go back and next down the aggregated XML data or array. But I have a 4 button menu. Should I somehow in the loop store each ContentDisplay object into it's own MovieClip instead of just a container_mc. Is that the logic? Thanks for your response by the way.
  9. Hi Carl, Here's as larger picture of the code I'm dealing with: function iCompleteHandler(event:LoaderEvent):void { // set initial menu button to on _aMenu[0].gotoAndStop(2); var currentCaption:String = _aCaption[1]; var lastClicked:MovieClip = menu_mc.feature1_mc; function over(evt:MouseEvent):void { if(evt.currentTarget!=lastClicked){ evt.target.gotoAndStop(2); } } function out(evt:MouseEvent):void { if(evt.currentTarget!=lastClicked){ evt.target.gotoAndStop(1); } } function clicked(evt:MouseEvent):void { /* SWAP DEPTHS /* timer kill/reset */ switch (lastClicked.name) { case "feature1_mc": stringInQ = _aCaption[0] caption_mc.caption_txt.text = stringInQ.toUpperCase(); _aImages[0].getDepth(); //setChildIndex(_aImages[0], numChildren - 1); break; case "feature2_mc": stringInQ = _aCaption[1] caption_mc.caption_txt.text = stringInQ.toUpperCase(); //setChildIndex(_aImages[1], numChildren - 1); break; /*case "feature3_mc": stringInQ = _aCaption[2] caption_mc.caption_txt.text = stringInQ.toUpperCase(); break; case "feature4_mc": stringInQ = _aCaption[3] caption_mc.caption_txt.text = stringInQ.toUpperCase(); break;*/ } } menu_mc.feature1_mc.buttonMode = true; menu_mc.feature1_mc.useHandCursor = true; menu_mc.feature2_mc.buttonMode = true; menu_mc.feature2_mc.useHandCursor = true; menu_mc.feature3_mc.buttonMode = true; menu_mc.feature3_mc.useHandCursor = true; menu_mc.feature4_mc.buttonMode = true; menu_mc.feature4_mc.useHandCursor = true; menu_mc.feature1_mc.addEventListener(MouseEvent.ROLL_OVER, over); menu_mc.feature1_mc.addEventListener(MouseEvent.ROLL_OUT, out); menu_mc.feature1_mc.addEventListener(MouseEvent.MOUSE_UP, clicked); menu_mc.feature2_mc.addEventListener(MouseEvent.ROLL_OVER, over); menu_mc.feature2_mc.addEventListener(MouseEvent.ROLL_OUT, out); menu_mc.feature2_mc.addEventListener(MouseEvent.MOUSE_UP, clicked); menu_mc.feature3_mc.addEventListener(MouseEvent.ROLL_OVER, over); menu_mc.feature3_mc.addEventListener(MouseEvent.MOUSE_OUT, out); menu_mc.feature3_mc.addEventListener(MouseEvent.MOUSE_UP, clicked); menu_mc.feature4_mc.addEventListener(MouseEvent.ROLL_OVER, over); menu_mc.feature4_mc.addEventListener(MouseEvent.MOUSE_OUT, out); menu_mc.feature4_mc.addEventListener(MouseEvent.MOUSE_UP, clicked); function menuItemSelect(selectNum:Number) { } } LoaderMax brings in DisplayContent, but I don't know how to access it's depth. When I try getDepth it says GreenSock doesn't understand. ReferenceError: Error #1069: Property getDepth not found on com.greensock.loading.display.ContentDisplay and there is no default value. at Function/() Which is fine, so I have to convert it to a MovieClip of some kind? Not sure what I'm left to do to flip the image upon button event. Know what I mean?
  10. Yeah, I suppose it was overkill. Lame on my part. I'm just trying to get these queued objects (whatever they are) into a referencable, depthable medium, you know? Like, for reference with all XML data I've been using arrays, so I did the same thing for images, but in my mind it looks like this: container = img1, img2, img3, img4 But it's not an array, so...I've got 4 ContentDisplay objects in a MovieClip? Am I warm? Heh, sorry if I sound daft. I am just lousy at AS3, have been ever since it came out. I spent 6 months of focus to get it, learned it, everybody made me work in AS2 all year, I lost it, now I'm trying to learn LoaderMax. Sorry for any hassle, I've just been going in circles from one thing to another. That's why my double post was an accident. Bottom line, I'm trying to reference/map this loaded content so I can swapdepths the loaded images. That's another thing I'm adapting as well as duplicateMovieClip and recursive button events...(Sigh) but that's for another forum if needed. Thanks for reading/responding holysocks.
  11. I have a LoaderMax queue that I set up (thanks to help from people here I might add)... It's working fine. However, now that I'm using arrays trying to include scripted masking animation and depth swapping etc. I need to position each of these content displays in a depth with preferably and instance that I can reference. Right now all 4 images from the loader are going into a container_mc. But I need to separate them out to be their own MC or...something. Right? How does, or what's a standard way, a queue breaks down into instances? All I have is queue.load()
  12. Hi GreenSock, Pardon me if this s a straight AS3 question not related to LoaderMax. I used LoaderMax to import some images. Now I have them in arrays and I'm trying to swap depths. I'm trying swapChildren(_aImages[1], _aImages[3]) Trying to trace: trace(_aImages[1].depth); trace(_aImages[1].name.depth); I have no idea what is going on. Do I need to swap movieclips instead of content displays? I'm in a button event so I don't even know how to parent the situation if need be. Really boggled. Thanks for any feedback.
  13. Ahh okay. That makes sense. So per your response, "l.content" is the imagein in the image loader instance? Cool, so when I reference _imageArray.push(l.content), the array is storing the loaded object. What about all the properties of the object (e.g. estimated bytes etc.)? Are they just assigned but not instanced or something?
  14. Hi Everybody, I've been busy getting the hang of LoaderMax the past day or two. I've noticed there's a number of ways to approach LoaderMax. Overall, I've decided to take the batch queue approach even though I'm only loading one type of asset. That way I can us the same methodology evenly for most applications. What I can't seem to wrap my head around is how to convert a queue imageloader object into an array reference. Here's the code I have so far: //create a LoaderMax named "mainQueue" and set up onProgress, onComplete and onError listeners var queue:LoaderMax = new LoaderMax({ name:"imgQueue", onProgress:iProgressHandler, onComplete:iCompleteHandler, onError:iErrorHandler }); for (var i:Number = 0; i { //append one or more loaders queue.append( new ImageLoader("_images/"+xml.feature[i].@url, { estimatedBytes:2400, container:container_mc, alpha:1, y:10+30*i }) ); } queue.load(); So I have this queue.append...ImageLoader. How do I properly assign something like that to _imageArray within the same for loop? I can figure out how to transfer all the XML data, but putting a content display object in between this loop process is kind of confusing in terms of type and reference. What do people do to make that conversion? Thanks for reading>
  15. Carl, this is dynamite. I've been away from AS3 for some time and you're right. LoaderMax is a bit more involved than his standard tween engine. However, it's totally worth it. I'll definitely take another look at the video demo you sent. I think I just got rather overwhelmed with the options and many options in AS3 tuts these days assume very much of the reader. It's hard not to though due to AS3's strict adherence to things. When troubleshooting AS3 sometimes it's hard to know if you are on the right track and just getting errors or if you're trying to climb over a tree. I guess what was also confusing is that the example (like others as well) doesn't using a queue, so it looks like I'm just using native Flash classes instead of the LoaderMax classes. So I began to wonder what the heck I was really doing. Like is it better to use the queue? Am I over-thinking this? In the end, I suppose it's all about getting the thing finished. Learning to do something sometimes is better than trying to learn it the best way the first time around. Thanks a bunch for the assist. I'll refer back to the tutorial you sent if I run into anymore snags with loading implementation. Best, -soupking
  16. Hi Carl, Thanks for such a thorough response. You know, I've downloaded a bunch of tutorials and...They're all just the load or too complex to illustrate what I'm trying to figure out. Like, I just want to do what you just showed me, but in a looped fashion. If that is how I am indeed supposed to use LoaderMax for more than one variable. I can manage to get the stuff to load okay. Upon loading the xml I then want to thread through each image and caption without involving external class structures and esoteric class file that I can't manipulate. How do people load it all at once? Like with the code you gave me: function completeHandler(event:LoaderMax):void { var video:VideoLoader = LoaderMax.getLoader("video1"); var description:String = video.vars.description; var xml:XML = video.vars.rawXML; trace("first link url: " + xml.links[0].link[0].@url); //traces "first link url: http://www.greensock.com" } ...In your opinion, how would you go about loading/tracing [0] to [n]? Know what I mean? All the demos have stuffed nested inside nested inside nested classes. I just want the basic pattern for using LoaderMax in this fashion. I only have 4. Should I use an array? If so, how does one incorporate ImageLoader into the syntax? Otherwise, I might as well not even use it. Know what I mean? Thanks again!
  17. Hi Jack and fellow GreenSocks, I'm trying to get use to using the LoaderMax class by loading a few images and caption text for each image. So far I'm about to load the XML, but the I get to the point of having to load and parse the images and text into an organized array or "system" so I can navigate through them like a menu header. The thumbnails aren't graphic, just basic Flash buttons, but I'll still need to have them cataloged properly. I'm trying to figure out what direction to go to do this in the cleanest and easiest fashion. Right now I have: 1) Queue.append() 2) for () 3) for each () I'm at a crossroads as to what I'm supposed to do or if I should even use LoaderMax. I'd like to though as it looks useful going forward into more complex site structures. If somebody could point me in the right direction as to how node data and images are loaded together, or what a good basic plan of action would be, I'd really appreciate the feedback. Thanks! -soupking
  18. Hi Jack, I am stuck between a rock and a hard place trying to animate a leaf blowing in the wind. The bezier tool would be great for this but I can't use it for two reasons. A) The sample stage is really small so I can't really draw and copy the coordinates calculated in the demo. Since the coordinates for the bezier points aren't on the actual path, the trial and error to figure out 4 points in a loop would take hours. This is such a cool thing to use in a jam like this, but unfortunately I'm going to have to go back and do frame-based animation. Thanks for all the awesome TweenMax tools. It's revolutionary.
  19. Hi Jack, You're absolutely right. That's been my problem. It's like every particle system I try out expects my intelligence to be at a certain level, but for the most part they just aren't complete. Thanks for the offer. I think it would be best to possibly just ponder for the time being. As being a member, I'd upgrade to the shocking green for something root that does all the basic things Emitter 2.0 does like origin size, speed, spray (0-360 degrees), and random feature to modify and make smoke, steam, and rain. But you're right it's really complex and any idea would have to come out in versions. Heh, like fire would have to wait I'd imagine. As I've learned, it is waaaay complex. For the meantime, I'll just have to fake it. Thanks though, stoked on being a really green member. Peace, -soupking
  20. Hi Jack, I've been searching the web for a more simplified particle engine. Maybe it's because I'm spoiled by the ease and awesomeness of TweenMax, but I can't seem to find anything that doesn't require a large amount of re-construction or trouble-shooting to even get an example to work. I was wondering if you had any plans on designing a particle generator based library/API in the upcoming future. Thanks for all you help in the past. Cheers, -soupking
  21. Yeah, I have a movieclip in the library and was trying to test the loader class directly into the movie. That must be what the problem was. As always... Thanks Jack!
  22. Doh! Gosh, how amateur of me. I typically never do nested functions, my bad. I changed that now. I knew better than that. This is what it keeps telling me though: /Volumes/G-DRIVE mini/_main/_suitcase/_classes/_mine/com/TheLoader.as, Line 1 5000: The class 'TheLoader' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type. ...How? Is there some library I'm importing that involves movieclips?
  23. Hi Jack, I'm trying to incorporate LoaderMax into my "header" class as a "loader" class. Well, actually I'm first trying to simplify that by just loading the "loader" class straight into the FLA. However, no matter what I do it wants to instance it as a MovieClip. ?? Here's the code: package { import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; public class TheLoader { public function TheLoader() { //create a LoaderMax named "mainQueue" and set up onProgress, onComplete and onError listeners var queueXML:LoaderMax = new LoaderMax({name:"xmlQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); //append several loaders queueXML.append( new XMLLoader("_xml/menu3.xml", {name:"xmlDoc"}) ); function progressHandler(event:LoaderEvent):void { trace("progress: " + event.target.progress); } function completeHandler(event:LoaderEvent):void { trace(event.target + " is complete!"); } function errorHandler(event:LoaderEvent):void { trace("error occured with " + event.target + ": " + event.text); } } } } What am I missing/need to remove? I'm not sure where the logic disconnect is.
  24. You're the man, Jack. Thank you.
  25. I'm trying to call a function using onComplete: The problem I'm having is that I need to pass parameters to the class I'm calling. Doing so makes the onComplete useless because it runs automatically thanks to the (). If I don't include the parameters it gives me a #1009. I'm guessing this is a common issue, but couldn't find the answer searching in this forum. Is there a simple solution to this issue?
×