Jump to content
Search Community

UbiAssassin

Premium
  • Posts

    46
  • Joined

  • Last visited

Everything posted by UbiAssassin

  1. @Carl That is exactly the video that I stumbled across and it was an eye opener. The first thing that I thought of was all of the duplicated animation calls in heavy switch case usages to manipulate the 3D models, materials and matching 2D shapes. I was able to just nest it all into 4 RegisterEffect functions like this one: gsap.registerEffect({ name: "FlashPlateTweenEngine", effect: (targets, config) => { let tlFlashPlateTweenControl = gsap.timeline(); tlFlashPlateTweenControl.set(targets, { x: config.x, y: config.y }) .to(targets, .25, { autoAlpha: 1 }) .to(targets, .75, { autoAlpha: 0, ease: flashPlateBlendOutEase }); return tlFlashPlateTweenControl; }, extendTimeline: true }); From there, I was able to collapse all of the previous code into a number of simpler GridPlate Functions using a single master timeLine to control the entire animation. I used the .addLabel and .add statements to time the insertion and flow of each set of the 26 overall object animation calls and it is so much easier to tweak now!!! I am sure that I can leverage this even more, and I it will be incredibly easy to tack on more animation complexity and detail now that the base is more efficient and straightforward Great stuff!!!
  2. Hello everyone :) I have been way to busy over the last year to really put much effort into my ongoing website project due to my work. I hopped on since I started my holiday vacation, got the latest Club Greensock files (GSAP 3) and I have to thank you for gsap.effects and the smooth nature of how they can be injected into Timeline structures!!! I had started animation grid of material and 3D model fades, scale and transition animations along with some basic photoShop graphic elements that fade, flicker and transition with the models and their materials a little over a year ago. Needless to say, I was structuring test code that was heavy and included a lot of switch cases and duplicated code within each switch case. It was working, but quite heavy and messy. Not to mention the fact that it was hard to iterate on O.o After a day of looking into Gsap.Effects, I managed to redefine all of the animations for the models, model materials, and photoshop graphic elements in two RegisterEffect Functions. I then just nested these into a master timeLine as I saw fit and "BOOM" many, many, many lines of code , switches and switch cases removed! It is easy and quick to iterate on and my code is far easier to navigate! @Carl All I can say and holy crap Thanks!!!! You guys are incredible!
  3. Oh sweet! Thanks Jack! I figured that it was something simple that I was completely overlooking.
  4. Hello everyone! It has been way to long. I am in the process of re-creating my website from the ground up in in Visual Studio 2017, using Bootstrap. I just purchased the Shockingly Green Membership to really start making my site shine from the beginning. My first issue, and I am sorry if it is a common one, is that a number of my statements are now erroring out at runtime. I really wish the Visual Studio compiler could find these errors during compile and before debugging, but at least we have runtime debugging Specifically, none of my pre-defined Ease variables are working. Here is one of the variables: var armorPlateEaseIn = SlowMo.ease.config(0.3, 0.4, false); This worked in the GSAP v2 code that I ported from the previous site re-design, but definitely no longer works. It just errors out on me at runtime and brings the site to a stop. This is the error (WebsiteStructureAnimations.js:517 Uncaught ReferenceError: SlowMo is not defined). If I add Gsap, like so: var armorPlateEaseIn = gsap.SlowMo.ease.config(0.3, 0.4, false); I get this error: Uncaught TypeError: Cannot read property 'ease' of undefined Here is how I am referencing the code base: <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.0.4/gsap.min.js"></script> <script type="module" src="~/js/GSAP Resources/CustomEase.min.js"></script> <script type="module" src="~/js/GSAP Resources/EasePack.min.js"></script> I am pointing to the correct directories and I have included the Javascript files in my solution. My guess is that I am just no longer using the correct variable declaration statement of SlowMo.ease.config? Perhaps this has changed a fair amount since V2 of Gsap or maybe I did not install my source files correctly? Thanks ahead of time and I am really sorry, I know that this question is likely super simple but I am just trying to get my site to run again (re-working the code to fit the new standards along the way). Happy New Year!!!
  5. No problem Carl I am glad to help when I can! I will put together a small project that preloads a model, then loads it into a content page and finally applies textures dynamically. I will probably have some time this weekend to put it together. -Cheers
  6. So I thought about this a bit and I think it would be far more useful if I explained my end of project workflow from 3DsMax to Flash and why I felt the need to use switches in the last bit of my code. So I will start with my end of modeling workflow: 1. Separate the main mesh into layers using the 3DsMax Layer Tool according to my needs. I might want to animate specific parts of the model in my website code or apply unique textures to each different part of the mesh. 2. Go through each mesh layer and make sure that the smoothing groups are set up well and re-build them if they are not. 3. Use a checkerboard texture to create good UV maps for all meshes in all layers. I use the checkerboard texture because it is easier to see if the UV's match well across the entire object instead of just mesh by mesh / layer by layer. Easier to create a uniform UV consistency. 4. Save the model as myModelA or myModel1 or whatever the next letter or number happens to be in your iterative naming convention. 5. Here is where I replace whatever textures that I am using for 3DsMax viewing with just a default standard texture. I make sure that this default is the only texture on all meshes / layers of the model. This is because I like to dynamically apply my textures with code, but you may want to skip this step. 6. Select all meshes within all layers of the model, make sure that the model overall is at 0,0,0, Reset X-Form, then convert all meshes back to Edit-able Poly afterward. 7. Just as a final check, select all meshes, enter vertex mode and weld to make sure that everything is tight before export. 8. Export the model as Obj. Make sure to hide any trash geometry layers or delete them before export. Now you will have an Obj model file and its material file. I have already made a point about adjusting the obj file .mtl path if these assets are placed in a special folder. Failing to do this will spit the dreaded network stream error for the .mtl file. The Two code Switches in my code snippet: 1. Switch 1: This switch catches the AssetEvent for each layer in the model. Each event from the DataLoader will be 1 of three things. I only care about the Mesh asset, but it will also provide both the Material and Geometry Assets. This is why I have the first switch. Example: I export a model with 3 layers, my switch will catch three different passes for each layer, so 9 passes. I only care about the Mesh pass, and I push the code that converts the string information to a mesh and then apply my textures accordingly when the Mesh case is true. If I do not detect for the other two cases, however, I will more often than not catch the wrong information and receive a null object error when trying to convert the string to a mesh (in the cases of Material or Geometry). This is the simple and quick explanation for the first switch. 2. Switch 2: I am going to use the same example of a 3 layer model and I want a different texture applied to each different layer (mesh section). This is the reason that I use the second switch. You can tell which layer (mesh section) will come in what order by opening your Obj file in notepad and looking at the Object: someName instances. Let's say that my 3 layer model lists the the Object names as follows from top to bottom on the file (Frame, Text, Base). I know what geometry the names link to since they are the layers that I created in 3DsMax . Case 0 = Frame, Case 1 = Text and Case 2 = Base. I now know what material to apply in each case instance. Voila!!! I am texturing or animating the correct part of the mesh using a switch statement There are many ways to do this I imagine, and I am the first to admit that I am not an expert. So feel free to get creative with your methods.
  7. Hello Everyone and Happy New year! I have been fully re-working my website using Greensock (Flash) to leverage the Starling Away3D framework. I have found that many people ask the same questions about how to use the incredible power of the Greensock code to take care of the loading of Starling and Away3D assets: Here are some code examples from the Preloader ClassFile: 1. LoaderMax loader that queues and loads a 3DSMax (Obj) model, myModel, for a second Content Classfile: //======================================================== //*** Variable declarations for Main Loader.*** // //======================================================== private var mainQueue:LoaderMax = new LoaderMax({name: "mainQueue", rawProgress: 1, onProgress: ProgressHandler, onComplete: completeHandler}); //========================================================== //*** LoaderMax Loader.*** // //========================================================== LoaderMax.defaultAuditSize = false; mainQueue.append(myModel); mainQueue.load(); mainQueue.addEventListener(LoaderEvent.COMPLETE, completeHandler); mainQueue.addEventListener(LoaderEvent.PROGRESS, ProgressHandler); 2. Here is a close look at the DataLoader Variable that I am using in the Loader above. The DataLoader has the model path (assets/myModel.obj) and the name (SkyScraper) that I am giving the model, so that I can access it in the other class file //========================================================================= //*** Variable declarations for Away3D Model Preloading.*** // //========================================================================= private var myModel:DataLoader = new DataLoader("assets/myModel.obj", {name: "SkyScraper", format: "text", rawProgress: 1, autoPlay: false}); This is all that is needed in the preloader class. The 3DSMax model will be loaded by the DataLoader in text format. The next step is important and must be done before testing: 1. Open the .obj file in notepad and make sure that the path to the .mtl file is correct. In my example I had to re-write the path from Object: myModel to Object: assets/myModel since the .obj file and its .mtl file were added to the assets folder for my website. If you do not do this, you have the chance of encountering a Network streaming error complaining about the inability to resolve your .mtl file location when testing your flash page. I will now show you how to access the model information that we need in the content class. Here are the code examples from my Content Class File, which needs to access the model data so that it can be shown in the content page: //======================================================== // //*** DataLoaders for Model Meshes.*** //*** Mesh Variable Declarations.*** // //======================================================== private var skyScraperModelText:String = LoaderMax.getContent("SkyScraper"); private var modelMesh:Mesh; In the code chunk above, I have asked to getContent on the name of the DataLoader from the Preloader classfile and that information has been stored in the new string variable skyScraperModelText. I have also declared a new mesh variable "modelMesh" for later usage. //=========================================================== // //*** Loader for the Portfolio Mesh *** // //=========================================================== meshLoader = new Loader3D(); meshLoader.loadData(skyScraperModelText); meshLoader.addEventListener(AssetEvent.ASSET_COMPLETE, modelLoaderHandler); This chunk of code allows the Loader3D (Away3D) to have access to the Obj model data that we have already pre-loaded using Greensock. The new eventListener will then fire our last chunk of code, which will load the Obj data from the String variable and start applying textures to each 3DsMax model layer that I created when setting the model up: NOTE: Most of the code below is extraneous to the act of loading the model into the content class so that it can be rendered on a webpage. I have left it in so that you can see the process that I am using to dynamically apply my own texture to the mesh layer. There are actually 9 case switches in my real code that apply 8 different textures to the 8 different model layers, but 1 is enough for the example. private function modelLoaderHandler(e:AssetEvent):void { trace("Portfolio Symbol Mesh Loaded!"); //============================================================== // //*** Set up Away3D Model Textures and Assign the Lights. *** // //============================================================== var boxModelCubeTexBase:Texture2DBase = new BitmapTexture(boxModelCube.rawContent.bitmapData); var boxModelOuterRingTexBase:Texture2DBase = new BitmapTexture(boxModelOuterRing.rawContent.bitmapData); var boxModelInnerRingTexBase:Texture2DBase = new BitmapTexture(boxModelInnerRing.rawContent.bitmapData); var boxModelLettersTexBase:Texture2DBase = new BitmapTexture(boxModelLetters.rawContent.bitmapData); switch (String(profileMeshVar)) { case "0": runFirstMaterialSwitchPA(); // MaxBody Mesh break; case "1": meshLoader.removeEventListener(AssetEvent.ASSET_COMPLETE, modelLoaderHandler); trace("Profile Model Ready for Render Engine!!!"); break; } function runFirstMaterialSwitchPA():void { trace("Applying First Profile Model Material!") //======================================================================== // //*** First Material is applied to the Main Box Object *** // //======================================================================== switch (String(e.asset.assetType)) { case "mesh": // Assign mesh modelMesh = e.asset as Mesh; // Loop through mesh assigning materials to the sub meshes for each (var m:SubMesh in modelMesh.subMeshes) { trace("APPLYING PROFILE MATERIAL TO SURFACE 0!!!!!"); //============================================================= // //*** Set up Away3D Model Textures and Assign the Lights. *** // //============================================================= var cubeMaterial:ColorMaterial = new ColorMaterial(0xffffff); cubeMaterial.ambientColor = 0xdd5525; cubeMaterial.ambient = 1; //0xdd5525; cubeMaterial.specular = .5; cubeMaterial.diffuseMethod = new CelDiffuseMethod(3); cubeMaterial.specularMethod = new CelSpecularMethod(); cubeMaterial.addMethod(new OutlineMethod(0x000000, 5, true)); CelSpecularMethod(cubeMaterial.specularMethod).smoothness = .01; CelDiffuseMethod(cubeMaterial.diffuseMethod).smoothness = .01; cubeMaterial.normalMap = Cast.bitmapTexture(boxModelCubeTexBase); cubeMaterial.repeat = true; cubeMaterial.lightPicker = lightPicker; //============================================================= // //*** Find the Model Assets using the Loader and their Level. * // //============================================================= m.material = cubeMaterial; } break; case "material": trace("This is a material and not a model!!!"); break; default: trace("UNHANDLED ASSET TYPE: " + e.asset.assetType); break; } } The true take-away chunk of code from the bit above is part of the first switch statement: switch (String(e.asset.assetType)) { case "mesh": // Assign mesh modelMesh = e.asset as Mesh; blah blah blah more code { The e.asset String is being converted to a mesh and my modelMesh variable is being declared equal to it and therefore now contains the important Obj model asset information. Voila!!! The later code uses switch statements to apply different textures to the different Obj model layers, but that is for another topic I hope that someone else finds this useful and wastes less time searching for answers -Cheers
  8. Hello everyone, I am sorry that this is offtopic and not specific to Greensock, but I get a lot of great help and responses here, so I thought I would try My problem is that I shuffle my array of 16 images and then pick from that array to place an image on a thumbplate. It works perfectly most of the time. Sometimes, however, one of the already loaded images gets removed from the array and therefore removed from its image plate during another shuffle pass. I am loading images on to 6 plates, so the shuffle runs 6 times. Here is my shuffle code: public function shuffleArray(input:Array):void { for (var i:int = input.length - 1; i > 0; i--) { var randomIndex:int = Math.floor(Math.random() * (i + 1)); var itemAtIndex:Object = input[randomIndex]; input[randomIndex] = input[i]; input[i] = itemAtIndex; } } Does anyone see a way that I can avoid already placed images from getting removed? Here is the PickFromArray code I am using, in case the issue is in there: public function pickFromScreenArray():void { trace("Grab a New Image"); var imageArray:Array = ["AssassImageSA", "AssassImageSB", "AssassImageSC", "AssassImageSD", "AssassImageSE", "AssassImageSF", "AssassImageSG", "AssassImageSH", "AssassImageSI", "AssassImageSJ", "AssassImageSK", "AssassImageSL", "AssassImageSM", "AssassImageSN", "AssassImageSO", "AssassImageSP", "AssassImageSQ"]; shuffleArray(imageArray); addChildAt(LoaderMax.getContent(imageArray[0]), 1); var currentImage:DisplayObject = getChildAt(1); currentImage.alpha = 0; TweenMax.fromTo(currentImage, 2, {autoAlpha: 0}, {autoAlpha: 1, ease: Quad.easeIn}); } Thanks for looking
  9. After some toying I found my answer!!! public function findTheImage(e:MouseEvent):void { trace("Check for ImageA"); var currentScreenImageOnA:DisplayObject = ScreenButtonA.getChildAt(1); trace(currentScreenImageOnA.name); trace(screenImageA); trace(screenImageB); trace(screenImageC); trace(screenImageD); trace(screenImageE); trace(screenImageF); if (currentScreenImageOnA.name == "AssassImageSA") { navigateToURL(new URLRequest("http://levelforge.com/images/WebsiteFlash10/AssassinsCreedIII_A.png")); } if (currentScreenImageOnA.name == "AssassImageSB") { navigateToURL(new URLRequest("http://levelforge.com/images/WebsiteFlash10/AssassinsCreedIII_B.png")); } if (currentScreenImageOnA.name == "AssassImageSC") { navigateToURL(new URLRequest("http://levelforge.com/images/WebsiteFlash10/AssassinsCreedIII_C.png")); } if (currentScreenImageOnA.name == "AssassImageSD") { navigateToURL(new URLRequest("http://levelforge.com/images/WebsiteFlash10/AssassinsCreedIII_D.png")); } if (currentScreenImageOnA.name == "AssassImageSE") { navigateToURL(new URLRequest("http://levelforge.com/images/WebsiteFlash10/AssassinsCreedIII_E.png")); } if (currentScreenImageOnA.name == "AssassImageSF") { navigateToURL(new URLRequest("http://levelforge.com/images/WebsiteFlash10/AssassinsCreedIII_F.png")); } } So after running some traces to see what was actually showing up for comparison, I decided to compare the name strings and voila!!! I get the exact large image link perfectly on every instance comparison. Woohoo!
  10. Cool, thank you for the quick reply. I do have both class files and the test movie that I could send to you if you want to see all of it together? Sadly my explanations of what is going on are probably quite limiting. My main problem is that I don't have the best way to load images onto my thumbPlates. If I try and run that PickFromArray function without the shuffle, it will only load an image onto one instance called to the stage and spit null errors for the other instances called. I am just not as clear on array usage as I should be >.<. I would also rather keep these class files separate so that I can use the ScreenButtonScript class in multiple movies.
  11. Ok after a bit more work I have everything working except for one thing. I am using this function to try and find the image that was loaded into child level 1 of the thumbnail (Level 0 = backplate, level 1 = randomly loaded thumbnail, level 2 = mouse detection plates). Once found it is compared to all 6 image variables. Itis supposed to be = to one and then fire off the correct link: public function findTheImage(e:MouseEvent):void { trace("Check for ImageA"); var currentScreenImageOnA:DisplayObject = ScreenButtonA.getChildAt(1); trace(currentScreenImageOnA); if (currentScreenImageOnA == screenImageA) { navigateToURL(new URLRequest("http://levelforge.com/images/WebsiteFlash10/AssassinsCreedIII_A.png")); } if (currentScreenImageOnA == screenImageB) { navigateToURL(new URLRequest("http://levelforge.com/images/WebsiteFlash10/AssassinsCreedIII_B.png")); } if (currentScreenImageOnA == screenImageC) { navigateToURL(new URLRequest("http://levelforge.com/images/WebsiteFlash10/AssassinsCreedIII_C.png")); } if (currentScreenImageOnA == screenImageD) { navigateToURL(new URLRequest("http://levelforge.com/images/WebsiteFlash10/AssassinsCreedIII_D.png")); } if (currentScreenImageOnA == screenImageE) { navigateToURL(new URLRequest("http://levelforge.com/images/WebsiteFlash10/AssassinsCreedIII_E.png")); } if (currentScreenImageOnA == screenImageF) { navigateToURL(new URLRequest("http://levelforge.com/images/WebsiteFlash10/AssassinsCreedIII_F.png")); } } This is my attempt to find what the random image placed into this thumbnail plate is, compare it to all six possibilities, and then link the correct larger version of the image. Sadly my code does not throw any errors, but it also does not do anything. I know that the if statements work, because they have compared and detected the correct image in previous setups where other things did not work. I assume I have done something wrong with the "var currentScreenImageOnA:DisplayObject = ScreenButtonA.getChildAt(1);" which is meant to examine the thumbnail instance on the stage "ScreenButtonA" and get the image on level 1 of this thumbplate to compare to all of the image possibilities. Has anyone else tried anything like this and maybe have some advice on what I am missing? Thanks!
  12. Thanks a bunch. It was not actually that yours does not do what I am after. I was just already trying the other option, so I finished my test. I am going to try yours next time I dig into it actually since my attempt is a bit on the tweaky half-functional side. Thanks again and I will tell you how it works out
  13. I actually don't have access to the transformAroundCenter code yet, but I am trying something that is showing promise: public function ScreenButtonScript() { // This is the base button image. trace("Load the Base Image"); addChildAt(screenBase, 0); screenBase.centerRegistration = true; screenBase.alpha = 1; // This is the right hitbox on top of the base button image. hitRight.x = 30; hitRight.y = -5; addChildAt(hitRight, 1); hitRight.alpha = 1; // This is the topright hitbox on top of the base button image. hitTopRight.x = 30; hitTopRight.y = -30; addChildAt(hitTopRight, 1); hitTopRight.alpha = 1; mouseChildren = true; buttonMode = true; } // These are the deformation functions for the two plates I have loaded. private function deformRight(e:MouseEvent):void { trace("Deformations for Right Button"); TweenMax.to(screenBase, .5, {z: -15}); TweenMax.to(screenBase, .5, {rotationY: 15}); TweenMax.to(screenBase, .5, {rotationX: 0}); } private function deformTopRight(e:MouseEvent):void { trace("Deformations for TopRight Button"); TweenMax.to(screenBase, .5, {z: -15}); TweenMax.to(screenBase, .5, {rotationY: 15}); TweenMax.to(screenBase, .5, {rotationX: 15}); } // Deformation deblur I call later to remove the blur. private function screenDeBlur():void { var currentX = screenBase.x; var currentY = screenBase.y; screenBase.transform.matrix3D = null; screenBase.x = currentX; screenBase.y = currentY; } So that is not all the code calling each function, but I have two right side deformations set up (Right and TopRight) using two small movie squares (lvl 1) that I am loading on top of the main button (lvl 0). This seems to work well but I lose the mouse arrow when I am over top of one of the movie instances that calls for the deform, even though I set mouseChildren: true;. Is there something I can do to keep the little hand mousebutton cursor even when I am over the other eventListener movie plates that call the button deforms? It is also a bit tweaky as the plates that call for the deformations do not seem to always catch the mouseOver events. I assume this is because the main button also has mouseOver EventListeners as well. Maybe they fight for priority from time to time? Thanks.
  14. Thank you very much! I will poke around with this. I really appreciate your time
  15. Has anyone ever tried to create a button that transform adjusts to the position of the mousecursor as you mouseOver it? I am looking to create the same basic effect as the Dell Stage app buttons: I already have a couple of buttons that react to mouseOver in one direction, but they do not adjust in real-time to the exact cursor position as you move over the button in one direction or the other. Here is my code that does the simple transform in one direction: private function buttonReactOver(e:MouseEvent):void { TweenMax.to(this, .5, {z: -15}); TweenMax.to(this, .5, {rotationY: -15}); } } My initial thought would be to create 8 invisible hitboxes in my button (4 for each side) and (4 for each corner). I could then use eventListeners for each to call functions like the one above. Each would rotate the main visual in the correct direction depending on the hitbox I am inside of at the time. There must be a more efficient way to go about this though? Thanks
  16. Hello again I have yet another question concerning what sticks around in memory and has to be forcefully cleaned and what gets flushed auto-magically under the hood. I recently stumbled upon the beauty of dispatchEvents trying to find a way to communicate from my NavButton ClassFile to the Main Class file for my website. My basic setup is as follows: NavButton.as Button with definitions and eventlistener watching for someone to click on the button Public Function onButtonClick with a dispatchEvent inside. Main.as EventListener for dispatchEvent from Public Button Function in the NavButton.as dispatchEvent listener fires off a Public Function that loads content into the main section of my website when the navbutton is clicked. Yay simple, easy communication between the two class files. My question is this: Does a dispatchEvent get sent, get picked up by eventListeners, then get removed from memory under the hood or does each dispatchEvent call just sit in memory until you manually clean it with a Kill call of some sort? The only reason I worry about this is because I have 9 navigation buttons, so 9 dispatchEvents that can be called at any time. If they stick around in memory then it could, I guess, cause issues over time if the website stays open and continues to be navigated from content page to content page. I am probably being ridiculous about performance, but it never hurts to ask
  17. Thanks man. You are awesome! One of the class files attached directly to objects in the library of my main flash movie must have been the culprit. I took all of my class files, xml files, and flash source files and moved them into a new folder on my desktop. I then re-downloaded V12 of the greensock files and dumped that into the new folder. Opened up, tested, and re-saved everything, flushed all of the files out of my host site, and re-uploaded. BOOM! All good. I am not sure what I missed, but cleaning house did it hehe.
  18. Thanks for the quick response! I will take a look in there, but the error in the LevelforgeImageBackdrop is I think just one of the functions that cleans the image and then puts another in its place. The very first time that runs it throws that error, and then never again because there is something there. I will look at it anyway. The other one is going to be harder for me to find I think: VerifyError: Error #1053: Illegal override of killProps in com.greensock.plugins.AutoAlphaPlugin. I will do what I can to find it tomorrow. Thanks! I sent my main class file to you in an IM. If you get some spare moments could you tell me if I am doing something horribly wrong in there? I may have missed converting over from V11 fully >.< Thanks!
  19. Hello everyone, I have an incredibly odd problem. I finally moved all of my new website files into the main section of my host domain out of the (WebsiteFlash10) test folder. I made a lot of changes to my class files, but I tested my whole site locally and everything worked without issue. Most of the recent changes were in the conversion of my site from V11 to V12, but that is definitely not the problem. The other thing that I did was add a little XML news section, which is older and not converted to greensock code. The problem I am having though is that when I try to load my website online it just does not work at all. It starts to load my pre-loader and just goes black. I tested everything again on my PC and it all works great and there are no errors spewed from any of the code. It runs perfectly cleanly. Has anyone ever seen this kind of behavior or even know where to start in order to debug it? Here is the link to my site that should work: http://www.levelforge.com/index.html You will see the preloader begin, but then it just dies and does nothing. Thanks for any input.
  20. Awesome, I was hoping that was the case. Thanks a lot for the quick reply
  21. Hello again I have been looking through and implementing some of the new additions offered in V.12 and I started going through my class files and setting up kill calls for all of the functions after I complete them. The following is an example: private function killAllTitleActions():void { trace("Clean up the Title and Grid Actions"); TweenMax.killTweensOf(loadHomeSymbol); TweenMax.killTweensOf(loadLevelTitle); TweenMax.killTweensOf(loadTitleLineA); TweenMax.killTweensOf(loadTitleLineB); TweenMax.killTweensOf(loadHomeTitle); TweenMax.killTweensOf(buildGridHome); TweenMax.killTweensOf(createHomeGrid); } It seems Greensock's code does a lot of clean-up under the hood already so I am not really sure if I need to be setting up all of these kill calls or not. My functions will a lot of times create a bunch of tweens and delayedCalls, so I figured that it couldn't hurt to run these kill functions just to make sure that nothing is sticking around in memory. Is this a good practice, or is it unecessary considering all of my tweens and delayCalls are technically complete before I call the cleanup functions. Thanks
  22. Not a problem. Thanks for the reply and fix. I am going through the process of converting what I have done so far for my website from V11 to V12. This issue was popping up in a number of my class files, so it will be nice to solve them all in one shot Love this stuff guys! Thanks for all of the hard work!!
  23. Good afternoon everyone! I have several chunks of code that worked without issue in the V.11 release, but are now spitting an Implicit Coercion of a value of type com.greensock.easing:BounceIn to an unrelated type Function. Here is one of those lines: TweenMax.fromTo(announceTitle, 2, {autoAlpha: 0}, {autoAlpha: 1, ease: RoughEase.create(1, 11, true, Bounce.easeIn, "none", false)}); I assume I just missed one of the changes in the list of things that I need to update concerning eases? I have tried re-arranging this code and even making a var using my desired RoughEase settings. They all throw errors. Here is the full function if it helps: private function loadMainPic():void { trace("Loading the central image"); TweenMax.fromTo(centralImage, 2, {autoAlpha: 0}, {autoAlpha: 1, ease: RoughEase.create(1, 11, true, Bounce.easeIn, "none", false)}); TweenMax.delayedCall(1, loadAllBorders); } Thanks for any help or advice.
  24. Excellent! Thanks so much for the reply. I really enjoy knowing how the wheels turn behind things and one of my main reasons and drives for re-building my site from scratch is to have a much more efficient setup.
  25. Hello, I wanted to pick some brains and learn a bit more about cleaning up after myself in my code. I am re-building my website from scratch using AS3 and a lot less timeline driven animations. I really have been loving digging into TweenMax and LoaderMax, but I think that I am still quite uneducated about how to optimize performance and make sure that I am coding in the most efficient manner. My current setup includes a main movie with a main class file. The main class file contains the preloader code and animations that load a number of external swfs, various button and animation sounds, and two songs for my music player. There are also quite a few functions that control the timing/loading of the various start graphics. Each external movie has its own class file that calls for the content of the loaders that they need to access as well as all of the tweens and animations that I need. 1. My first specific question deals with how I should handle my LoaderMax loaders. I have a number of loaders that load external .swfs into my main movie. I do not autoDispose these loaders because I preload them and do not necessarily call for their content right away. Should I dispose of these loaders in the class files of the external movies after I have run a getcontent for them? I assume this is the preferred method? When it comes to the loaders for the sounds it gets more complicated for me. Almost every other external movie that could be called throughout a visit to the site will run a getcontent on these loaders since they all need these basic sounds, so I guess I need to leave the loaders in tact for the life of the site? How much performance degradation, if any, comes from leaving the loaders in tact? 2. Next are my eventListeners. I remove these in any case that I can, under the assumption that they will degrade performance if there are a lot of them active. The problem I foresee with this is the main page of my site. Right now, even in its early stage, I have @ 16 buttons that could be pushed at any time, so I have to leave their eventListeners active in order to detect mouseOver events, clicks, etc. Is this a really bad practice? It seems to me that I really cannot get around having a lot of eventListeners active at any given time. 3. What are the big performance drains and inefficient code practices that I should try to avoid and clean up? I am sorry for all of the questions, but I am new to both AS3 and Greensock and I want to use them in the most efficient ways that I can. I am getting along quite well, but I probably know enough to really do as much damage as good at this point hehe. Thanks ahead of time for any responses!
×
×
  • Create New...