Jump to content
GreenSock

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

pizza0502

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

pizza0502's Achievements

3

Reputation

  1. Thanks @Sahil this is a very good demo for me to start! ?
  2. Hi, recently I stumbled upon this website and quite impressed with the elastic text effects when the mouse moves up and down. https://www.marie-morelle.com/ I wanna ask is there any example that teaches how to achieve this with mouse scrolling instead? Thanks!
  3. Tested @Rodrigo answer and it works well! Thanks Rodrigo! ? It's weird that I stumble upon multiple answers are told to use the solution like what I insert there...maybe they didn't test it out...
  4. Hi, I'm trying to use scrollTo in React. But I can't make the increment value to works with scrollTo... Here is the function that not working: handleClick = () => { let incrementNumber = 500 TweenMax.to('content', 0.5, { scrollTo: { x:'+='+incrementNumber } }); } Here is the function that can works if I just use a fixed number, but like this I can make the scrollTo increase 500px every time I click it: handleClick = () => { TweenMax.to('content', 0.5, { scrollTo: { x:500} }); }
  5. Hi, I've work around with loadermax that I've learn it this few days. I found a preloader file at here and i try to reuse it. but the preloader is not working, here is my code: stop(); import com.greensock.*; import com.greensock.loading.*; import com.greensock.loading.display.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.LoaderMax; import com.greensock.loading.SWFLoader; import flash.display.MovieClip; import flash.text.TextField; import flash.text.TextFieldAutoSize; import flash.text.TextFormat; var _tf:TextField; var _tfFormat:TextFormat; var _loadingBar:LoadingBar; function Loader2() { init(); } function init():void { _tfFormat = new TextFormat ; _tfFormat.font = "Arial"; _tfFormat.size = 15; _tfFormat.color = 0x000000; _tfFormat.bold = true; _tf = new TextField ; _tf.autoSize = TextFieldAutoSize.CENTER; _tf.text = "Loading Interface..."; _tf.setTextFormat(_tfFormat); addChild(_tf); _tf.x = (stage.stageWidth / 2) - (_tf.width / 2); _tf.y = (stage.stageHeight / 2) - (_tf.height / 2) ; _loadingBar = new LoadingBar ; addChild(_loadingBar); _loadingBar.x = (stage.stageWidth / 2) - (_loadingBar.width / 2); _loadingBar.y = (stage.stageHeight / 2) - (_loadingBar.height / 2) + 20; var queue:LoaderMax = new LoaderMax({name:"mainQueue",onProgress:progressHandler,onComplete:completeHandler,onError:errorHandler}); //append several loaders; queue.append( new SWFLoader("main.swf", {name:"contentClip", estimatedBytes:930000, container:this, visible:true, autoPlay:true}) ); //start loading; queue.load(); } function progressHandler(event:LoaderEvent):void { _loadingBar.loadingPerc.scaleX = Number(event.target.progress); trace("progress: " + event.target.progress); } function completeHandler(event:LoaderEvent):void { addChild(LoaderMax.getContent("main")); _tf.text = "SWF LOADED"; _tf.setTextFormat(_tfFormat); trace(event.target + " is complete!"); } function errorHandler(event:LoaderEvent):void { trace("error occured with " + event.target + ": " + event.text); } btw, the main.swf i loading is containing 2 more swf loaded from external. is it i need to put the code requireWithRoot at here or the main.swf or the subpage.swf?
×