Jump to content
Search Community

learner_7n

Members
  • Posts

    131
  • Joined

  • Last visited

Everything posted by learner_7n

  1. Hi, Thanks for the reply. I have tried the code and getting the following error: 1120: Access of undefined property WaterFall. The following is the whole code is: stop(); import com.greensock.*; import com.greensock.easing.*; import com.greensock.plugins.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.ImageLoader; import com.greensock.loading.LoaderMax; import com.greensock.loading.SWFLoader; import com.greensock.loading.VideoLoader; import com.greensock.loading.display.ContentDisplay; import flash.display.MovieClip; //set up the holder var swfHolder:MovieClip = this.mySWF_mc; //create a LoaderMax named "mainQueue" var queue:LoaderMax = new LoaderMax({name:"mainQueue"}); //load the SWF into its holder queue.append(new SWFLoader(WaterFall.swf, {name:"WaterFall",container:swfHolder})); mySWF_mc is the layer (MovieClip) where I want to put my "WaterFall.swf" animation file. Thanks.
  2. Hi, The following code works fine but the .SWF stays always on Top of the other Layers. How can I bring it down as per my requirement (Say, I have 10 Layers and I want my this .SWF file to be on Layer 3 from the botton)? Please do help. var mySwf1:SWFLoader = new SWFLoader("AnalogClock.swf", {width:225, height:225, container:this, onComplete:completeHandler1}); mySwf1.load(); function completeHandler1(event:LoaderEvent):void { TweenLite.to(event.target.content, 0,{alpha:0}); TweenMax.fromTo(event.target.content, 2, {x:225, y:-500, width:225, height:225, alpha:.5}, {x:225, y:300, width:225, height:225, alpha:1, delay:1, ease:Strong.easeOut}); } TweenLite.delayedCall(20, mySwf1.unload) Please do help.
  3. Hi, The following code works when I put this code on Contact_mc. But when i go back to Home_mc from Contact_mc, the .SWF file animates and the mySwf2.content.mask = MaskCloud_mc the mask doesn't works. Note: When I open it first time, the mask works fine, but when I click on Home_mc the second time, the mask doesn't work. Please help. mySwf2.load(); Regards.
  4. Hi, I have the following code on Home_mc which is working fine. But when I move from Home_mc to Contact_mc it should stop. How can I stop it? What is the code, please. var mySwf2:SWFLoader = new SWFLoader("Clouds.swf", {width:1000, height:400, container:this, onComplete:completeHandler2}); mySwf2.content.mask = MaskCloud_mc mySwf2.load(); function completeHandler2(event:LoaderEvent):void { TweenLite.to(event.target.content, 0,{alpha:0}); TweenMax.fromTo(event.target.content, 3, {x:0, y:0, width:1000, height:400, alpha:1}, {x:0, y:0, width:1000, height:400, alpha:1, delay:0}); } Regards.
  5. Thanks for the help. Now it is okay. There won't show any errors but still 2 problems are there. 1) The Home button (which is movie clip) not working. 2) In out put window I can see only "go forward" but no "go back" those are the trace statements. What could be the reason. The same code is there. No changes. Thanks.
  6. Hi, I am getting the following errors: 1) ReferenceError: Error #1056: Cannot create property ID on flash.display.SimpleButton. at Project_fla::MainTimeline/frame1(). 2) ReferenceError: Error #1069: Property ID not found on flash.display.SimpleButton and there is no default value. at Project_fla::MainTimeline/navClick() The following is the whole code: import com.greensock.*; import com.greensock.easing.*; import flash.events.MouseEvent; var targetSection:String; var currentSection:String; var section_clips = [Home_mc,EHS_mc]; for (var j:Number = 0; j < section_clips.length; j++) { section_clips[j].alpha = 0; } var tl:TimelineMax = new TimelineMax(); tl.timeScale = 1; tl.addLabel("HOME_in", tl.duration); tl.append(TweenMax.to(Home_mc, 0, {alpha:1, immediateRender:false, onStart:setSection, onStartParams:["HOME"]})); tl.appendMultiple(TweenMax.allFrom([Home_mc.HomePanel_mc, Home_mc.BillBoard_mc ], .8, {scaleX:0, scaleY:0, alpha:0, ease:Back.easeOut}, .4)); tl.addLabel("HOME_complete", tl.duration); tl.append(TweenMax.to(Home_mc, .5, {alpha:0, rotationX:80, y:250, x:"20"})); tl.addLabel("EHS_in", tl.duration); tl.append(TweenMax.to(EHS_mc, 0, {alpha:1, immediateRender:false, onStart:setSection, onStartParams:["EHS"]})); tl.append(TweenMax.from(EHS_mc.EHSPanel_mc, .5, {x:"100", alpha:0})); tl.append(TweenMax.from(EHS_mc.EHSFrame_mc, .5, {x:"-50", alpha:0}), -.25); tl.addLabel("EHS_complete", tl.duration); tl.append(TweenMax.to(EHS_mc, .5, {alpha:0, rotationY:90, x:450})); tl.addLabel("END_in", tl.duration); // **************************** ButtonsBar_mc.addEventListener(MouseEvent.CLICK, navClick); ButtonsBar_mc.Home_btn.ID = "HOME"; ButtonsBar_mc.EHS_btn.ID = "EHS"; function navClick(e:MouseEvent):void { targetSection = e.target.ID; if (targetSection != currentSection) { if (tl.getLabelAfter().indexOf("_in") != -1) { trace("go forward"); tl.tweenTo(tl.getLabelAfter(), {onComplete:introduceTargetSection}); } else { trace("go back"); tl.timeScale = 3; tl.tweenTo(currentSection + "_in", {onComplete:introduceTargetSection}); } } } function introduceTargetSection() { tl.timeScale = 1; tl.tweenFromTo(targetSection + "_in", targetSection + "_complete"); } function setSection(section) { currentSection = section; } //play through to home_complete automatically on first run tl.tweenTo("HOME_complete"); I tried my best to resolve it. But could not. Please help me out. Buttons Container name is : ButtonsBar_mc Buttons Names are: Home_btn & EHS_btn Thanks in advance.
  7. Hi, Thank you very much for your kind support. It works pretty nice now. Regards.
  8. HI, It is quite nice. But how to do waving text effect as in that website. Thanks for any help.
  9. Hi, It is working now. Actually I changed the navWelcome_mc and navHome_mc text field to Dynamic Text to embed the font. Now I have changed it to Static Text and it works. But I am getting another error. Please help me: go forward go forward go back Error: TimelineLite error: the null_in label was not found. at com.greensock::TimelineLite/parseTimeOrLabel() at com.greensock::TimelineMax/tweenTo() at Petro_TA2011_fla::MainTimeline/navClick() go forward go back Error: TimelineLite error: the null_in label was not found. at com.greensock::TimelineLite/parseTimeOrLabel() at com.greensock::TimelineMax/tweenTo() at Petro_TA2011_fla::MainTimeline/navClick() go forward go forward go forward go back Error: TimelineLite error: the null_in label was not found. at com.greensock::TimelineLite/parseTimeOrLabel() at com.greensock::TimelineMax/tweenTo() at Petro_TA2011_fla::MainTimeline/navClick() go forward
  10. Hi, Hi, Why I am getting the following error: Please help. Error #1069: Property ID not found on flash.text.TextField and there is no default value. tl.addLabel("welcome_in", tl.duration); tl.append(TweenMax.to(Welcome_mc, 0, {alpha:1, immediateRender:false, onStart:setSection, onStartParams:["welcome"]})); tl.addLabel("home_in", tl.duration); tl.append(TweenMax.to(Home_mc, 0, {alpha:1, immediateRender:false, onStart:setSection, onStartParams:["home"]})); nav_mc.navWelcome_mc.ID = "welcome"; nav_mc.navHome_mc.ID = "home"; I have downloaded the file and slightly modified it to suit my needs. But it throws an error. http://www.snorkl.tv/2011/04/bullet-pro ... rward-out/ Please help me to get it resolved.
  11. Hi, Thanks a lot for your kind reply. It works fine. Regards.
  12. Hi, Please correct the following. I am getting the Syntax error:1084: timeline.append(TweenMax.fromTo(box_mc, 2, {glowFilter:{color:0xCCCCCC, alpha:1, blurX:10, blurY:10, strength:10, quality:2} {x:150,y:50, delay:2}); Thanks.
  13. Hi, I have some (Eg. 10) Movie Clips on bottom of the Stage (aligned horizontally) with different sizes (different width & height). I want them to align vertically on middle of the stage with same gap (irrespective of their sizes) in between 2 Movie Clips. Is it possible using AS3 code? Please help. Thanks.
  14. Thanks a lot. It's working nicely. Regards.
  15. Hi, I am using external .SWF movie on stage by using the following code. I want to mask some of the portion of this movie. How can I mask an external movie? Code: var mySwf1:SWFLoader = new SWFLoader("Clock.swf", {width:200, height:200, x:-300, y:-300, container:this, onComplete:completeHandler1}); mySwf1.load(); function completeHandler1(event:LoaderEvent):void { TweenMax.fromTo(event.target.content, 3, {x:270, y:250, scaleX:.5, scaleY:.5, alpha:0}, {x:270, y:250, scaleX:2, scaleY:2, alpha:1, delay:3}); TweenLite.delayedCall(30, mySwf1.unload) I have entered the code on on Layer2 and created a mask (Circle shape) on Layer1 and selected the MASK option by right clicking on Layer1. But It did not work. How to resolve the problem? Please help.
  16. Hi, I have 2 movie clips (Clip1_mc & Clip2_mc). When Clip1_mc hits the Clip2_mc then Clip2_mc should move to (x:-200, y:-200). What is the code? Please. Thanks in advance.
  17. Hi, Now it draws a square with normal speed but I would like to customize the speed. How to add a parameter to control the speed of drawing? import com.greensock.*; import flash.events.MouseEvent; //create line var line:Shape = new Shape(); addChild(line); //position mc1 at first point mc1.x = p1.x; mc1.y = p1.y; var tl:TimelineMax = new TimelineMax({paused:true,onUpdate:drawLine}); tl.appendMultiple([ TweenLite.to(mc1, 1, {x:p2.x, y:p2.y}), TweenLite.to(mc1, 1, {x:p3.x, y:p3.y}), TweenLite.to(mc1, 1, {x:p4.x, y:p4.y}), TweenLite.to(mc1, 1, {x:p1.x, y:p1.y}) ], 0, TweenAlign.SEQUENCE); function drawLine():void { line.graphics.lineTo(mc1.x, mc1.y); } playTl(null); function playTl(e:MouseEvent):void /*Play_btn.addEventListener(MouseEvent.CLICK, playTl); function playTl(e:MouseEvent):void */ { //kill existing line line.graphics.clear(); //start new line at first point line.graphics.lineStyle(5, 0x660000, 1); line.graphics.moveTo(p1.x, p1.y); tl.restart(); } Thanks in advance for any help.
  18. Hi, I am using the following code to load an external SWF. I want to unload it after 15 seconds. How can I unload it? Please help me in this regard. var mySwf1:SWFLoader = new SWFLoader("Clock.swf", {width:200, height:200, x:-300, y:-300, container:this, onComplete:completeHandler1}); mySwf1.load(); function completeHandler1(event:LoaderEvent):void { TweenMax.fromTo(event.target.content, 3, {x:270, y:250, scaleX:.5, scaleY:.5, alpha:0}, {x:270, y:250, scaleX:2, scaleY:2, alpha:1, delay:3}); } Thanks.
  19. Hi, Thanks a lot for your kind and detailed reply. Regards.
  20. Hi, I got an image gallery .Fla file which is working fine (AS2). But when I copied the same frames to My Project which is in AS3, it throws error (Migration issue). How to modify it to AS3 so that it works with my project? The Code is: import gs.*; import gs.easing.*; ////////////////////////////////////////////////////////////////// // Load XML ////////////////////////////////////////////////////////////////// var xmlPath = "content.xml"; var photos_xml = new XML(); photos_xml.ignoreWhite = true; var imageList:Array = new Array(); photos_xml.onLoad = function(success) { if (success) { // ----------- load successful // ----------- convert XML content to an array imageList = photos_xml.firstChild.childNodes; // ----------- Do some action once xml is loaded loadImage(); // ----------- Do some action once xml is loaded } else { // ----------- problem loading, check path trace("Error loading photos_xml"); } }; ////////////////////////////////////////////////////////////////// // Load Images ////////////////////////////////////////////////////////////////// var currentImage:Number = 0; var imageLoader:MovieClipLoader = new MovieClipLoader(); var loadListener:Object = new Object(); imageLoader.addListener(loadListener); loadListener.onLoadInit = function(target_mc:MovieClip, httpStatus:Number):Void { TweenLite.to(shell_mc.background_mc, 0.25, {_width:target_mc._width + 20, _height:target_mc._height + 20, ease:Quad.easeOut}); TweenLite.to(shell_mc.border_mc, 0.25, {_width:target_mc._width, _height:target_mc._height, ease:Quad.easeOut}); TweenLite.to(shell_mc.mask_mc, 0.25, {_width:target_mc._width, _height:target_mc._height, ease:Quad.easeOut}); // center content var clipXTarg = Math.round((Stage.width/2)-((target_mc._width+20)/2)); var clipYTarg = Math.round((Stage.height/2)-((target_mc._height+20)/2)); TweenLite.to(shell_mc, 0.25, {_x:clipXTarg, _y:clipYTarg, ease:Quad.easeOut}); // find previous image if(currentImage == 0){ var prevImgNum = imageList.length -1; }else{ var prevImgNum = currentImage - 1; } var prevImg = shell_mc.pics_mc["pic"+prevImgNum]; TweenLite.to(prevImg, 0.25, {autoAlpha:0, onComplete:removePrevious}); } loadListener.onLoadComplete = function(target_mc:MovieClip):Void { TweenLite.to(target_mc, 0.25, {autoAlpha:100, delay:0.25}); setTimer(); } ////////////////////////////////////////////////////////////////// // Functions List ////////////////////////////////////////////////////////////////// function setTimer(){ timer = setInterval(loadImage, 5000); } function removePrevious(){ if(prevImg != undefined){ removeMovieClip(prevImg); } // increment the current image if(currentImage < imageList.length -1){ currentImage = currentImage + 1; }else{ currentImage = 0; } } function loadImage(){ var loadURL = imageList[currentImage].attributes.imgurl; var targetClip = shell_mc.pics_mc.createEmptyMovieClip("pic"+currentImage,shell_mc.pics_mc.getNextHighestDepth()); targetClip._alpha = 0; clearInterval(timer); // load the new image imageLoader.loadClip(loadURL,targetClip); } ////////////////////////////////////////////////////////////////// // On First Load ////////////////////////////////////////////////////////////////// photos_xml.load(xmlPath); stop(); Thanks for any help provided.
  21. Hi, Thank you so much for the correct code. Regards.
  22. Hi, I am using the following code. But the glow filters apply immediately. It doesn't delay for a while. Code: TweenMax.to(mc, 1, {glowFilter:{color:0xff0000, alpha:1, blurX:30, blurY:30, strength:1, quality:2, delay:10}}); Please help. Thanks.
×
×
  • Create New...