Jump to content
Search Community

swiftmend

Members
  • Posts

    40
  • Joined

  • Last visited

Everything posted by swiftmend

  1. Hi, i'm having some serious issues trying to load in SWFS, all my loaded SWFs are failing: This is a ntive app, therefore the app has immediate access to the SWF - no needing to download it. Basically it's an App launcher, so I hit something in my host swf and it opens the external swf over the host This is my LoaderMax code which is getting all types of issues around being unable to find sounds, access the stage in the app, etc I've tried it on about 15 SWFs, it loads some of the graphics in some but then fails to execute code, others it just has errors and loads nothing: var AppLaunchQueue:LoaderMax=new LoaderMax({name: "AppLaunchQueue"}); AppLaunchQueue.append(new SWFLoader("Assets/Apps/" + AppToOpen + ".swf", {name: AppsToOpen + "_SWF", container: SwfHolder, onInit: initHandler})); AppLaunchQueue.load(true); I've been able to load these SWFs before from a very basic fla using the built in AS3 Loader class, is there some reason why that would work over yours? It looks almost like it's unable to see the classes / timeline in the external swfs and is trying to reference the parent swfs...
  2. Sorry for wasting your time, Of course I did, haha, sorry. Still so amazed at what can be done with this stuff, happy to be a paying customer of this code backed by excellent support! Ah well, at least the code on how to do this stuff adds to the forums search engine.
  3. Hi, I'm building an application that is going to require a large amount of variables passed to it, roughly 70-80 tweens per part of the "game" over a minute or two. I'd obviously like to not have to hand code in each tween as they will vary depending the games level. What i'm trying to build is a timelinlite function that takes an array of Strings and spits it into functions to fire at a set time, baically one each second after each other. this is what I've got: What it should be doing is adding a tween that calls the function Step with the array data sequentially. so it should be basically calling timeline.append(TweenLite.to(this, 1, {onComplete: Step, onCompleteParams: ["L"] })) timeline.append(TweenLite.to(this, 1, {onComplete: Step, onCompleteParams: ["R"] })) Etc However it's just throwing an error, am I misusing this function? private var Steps:Array; private var timeline:TimelineMax; public function DancePlay(SongName:String) { switch (SongName) { case "Goldfish": Steps = new Array("L", "R", "L", "L", "R") var i:int = 0 while (i < Steps.length) { timeline.append(TweenLite.to(this, 1, {onComplete: Step, onCompleteParams: [steps[i]] })) i++ } break; case "OtherSongs": //Will have a different array depending on song break; } } public function Step(DanceStep:String):void { switch (DanceStep) { case "L": //Plays this step break; case "LTC": //Plays this step break; case "LT": //Plays this step break; } }
  4. EDIT: SOLVED!!! solution is simply, TweenMax.killChildTweensOf(apponeLoader) TweenLite frickin rocks. A solution to all problems. --------- Hi, I have a case where I need to kill all the tweens within a loaded external SWF before I can remove it - unloadAndStop doesn't do this as they are calling each other constantly (EG the tween oncomplete recalls itself constantly, so the only way to remove and unload the swf is to stop that tween) - is there an easy way to kill a loaded swfs tweens (loaded using the loader class). this is how I load it: var apponeLoader:Loader=new Loader(); var apponeRequest:URLRequest = new URLRequest("./Assets/SWF/app1.swf"); apponeLoader.load(apponeRequest); addChild(apponeLoader);
  5. What would be the easiest way of doing this? I was thinking that from within the function I could set a currentx and y position, then reset it after the tween was done but before the function is called again, and use that as the point of reference, but that would make it tween to its current spot (eg do nothing)
  6. I tried this: TweenMax.to(this, 2, {bezier:[{x:Math.cos(angle) * radius + xCenter, y:Math.sin(angle) * radius + yCenter}], orientToBezier:true, onComplete:tweenFish}); with no luck!
  7. Wow, this is working pretty good, I tried to swap it over to a bezier to make smoothly rotate towards the new location, but that doesn't seem to work, is there a quick way to mke him rotate the point he moves to before he moves to it? currently he just moves around without any rotation.
  8. Hi, I'm building a "pond" like top-down experience and have a fish animated fish I'd like to random move around in the pool (and then run away if you click near them) was wondering how I could leverage tweenlite to have the fish randomly move around in the pond (without going outside of the pond itself). Is there some type of random position tweens with random speed? Or a way of looping the controls infinitly? Or if i could make a random tween and stick it in an enter_frame type control so it keeps running it over and over? Thanks for the help!
  9. Hi, I'd like to do something that "pushes" a movieclip back onto the stage if it is called and it is partly offstage - I figure AutoFitArea is the best bet, but it seems my only options are to move it automatically to the centre of the stage? Say for example i call: var area:AutoFitArea = new AutoFitArea(this, 0, 0, 1024, 768); //and my stage is 1024x768 area.attach(mc, ScaleMode.NONE); the mc is basically attached to objects around the stage, when called, brings up a circular selection menu at the mouse - if the mouse is near the edge, it will be partly off-stage - i'd like it to force it back on the stage, but only as much is needed to show it fully as close as possible to its original target. I've made a quick test fla.. that sort of shows the example..
  10. Is there anyway to target everything using TweenMax/Lite as a method of scaling objects? I'm building a Game, and would like the ability to zoom in/out of maps, I'm wondering if TweenLite is an efficient way of doing this? I'm pretty sure you can't make a "camera" in flash, so the only way of doing it is scaling everything?
  11. Brilliant! I solved this - sorry for something that was my fault.
  12. Hi, Was wondering if it's possible to normalise the speed of the movement through bezier points EG if two points are close together it'll take 1 second, if two points are reall far apart, they still take 1 second, but obviously the animation goes a lot faster to cover the gap. Just wondering if it's possible to normalise the speed of the whole animation?
  13. Hi, Thanks for your reply. I've narrowed it down it only seems to be affecting some of my graphics - not all of them, do you have a private place I can attach/email you a sample + graphics?
  14. Hi, I'm building a game, and using tweenmax as the enemies pathfinding (which works brilliant!) Basically the enemy has a class attached to him, which, after he is spawned via code outside his class goes through and adds the tween, etc to him, BUT if I change that enemies frame in his own class the tween for some reasons stops after it moves to the first position... any clue why this would be? I can't figure it out for the life of me. public function Enemy(code:int) { this.addEventListener(Event.ADDED, beginClass); this.addEventListener(Event.ENTER_FRAME, eFrameEvents); level = code;//set the level to the value passed in for use in other functions } private function beginClass(e:Event):void { _root = MovieClip(root);//defining the root health = level * 5; if (level == 1) { this.gotoAndStop(2); <--- THIS IS ISSUE: It changes his appearance all well and good, but seems to break the tween. } TweenMax.to(this, 20, {bezier:[{x:_root.wp2.x, y:_root.wp2.y}, {x:_root.wp2.x, y:_root.wp2.y}, {x:_root.wp3.x, y:_root.wp3.y}, {x:_root.wp4.x, y:_root.wp4.y}, {x:_root.wp5.x, y:_root.wp5.y}], orientToBezier:true}); }
  15. Hello all, Would love to know if it's possible to use tweenlite/max to rotate an object to face another object?
×
×
  • Create New...