Jump to content
Search Community

learner_7n

Members
  • Posts

    131
  • Joined

  • Last visited

Everything posted by learner_7n

  1. Hi, I am using the following code to tween my PortFolio_mc but now I want to add some more parameters to make the content in the center of the page when resizing. How can I modify the code? The following is the code I am using: TweenMax.fromTo(PortFolio_mc, 5, {x:980, y:410, alpha:.5}, {x:100, y:410, alpha:1, delay:3, ease:Strong.easeOut}); The following are the detail parameters which I would like to use in WIDTH & HEIGHT of above code: PortFolio_mc.x=stage.stageWidth/2-PortFolio_mc.width/2-180; PortFolio_mc.y=stage.stageHeight/2-PortFolio_mc.height/2; How can I? Please help.
  2. Hi, The following is the whole code that I have (There are several classes that I have imported assuming it might be required later): import com.greensock.*; import com.greensock.easing.*; 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; var mySwf:SWFLoader = new SWFLoader("SlideBar.swf", {width:300, height:100, container:this, onComplete:completeHandler}); mySwf.load(); function completeHandler(event:LoaderEvent):void { TweenMax.to(event.target.content, 1, {x:-10, y:530, repeat:-1, yoyo:true}); }
  3. I tried the suggested code. But getting the following error now: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Main/init() at Main()
  4. Thanks for your kind reply. Now, I am getting the following error: 1086: Syntax error: expecting semicolon before rightparen. Which highlights the below code: var mySwf:SWFLoader = new SWFLoader("SlideBar.swf", {width:300, height:100, container:this, onComplete:completeHandler})); Request for further help, please.
  5. Hi, Thanks for the reply. I have added the advised code. Now I am getting the following error: 1120: Access of undefined property queue. Further help, please.
  6. Hi, I have the following code to load a .SWF file from the same folder where my .FLA is. But getting the error. The Code is: import com.greensock.*; import com.greensock.easing.*; 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; LoaderMax.activate([imageLoader, SWFLoader, VideoLoader]); queue.append(new SWFLoader("SlideBar.swf", {width:300, height:100, container:this, onComplete:completeHandler}) ); function completeHandler(event:LoaderEvent):void { TweenMax.to(event.target.content, 1, {x:-10, y:530, repeat:-1, yoyo:true}); } And the following is the error: 1046: Type was not found or was not a compile-time constant: LoaderEvent. Warning: 3590: void used where a Boolean value was expected. The expression will be type coerced to Boolean. Warning: 3594: getTime is not a recognized method of the dynamic class Date. Please help.
  7. Hi, Will somebody help me with full code if possible? Thanks.
  8. Hi, How can I modify the following code to use the 3D Position (x & y) values instead of normal position x & y values? TweenMax.fromTo(Logo_mc, 8, {x:487.4, y:438.3, alpha:1}, {x:466.4, y:322.4, alpha:1, delay:2, ease:Strong.easeOut}); Please help. Thanks.
  9. Hi, How to play my video file NewsVideo_mc immediate after BillBoard_mc displayed on stage. The BillBoard_mc delay time set to 30 seconds. Please help me with code to play my movie clip after 30 seconds. Now it starts immediately. Note: The NewsVideo_mc is embeded with Video Clip Thanks.
  10. Thanks a lot. It is working fine. But Where this code is written on the demo fla file. I don't see any code on it. By the way, I have added that line of code in your demo "class" file. It was giving an error when I tried on my fla file actionscript. But without this line of code also your demo fla (with my vidoe file) was running well. Thanks.
  11. Hi, I am trying to load video file "Example.flv" in a new Flash CS4 AS3 document in place of "video.f4v" which was provided with the LoaderMax Example Files. I have copied the "progress_mc" file to my new document and accessing the video clip. I put all the required files/folders (deoms, com & assets folders) in a single folder. The video file also placed in the proper folder. But I am getting the folloiwng error: 1046: Type was not found or was not a compile-time constant: MovieClip. The same file is working great in the DEMO file................. 06_GetLoader_Video.fla Please help. Thanks.
  12. Hi, I am using the following code which is quite fine. I just want to add TweenMax fromTo properties (for x & y positions) to have some walking along effect. Now it is walking on one place. The following is the code I am using: queue.append(new SWFLoader("WalkingMan.swf", {WalingMan:"swf", x:-10, y:530, width:75, height:75, delay:5, repeat:-1, yoyo:true, container:this}) ); Thanks in advance for any help. Regards.
  13. Hi, I have tried the following code. But getting an error: var Example:TimelineMax = new TimelineMax({repeat:1}); Example.append{ TweenMaxfromTo(MC2, 10, {alpha:0.10,scaleX:1,scaleY:1},{alpha:0.80, scaleX:2, scaleY:2, delay:1, ease:Strong.easeOut})); Error: 1087: Syntax error: extra characters found after end of program. I removed one bracket at the end. But the error is same. Example.append{ TweenMaxfromTo(MC2, 10, {alpha:0.10,scaleX:1,scaleY:1},{alpha:0.80, scaleX:2, scaleY:2, delay:1, ease:Strong.easeOut}); Regards.
  14. Thank you very much for your help. It is working fine and much helpful for me. I am using the learning resources to understand it well. I just need your support for a couple of days to give my demo project a shape. If you won't mind, please let me know how can I unload or make invisible my external .SWF file after displaying it for a while (say, after 5 seconds)? Really sorry to bother you asking basic question. I am downloading several free fla files to understand it. Once again thanks for your kind help.
  15. Hi, Thanks a lot. It is working fine after removing the REPEAT parameter. Regards/
  16. Hi, Thanks for the reply. I have tried it as you suggested but the result is same. It still keeps on looping. Regards.
  17. Hi, The example code which I have downloaded is quite nice. But I would like to have some more options which can be more helpful for me. 1) x & y position values (for each object) to keep my objects wherever I want on stage. 2) width & height of my objects (for each object) to keep my objects as I like...Custom size. The following is the code: package demos { 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.Sprite; public class Parse_Array extends Sprite { public var progress_mc:MovieClip; public function Parse_Array() { //activate the loaders we need LoaderMax.activate([imageLoader, SWFLoader, VideoLoader]); var urls:Array = ["image.jpg", "video.f4v", "image.png", "avm2.swf"]; var queue:LoaderMax = LoaderMax.parse(urls, {maxConnections:1, onProgress:_progressHandler, onComplete:_queueCompleteHandler, onChildComplete:_childCompleteHandler}, {width:125, height:90, scaleMode:"stretch", y:150}); queue.prependURLs("assets/"); queue.load(); } private function _progressHandler(event:LoaderEvent):void { this.progress_mc.progressBar_mc.scaleX = event.target.progress; } private function _queueCompleteHandler(event:LoaderEvent):void { var contents:Array = event.target.content; var currentContent:ContentDisplay; for (var i:int = 0; i < contents.length; i++) { currentContent = contents[i]; addChild(currentContent); currentContent.x = i * 125 + 25; } } private function _childCompleteHandler(event:LoaderEvent):void { trace("child loaded: " + event.target + " inside queue: " + event.currentTarget); } } }
  18. Hi, I have to stop looping once it is done. But It is continuosly looping. The following is the code: How to modify it? stop(); import com.greensock.*; import com.greensock.easing.*; var TA:TimelineMax = new TimelineMax({repeat:-1}); TA.append( TweenMax.to(Logo, 2, {x:500, y:342.5, delay:0.5, ease:Strong.easeOut})); TA.append( TweenMax.to(Logo, 2, {x:-500, delay:6})); TA.append( TweenMax.to(Banner, 2, {rotation:0, delay:1, ease:Strong.easeOut})); TA.append( TweenMax.to(Banner, 2, {x:1000, delay:3, ease:Strong.easeOut})); Regards.
  19. Sorry. Instead of width & height I used scale. Now I tried the following which is working fine but still it looks like it got bold (Thick line). TweenMax.fromTo(Line2_mc, 20,{x:100,y:200,width:1,hight:1},{x:100, y:200, width:600, hieght:1, delay:1, ease:Strong.easeOut}); Thanks.
  20. I am using the following code to get a small line very long. But it makes both height & width of line bigger. I don't want my line to be more thick. Please advise. TweenMax.fromTo(Line2_mc, 20,{x:50,y:200,width:1,height:1},{x:100, y:200, width:600, height:1, delay:1, ease:Strong.easeOut}); Thanks.
  21. Thanks a lot for your kind reply. You are great. Regards.
  22. Report this postReply with quote Re: How to the backgrounds automatically with some delay? by greensock » Tue Dec 14, 2010 1:52 am learner_7n, for very general questions like that, I'd recommend a different forum, like the ones at kirupa.com or actionscript.org. This forum is specifically for questions related to GreenSock tools. greensock Site Admin Posts: 5802 Joined: Wed Jun 11, 2008 2:13 pm Location: Chicago Private messageWebsite Top -------------------------------------------------------------------------------- Edit postDelete postReport this postReply with quote Re: How to the backgrounds automatically with some delay? by learner_7n » Tue Dec 14, 2010 8:10 am Hi, Noted with thanks. I will take care next time asking such questions. Thanks. -------------------------------------------------------------------------------------------------------------------------------------------------- by learner_7n » Tue Dec 14, 2010 7:33 am Hi, I am looking for the alternate code to the following one: var K:Loader=new Loader(); addChild(K); K.load(new URLRequest("clock.swf")); K.x = 160; K.y = 200; K.contentLoaderInfo.addEventListener(Event.INIT, growLoader); function growLoader(evt:Event):void { K.width = 130; K.height = 130; } Thanks in advance for any help. Regards.learner_7n Posts: 58 Joined: Fri Nov 19, 2010 9:55 am Private message Top -------------------------------------------------------------------------------- Report this postReply with quote Re: What is the alternate code, please? by greensock » Tue Dec 14, 2010 11:50 am "alternate code"? Why? What problem are you running into? (and incidentally, why are you posting questions about Adobe's Loader in the GreenSock forums, especially in the tweening category?) I've given you a few polite warnings already, but if you continue to post vague, generic things like this in the GreenSock forums (especially things that aren't related to any GreenSock tools) I'll have to suspend your account. I think I speak for everyone here when I say that we're happy to answer questions and help fellow GreenSock users out, but most of your 58 posts have either been incredibly generic or unrelated to GreenSock tools or it seemed like you were just wanting us to write your code for you without you putting any effort into attempting solutions yourself. We take every post seriously here and it takes time to read through them and put together a relevant, succinct response to each one. Please have the courtesy to make your posts clear, detailed, and relevant to this particular forum. Show us what you've tried and explain exactly what problem you're running into so that we can give you pertinent answers. -------------------------------------------------------------------------------------------------------------------------------------------------- by learner_7n » Tue Dec 14, 2010 8:07 am Hi, The following code is nice but with only movie clips. How can I do the same trick with external .SWF files? http://var MyLogoTween:Tween=new Tween(MyLogo_mc, "y", Strong.easeOut, -200 , 260, 3, true); Thanks.learner_7n Posts: 58 Joined: Fri Nov 19, 2010 9:55 am Private message Top -------------------------------------------------------------------------------- Report this postReply with quote Re: How to do some animation with external .SWF files? by greensock » Tue Dec 14, 2010 11:35 am Are you kidding? I couldn't quite tell if this was a joke. Are you really using Adobe's Tween class and posting questions about how to use it in the GreenSock forums? For the record, you'd need to load your external swf first using something like LoaderMax's SWFLoader or Adobe's Loader class, wait for it to load (listen for its COMPLETE event), add it to the stage with addChild() and then tween it. --------------------------------------------------------------------------------------------------------------------------------------------------- I am extremely sorry for sending the questions not related to tweening. I have replied in my post at 8:10am that I will not post the un-related questions. But I have been warned for earlier questions ...post at 7:00am & 8:07 am. I have not repeated any mistake after my promise. Anyway, thanks for all the answers which made my work moving. Being a learner I was asking for some instant help with code to use in other example projects changing/modifying some effects. Anyway you are great, you are my teacher. Once again, I am very sorry as I hurt your feelings. Thanks and best regards.
  23. Hi, Noted with thanks. I will take care next time asking such questions. Thanks.
  24. Hi, The following code is nice but with only movie clips. How can I do the same trick with external .SWF files? http://var MyLogoTween:Tween=new Tween(MyLogo_mc, "y", Strong.easeOut, -200 , 260, 3, true); Thanks.
×
×
  • Create New...