Jump to content
Search Community

un4given

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by un4given

  1. Hey, I seem to be having a problem animating text that is brought in through XML, is this a common problem? Below is the code I am using. If I do a test on text that it not brought in from XML it works fine. var stf:SplitTextField = new SplitTextField(Comments_txt0); for (var i:int = stf.textFields.length - 1; i > -1; i--) { TweenMax.to(stf.textFields[i], 1, {blurFilter:{blurX:10, blurY:10}, x:Math.random() * 650 - 100, y:Math.random() * 350 - 100, scaleX:Math.random() * 4 - 2, scaleY:Math.random() * 4 - 2, rotation:Math.random() * 360 - 180, autoAlpha:0, delay:Math.random() * 0.5, ease:Quad.easeIn, repeat:1, yoyo:true, repeatDelay:1.2}); }
  2. Absolutely brilliant!!!! customBounds did the trick. Thank you soooo much
  3. If you could look at the files that would be great as I am still struggling. I did read the ASDocs but am unable to implement the code correctly. http://Http://damongolding.com/TweenExample.zip The link does not include and classes and I pulled all unnecessary code out of the FLA's
  4. Is there a way to use x and y values for the pins? rather then TOP_RIGHT and BOTTOM_LEFT? That way I could just set the x and y to the stage's x and y, as TOP_LEFT and BOTTOM_RIGHT seems to senses the size whole of the movie clip its attached to. and because I load a swf into the movieclip which contain items of the stage, which in term changes the size of the movieclip beyond the size of the stage. below is a link to my loader fla and first page. I dont think I am explaining the problem very well. If you could take a look I would be very thankful. [Link removed because it contained members-only code]
  5. Hello, I am having a issue with liquid stage. I have set the minimum and the maximum size that the website can be. The problem is that there are some items that sit off stage until called. And when I change the size of the browser, liquid stage accommodates but incorporates the 'hidden' items as part of the stage. Is there a way around this?
  6. Cheers!! Works like a charm! oversight on my side. I also have another question. The market SWF that preloads contains files which are brought in via XML. My question is: During the preloading stage, will/does loaderMax preload the xml files?
  7. Excellent thanks!! its it working quite nicley apart from when I want to bring the "city" back on to the stage. I used the code below to remove the market and add the city but doesn't work. this.removeChild( LoaderMax.getContent("market") ); this.addChild( LoaderMax.getContent("city") ); Again, thank you for the quick response! below is the full code. var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); queue.append( new SWFLoader("MARKETCS4.swf", {name:"market", estimatedBytes:306176, x:0, autoPlay:false}) ); queue.append( new SWFLoader("mainCS4.swf", {name:"city", estimatedBytes:1153433.6/*, container:this*/, x:0, autoPlay:false}) ); LoaderMax.prioritize("city"); queue.load(); function progressHandler(event:LoaderEvent):void { trace("progress: " + event.target.progress); } function completeHandler(event:LoaderEvent):void { var playcity:ContentDisplay = LoaderMax.getContent("city"); this.addChild( LoaderMax.getContent("city") ); trace(event.target + " is complete!"); } function errorHandler(event:LoaderEvent):void { trace("error occured with " + event.target + ": " + event.text); } addEventListener("MARKET",onMARKET,false, 0, true); function onMARKET(evt){ var playmarket:ContentDisplay = LoaderMax.getContent("market"); this.removeChild( LoaderMax.getContent("city") ); this.addChild( LoaderMax.getContent("market") ); } addEventListener("CITY",onCITY,false, 0, true); function onCITY(evt){ var playcity:ContentDisplay = LoaderMax.getContent("city"); this.removeChild( LoaderMax.getContent("market") ); this.addChild( LoaderMax.getContent("city") ); }
  8. Hello, Basically the site I have build consists of two SWF's, the problem I'm having is loading them and displaying the right SWF on the stage. this is the code I am using at he moment. It loads and displays the first swf "city" but Im having trouble removing city and replacing it with "market". Any help would be greatly appreciated, I'm sooo sick of steering at the screen for hours! import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); queue.append( new SWFLoader("MARKETCS4.swf", {name:"market", estimatedBytes:306176, x:0, autoPlay:false}) ); queue.append( new SWFLoader("mainCS4.swf", {name:"city", estimatedBytes:1153433.6, container:this, x:0, autoPlay:false}) ); LoaderMax.prioritize("city"); queue.load(); 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); } addEventListener("MARKET",onMARKET,false, 0, true); function onMARKET(evt){ var playmarket:ContentDisplay = LoaderMax.getContent("market"); }
  9. Hey, Is there anyway that the tweens inside a timeline can govern their own times? below I have add the code I am working with. I understand that the 0.2 at the end staggers the tweens but the thing is I need my tweens to start at different times. Am I missing something or is this an impossible task? var PageTimeLine:TimelineLite = new TimelineLite(); PageTimeLine.insertMultiple([ new TweenLite(background2, 0.40, {x:444.9,y:229.7,width:156.2,height:119.2,ease:Sine.easeOut}), new TweenLite(background2, 1, {delay:0.40,overwrite:false,x:52.5,y:25.3,width:940.9,height:718.4,ease:Elastic.easeOut}), new TweenLite(hometab, 0.1, {delay:1.40,overwrite:false,x:90.5,y:62.2}), new TweenLite(hometab, 0.20, {delay:2,overwrite:false,alpha:100,x:15.4,y:62.2,ease:Sine.easeOut}), new TweenLite(animationtab, 0.1, {delay:1.40,overwrite:false,x:97,y:69.5}), new TweenLite(animationtab, 0.40, {delay:2,overwrite:false,alpha:100,x:22.1,y:69.5,ease:Sine.easeOut}), new TweenLite(illtab, 0.1, {delay:1.40,overwrite:false,x:99.5,y:112.5}), new TweenLite(illtab, 1, {delay:2,overwrite:false,alpha:100,x:24.4,y:112.5,ease:Sine.easeOut}), new TweenLite(abouttab, 0.1, {delay:1.40,overwrite:false,x:101.8,y:155.8}), new TweenLite(abouttab, 1.10, {delay:2,overwrite:false,alpha:100,x:26.9,y:155.8,ease:Sine.easeOut}), new TweenLite(contacttab, 0.1, {delay:1.40,overwrite:false,x:104.2,y:187.1}), new TweenLite(contacttab, 1.40, {alpha:100,x:29.2,y:187.1,ease:Sine.easeOut})], 0, TweenAlign.START 0.40);
×
×
  • Create New...