Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

jtvalles last won the day on June 5 2012

jtvalles had the most liked content!


  • Content Count

  • Joined

  • Last visited

  • Days Won


jtvalles last won the day on June 5 2012

jtvalles had the most liked content!

Community Reputation

3 Newbie

About jtvalles

  • Rank
  1. Hey guys. This is my first foray into TimelineMax. I'm trying to build an app that will take the same timeline and repopulate with another clip before it plays again. So far, the only way I've been able to make it work throws errors. Any advice? var elements:Array = new Array(mc0,mc1,mc2) var counter:Number = 0; var tl:TimelineMax = new TimelineMax({paused:true, repeat:0});; var mc = elements[counter]; function stopIt():void { tl.pause(); } stage.addEventListener(MouseEvent.CLICK, resume) function resume(e):void { tl.resume(); tl.to(mc, 1, {x:100, onComplete:stopIt}); tl.to(mc,
  2. I have created an application that passes a url that may be a swf, image or flv. The content will be loaded into the same container. I'm able to load the respective formats, but it creates a new Loader each time. Is there a way to create one Loader for each format and update the container with its respective formats while removing the previously loaded content? For example: I load a jpg into "mc_container" then remove that jpg and load a swf into "mc_container" What I tried doesn't work: public function DisplayVisual() { LoaderMax.activate([ImageLoader, SWFLoader, VideoLoader]); }
  3. When I run my application from a cd/dvd, the progress bar doesn't work. Do I need to do something differently when running from a disk? loader = new SWFLoader(url, {name:"main", estimatedBytes:3000, container:this, autoPlay:false, onProgress:imageProgressHandler, onComplete:completeHandler}); loader.load(); function imageProgressHandler(event:LoaderEvent):void { TweenLite.to(mc_progress, .1, {alpha:1}); mc_progress.progressBar_mc.bar_mc.scaleX = event.target.progress; }
  4. Thanks, Jack. I implemented your code plus cleared some containers and it seemed to fix it. I'm pretty sure it wasn't the VideoLoader.
  5. Thanks Jack. Here is the code that loads and updates the SWF. Where do I call the dispose() or unload() method to assure gc happens? Also, could this be written as a SWFLoader without a queue? It actually only loads one SWF until the next SWF url is called. I was not able to get it to work with SWFLoader alone. var container:MovieClip = new MovieClip(); var queue:LoaderMax = new LoaderMax({name:"mainQueue", onChildProgress:imageProgressHandler, onComplete:completeHandler}); var mainSWF:ContentDisplay; function loadSWF(url:String):void { queue.append( new SWFLoader(url, {name:
  6. I have an application that uses LoaderMax to load a swf (swf1) with audio. Basically each swf is a chapter in a multi-chapter presentation. When I advance to a chapter (swf2) then return to the previous chapter (swf1) the audio becomes distorted and begins to pop. Is it possible that the previous swf has not been trashed completely?
  7. Thanks Carl. Works like a charm. I love Greensock.
  8. I am trying to create a timeline that is populated with content from an xml source. My questions are: How do I fade out the previous mc for the next mc? How do I restart the whole she-bang after the mcs have been populated? How do I reset the timeline when the xml file is updated? function loadTaglines():void { for ( var i:uint = 0; i < xml.length(); i++ ){ var tagline = new mc; tagline.txt_tagline.text = xml.tagline[i] tagline.x = 816; tagline.y = 47; tagline.scaleX = 4; tagline.scaleY = 4; tagline.alpha = 0; addChild(tagline).name = tagline + i; timeline.append( new TweenL
  9. I have some code that scrolls a movieClip. The problem is I cannot get the onComplete to fire and remove the listener. It will fire when the clip reaches its bounds but not any time in between. Does my code prevent the tween from completing? import com.greensock.*; import flash.display.MovieClip; var mc:Sprite = new Sprite(); mc.graphics.beginGradientFill(GradientType.LINEAR, [0x666666,0xfff000],[0.9,0.1],[0,255], new Matrix(0,-1,1,0,height,0)); mc.graphics.drawRect(225, 50, 100, 300) addChild(mc); var destination:Point=new Point(); var dragging:Boolean=false; var speed:Number=20;
  10. Works perfectly. Thanks again, Carl.
  11. Here's an easy one: How do I update the url that a conditional statement determines? What I have so far does not work: var video:VideoLoader = new VideoLoader('', {name:"weatherVideo", container:mc_video, width:756, height:672, scaleMode:"proportionalInside", bgColor:0x000000, autoPlay:false, volume:0, estimatedBytes:75000}); if( condition == "Cloudy.png" ){ getVideos( 'video' ); } function getVideos( url:String ):void { video.getLoader( 'weatherVideo' ).url = url; video.load(); video.playVideo(); }
  12. Thanks, Carl. The code works well. Here's how I coded my project: var mainImage:ImageLoader = new ImageLoader("", {container:Object(root).mc_newsStage.mc_newsPhoto, width:465, height:580, scaleMode: 'proportionalOutside', alpha: 0, crop:"true", estimatedBytes:60000, onComplete:imageCompleteHandler}); //Buttons are nested in the mc: Object(root).mc_news_heds.addEventListener(MouseEvent.MOUSE_DOWN, newsMenuHandler); function newsMenuHandler(event:MouseEvent):void { if (event.target.name == "mc_newsItem1"){ LoaderMax.getLoader("mainPhoto").url = "image1" } if (event.target.name == "mc_n
  13. Here's another one. I am designing an application where I load different images into the same Movie Clip. The code works fine, but I don't know how to unload without errors (a child is added the Movie Clip for every click). For that matter, I don't know if this is the best solution. Any advice? Object(root).mc_news_heds.addEventListener(MouseEvent.MOUSE_DOWN, newsMenuHandler); function newsMenuHandler(event:MouseEvent):void { if (event.target.name == "mc_newsItem1"){ var mainImage:ImageLoader = new ImageLoader("http://ts-ses-2/lv/images/" + newsInfo.News[0].img_preview[0], {c