Jump to content
Search Community

dons90

Members
  • Posts

    5
  • Joined

  • Last visited

About dons90

  • Birthday 03/13/1996

dons90's Achievements

0

Reputation

  1. Ok so I found a fix for it! My current publish settings made the .swf file save to a folder outside of the project folder. I went into the settings and set it back to the folder I was working in and it loaded the video correctly! If anyone else has this problem then: Ensure your publish settings are set to the folder in which the video file (or folder) is located.
  2. Hello. I've been searching for an answer to this problem but to no avail. I'm simply testing the LoaderMax and I haven't customized anything to fit my stage. I only want to load a video (flv file) and see that it plays. import com.greensock.*; import com.greensock.easing.*; import com.greensock.plugins.*; import com.greensock.loading.*; import com.greensock.loading.display.*; import com.greensock.events.LoaderEvent; ... var video:VideoLoader = new VideoLoader("flv/loader.flv", {name:"myVideo", container:this, width:400, height:300, scaleMode:"proportionalInside", bgColor:0x000000, autoPlay:false, volume:0, requireWithRoot:this.root, estimatedBytes:75000}); var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); queue.append( video ); queue.load(); I've imported all of these and used the code correctly as far as I know how to but it gives me the error Error on VideoLoader 'myVideo' (flv/loader.flv): NetStream.Play.StreamNotFound Edit: I have not put the flv in my Library, nor is it on the stage. Is that needed? I would like to load it from a location within the directory: flv/loader.flv
  3. Ok sure thing. I'm going to operate on a single frame from now on. Oh and yes I forgot to send the xml file along, but it's not very important for the problem I'm having currently. Thanks for checking it out for me though.
  4. Currently my .as file is separate from the .fla file. I'll show you both, though you may have more interest in the .as file. Ok so I have uploading size restrictions and I can't get both files below 500KB. Not sure how I'm gonna upload it here. However I'll link you to both files. Actionscript File: https://drive.google.com/file/d/0B_VT_RUyVM_sRjg5WWpCRXozdGc/view?usp=sharing FLA file: https://drive.google.com/file/d/0B_VT_RUyVM_saTR2RzR0VEJPajA/view?usp=sharing Note: I've done some edits to the code in order to try and identify the problem and it does seem that switching between frames is definitely causing the problem though I am not sure why. AS File.zip
  5. Hello. I am in need of serious help with this problem I'm facing. First off let me tell you what I want to achieve with my code. On click of a button at the top-center of my screen, 4 fishes are to be tweened with bezier movements to simulate 'swimming' through water. They have other functions but this is the part that I need to get working. function tweenFish():void { var numY:Array = new Array; for (var count:Number = 1; count < 5; count++) { numY.push(count+8); } numY.reverse(); trace(tweenArr, round); for (var numX:Number = 0; numX < 4; numX++) { var randomStart:Number = (Math.floor(Math.random() * (460 - 140 + 1)) + 140); _difficulty[numX].y = randomStart; _difficulty[numX].x = -50; if (round == 1) { tweenArr[numX] = TweenMax.to(_difficulty[numX], (numY[numX]/round), {bezier:{curviness:2, autoRotate:true, values:[{x:50, y:randomStart+5}, {x:150, y:randomStart-5}, {x:250, y:randomStart+5}, {x:350, y:randomStart-5}, {x:450, y:randomStart+5}, {x:550, y:randomStart-5}, {x:770, y:randomStart+5}]}, ease:Cubic.easeInOut}); } } tMax.add(tweenArr); } This is the function I use to setup the tweens for the fishes. Each fish (set in an array called _difficulty) is given a set x value (offscreen) and a random y value so that each run they will 'swim' across the stage. This works perfectly. In fact, all of it runs perfectly...until I try to run it again. This is my initialization which basically stops the round if the fishes make it off the stage without being clicked (intended functionality). var tMax:TimelineMax = new TimelineMax({onComplete:endRound}); And this is the function it calls. function endRound():void { GoFishing.removeEventListener(MouseEvent.CLICK, fish); while (tweenArr.length > 0) { tweenArr.length = 0; } // tMax.clear(); POSSIBLE CODE? gotoAndStop("endGameResults"); scoreBox.text = "Your score is: " + points; gameResultsBG.width = 1; gameResultsBG.height = 1; TweenLite.to(gameResultsBG, 1.5, {scaleX:1.1, scaleY:1.1}); TweenLite.to(gameOverText, 3, {autoAlpha:1}); TweenLite.to(playAgain, 2, {visible:true}); timerX.stop(); timerX.removeEventListener(TimerEvent.TIMER, clock); playAgain.addEventListener(MouseEvent.CLICK, function(e:MouseEvent):void { MovieClip(root).gotoAndStop(1); GoFishing.addEventListener(MouseEvent.CLICK, fish); round = 0; } ); } Don't mind the commented line at the top. Anyway, this function leads to frame 2 where it's an end-game screen and it allows you to retry. 'playAgain' would take you to frame 1 and play the tween again when the button at the top is clicked, or so I thought. This is where the fishes are frozen off screen (I expanded the window and saw), and they do not move when the function is called, BUT the timer for the timeline STILL RUNS. Know why? The timeline takes 10 seconds to run each time at first. On the second run, 10 seconds pass and it leads me to the end-game screen. So clearly the timeline is running as I would expect it to, but the fishes aren't being moved. Is there something wrong with my code here? Do I need a different approach? Also I just thought of this: Would disabling these fishes, or switching to another frame at any point mess up the tween functionality? Thank you for your help.
×
×
  • Create New...