• Content count

  • Joined

  • Last visited

Community Reputation

1 Newbie

About gsFan

  • Rank
  1. I see , well thank you very much for your help Carl. I think i will try another gallery.
  2. Thank you for taking your time to help me Carl . I tried the code and now it works. Now i have another problem, i need that the external gallery be called inside a movieclip . I made a rectangle in the cargaswf.fla and called it contenedor_mc but it dont work it just call the gallery but not inside contenedor_mc. This is my new code: package { import com.greensock.*; import com.greensock.loading.*; import; import com.greensock.loading.display.*; import flash.display.*; public class carga extends MovieClip { public var contenedor_mc:MovieClip; public function carga() { // constructor code var mySwf1:SWFLoader = new SWFLoader("preview.swf", {width:1024, height:750, onComplete:completeHandler}); mySwf1.load(); } public function completeHandler(e:LoaderEvent) { // constructor code contenedor_mc.addChild(; } } }
  3. Hi , i am trying to use loadermax to load a gallery i purchased via activeden site, my problem is that when i use loadermax to load my external swf gallery in my main swf it doesnt work but if i use the native as3 loader it works, what im doing wrong, can someone help me please? Here is the code of my both examples: LOADERMAX package { import com.greensock.*; import com.greensock.loading.*; import; import com.greensock.loading.display.*; import flash.display.*; public class carga extends MovieClip { public function carga() { // constructor code var mySwf1:SWFLoader = new SWFLoader("preview.swf", {width:1024, height:750, container:this}); mySwf1.load(); } } NATIVE AS3 LOADER import; import flash.display.Loader; import; import; function startLoad() { var mLoader:Loader = new Loader(); var mRequest:URLRequest = new URLRequest("preview.swf"); mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler); mLoader.load(mRequest); } function onCompleteHandler(loadEvent:Event) { addChild(loadEvent.currentTarget.content); } function onProgressHandler(mProgress:ProgressEvent) { var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal; trace(percent); } startLoad();
  4. Help Liquidstage menuNav

    Thank you Jack!, this code solved my problem lineas_arr = [ menuNav_mc.linea1, menuNav_mc.linea2, menuNav_mc.linea3, menuNav_mc.linea4, menuNav_mc.linea5]; for each(var lineas:MovieClip in lineas_arr) { var la:LiquidArea = LiquidArea.createAround(lineas, {scaleMode:ScaleMode.HEIGHT_ONLY, hAlign:AlignMode.LEFT, vAlign:AlignMode.TOP}); la.pinCorners(ls.TOP_LEFT, ls.BOTTOM_LEFT); } Greensock classes are great!
  5. Help Liquidstage menuNav

    I found an example and documentation about "pinpoint" but it seems to me that I still do not understand, I'm doing the example with one line. What I need is the line stretch to menuNav_mc when the stage resized. this is my code: var ls:LiquidStage = new LiquidStage(this.stage, 1024, 750, 1024, 750); //var pin:PinPoint = new PinPoint(0, 0, linea01_mc); //ls.attach(logo_mc, ls.TOP_LEFT, false, true, 0); ls.attach(linea01_mc, ls.TOP_LEFT, false, true, 0); ls.attach(menuNav_mc, ls.BOTTOM_LEFT, false, true, 0); ls.update(); //pin.attach(menuNav_mc);
  6. Help Liquidstage menuNav

    Hi Jack, the problem is that i have never used the pinpoint before, can you help me with an example or documentation plz?
  7. Hello, I hope someone can help me. Im using liquidstage to "pin" my DisplayObjects all good until I came across a problem with the navigation menu im working. I need the lines that are above the menuNav_mc (image01 attached file) stay at the TOP_LEFT (like image02 attached file) when the stage is resized but still the menuNav_mc buttons stay at the BOTTOM_LEFT. I have to mention that the lines are inside menuNav_mc This is the AS3 code of the example im making so far: var ls:LiquidStage = new LiquidStage(this.stage, 1024, 750, 1024, 750); ls.attach(logo_mc, ls.TOP_LEFT, false, true, 0); ls.attach(menuNav_mc, ls.BOTTOM_LEFT, false, true, 0); ls.update();
  8. Help with stack photo animation

    Sorry if it was confusing Carl , i will try to explain properly this time. My fla have 4 squares that are img1,img2,img3,img4 . imagine i add more squares lets say img5, img6. So for example if the output of trace( where: img3 img4 img2 img1 img6 img5 I need to do 2 things: 1. Each three images, (in this case the third one is img2), i need the first image (in this case img3) alpha = 0 , so i can see only img4 and img2 in stage, this is because if i add more squares i dont want to see all the equares stacked. Now that i have img4 and img2 in stage and img3 alpha= 0, the animation continues and img1 enters stage so now i need img4 alpha = 0 Animation continues and then img6 enters stage , now i need img2 alpha = 0 and then img 5 enters stage and img1 alpha = 0 . 2.- Ok now when the last image enters stage (in this case img5) , i need that img3 enters again and img6 alpha = 0 then img4 enters again and img5 alpha = 0, and so on ... so in fact the animation never ends ...
  9. Help with stack photo animation

    With the help of Carl i have resolved the problem i had with my images shuffle with its own handwriting text, but now im stuck with 1 more things i want to do, i hope someone can help me... 1.- When the third img of my shuffle enter stage, the first image of my shuffle alpha goes 0, and when the fourth img of my shuffle enter stage then the first img of my shuffle appears again with its animation falling and its own text and then the second img of my shuffle alpha goes 0 and so on indefinitely. I attached my file and here is my actual code : import com.greensock.*; import flash.display.MovieClip; var tl:TimelineMax = new TimelineMax({repeat:0}); //place photo and text in objects inside array. //when you shuffle array the photo and text stay together. var stackArray:Array = [ {img:img1, textbox:amor_mc , mascara:amorMask_mc, balls:143}, {img:img2, textbox:cariño_mc, mascara:cariñoMask_mc, balls:155}, {img:img3, textbox:familia_mc, mascara:familiaMask_mc, balls:164}, {img:img4, textbox:ternura_mc, mascara:ternuraMask_mc, balls:195} ] //trace(stackArray[0] img1 //trace(stackArray[0] // output red_txt //trace(stackArray[0] var len:Number = stackArray.length; var shuffled:Array = [len]; for(var i:int = 0; i { shuffled[i] = stackArray.splice(int(Math.random() * (len - i)), 1)[0]; // trace(shuffled[i]; var currentImg:MovieClip = shuffled[i].img; var currentTxt:MovieClip = shuffled[i].textbox; var currentMascara:MovieClip = shuffled[i].mascara; var currentBalls:Number = shuffled[i].balls; setChildIndex(DisplayObjectContainer(currentImg), numChildren - 1); var imgDur:Number = 5; tl.append(TweenMax.from(currentImg, imgDur, {y:-stage.stageHeight})); trace(tl.currentProgress); currentMascara.cacheAsBitmap=true; currentTxt.cacheAsBitmap=true; currentTxt.mask=currentMascara; // var textTl:TimelineMax=new TimelineMax({delay:imgDur*(i+1), repeat:0,repeatDelay:0,yoyo:false}); trace(imgDur*(i+1)); textTl.append(TweenMax.from(currentTxt, 0, {alpha:0, delay:0})); // var dtn:Number=.5; // for (var count:Number = 1; count <=currentBalls; count++) { // var clip:MovieClip=currentMascara["bola"+count]; textTl.append(TweenMax.from(clip, dtn, { alpha:0 } ), -.49); } textTl.append(, dtn, { alpha:0, delay:0 } )); textTl.append(, dtn, { alpha:0, delay:0 } )); }
  10. Help with stack photo animation

    I think I'm getting better with the help you gave me Carl, but now I'm stuck. When i run my swf inside flash to test it , only works the first image with its own animation text and then stops . i think the problem is with the little balls masks of the handwriting text effect... but im not sure. This is the code so far: import flash.display.*; import*; import flash.text.TextField; import com.greensock.*; import com.greensock.TweenMax; import com.greensock.easing.*; var stackArray:Array = [ {img:img1, texto:amor_mc, bolitas:amorMask_mc}, {img:img2, texto:cariño_mc, bolitas:cariñoMask_mc}, {img:img3, texto:familia_mc, bolitas:familiaMask_mc}, {img:img4, texto:ternura_mc, bolitas:ternuraMask_mc} ] var len:int = stackArray.length; var shuffled:Array = [len]; var tl:TimelineLite = new TimelineLite({}); for(var i:int = 0; i { shuffled[i] = stackArray.splice(int(Math.random() * (len - i)), 1)[0]; setChildIndex(DisplayObjectContainer(shuffled[i].img), numChildren - 1); var currentImg:MovieClip = shuffled[i].img; var currentTexto:MovieClip = shuffled[i].texto; var currentBolitas:MovieClip = shuffled[i].bolitas; var amor_dtn:Number=2.5; tl.append(TweenMax.from(currentImg, amor_dtn, { y: -3000, alpha:0, ease:Back.easeOut, easeParams:[.8]})); currentBolitas.cacheAsBitmap=true; currentTexto.cacheAsBitmap=true; currentTexto.mask=currentBolitas; var test_tl:TimelineMax=new TimelineMax({delay:amor_dtn*(i+1)}); test_tl.append(TweenMax.from(currentTexto, .5, {alpha:0, delay:1})); for (var count:Number = 1; count <= 900; count++) { var clip:MovieClip=currentBolitas["bola"+count]; test_tl.append(TweenMax.from(clip, .5, { alpha:0 } ), -.49); } //supposed to turn visible false currentTexto when handwriting animation ends //test_tl.append(, .5, { alpha:0 } ), -.49); //test_tl.append(, .5, { autoAlpha:0, delay:1.5 } )); }
  11. Help with stack photo animation

    Hi Carl , thanks for your reply. What i need is something like a stack photo animation. I have attached my file to see if it gives a better idea of what i need to do. The original file was the images falling with its own animation text all fine at that moment but then the client said, ok i like it but better i want the images in random order with its own animation text. If you see the file i have learned from your tutorials and used it to make the handwriting effect with little circle masks... You can make me any suggestions or change the code as you wish the only things i need to keep in animation is that the images need to fall in random order with its own handwriting animation text.
  12. Hi, im working in a intro animation for a website , it starts with an array of 10 images that falls in random order from certain Y pos and when a certain image fall for example img1_mc , a text appear on left side but text is another animation using masks, if img2 falls another text appear , if img3 appear another text and this until img10. To guide me im only doing this with the first image in my img Array that is img1 to be precise and the animation text is the amor_mc and amorMask_mc Im stuck in my code when i want to do this because the text animation appears at the beginning of the stack photo animation and not when the img1 appears... here is the code and the file: public class BienvenidaPage extends AbstractPage { //Variables Fotos public var img1:MovieClip; public var img2:MovieClip; public var img3:MovieClip; public var img4:MovieClip; public var img5:MovieClip; public var img6:MovieClip; public var img7:MovieClip; public var img8:MovieClip; public var img9:MovieClip; public var img10:MovieClip; //Variables Texto public var amor_mc:MovieClip; public var amorMask_mc:MovieClip; public var cariño_mc:MovieClip; public var cariñoMask_mc:MovieClip; public var familia_mc:MovieClip; public var familiaMask_mc:MovieClip; public var ternura_mc:MovieClip; public var ternuraMask_mc:MovieClip; public var stackArray:Array; public var len:int; public var shuffled:Array; // public var textosArray:Array; // public var tl:TimelineLite = new TimelineLite({}); public function BienvenidaPage() { super(); alpha = 0; stackArray = [img1, img2, img3, img4, img5, img6, img7, img8, img9, img10]; len = stackArray.length; shuffled = [len]; textosArray = [amor_mc, amorMask_mc, cariño_mc, cariñoMask_mc, familia_mc, familiaMask_mc, ternura_mc, ternuraMask_mc]; } override public function transitionIn():void { super.transitionIn();, 0.3, { alpha:1, onComplete:transitionInComplete } ); var ls:LiquidStage = new LiquidStage(this.stage, 1024, 750, 800, 600); for each (var fotos:DisplayObject in stackArray) { ls.attach(fotos, ls.CENTER); ls.update(); } for each (var textos:DisplayObject in textosArray) { ls.attach(textos, ls.LEFT_CENTER); ls.update(); } init(); } override public function transitionOut():void { super.transitionOut();, 0.3, {alpha:0, onComplete:transitionOutComplete}); } //FUNCTION INICIAL public function init ():void { for(var i:int = 0; i { shuffled[i] = stackArray.splice(int(Math.random() * (len - i)), 1)[0]; setChildIndex(DisplayObjectContainer(shuffled[i]), numChildren - 1); //trace(shuffled[i].name); ///////////////////////////////////////////////////////////////////////////////// ///////////PROBLEM HERE////////////////// if (shuffle[i] == img1) { //ANIMACION TEXTO AMOR amorMask_mc.cacheAsBitmap=true; amor_mc.cacheAsBitmap=true; amor_mc.mask=amorMask_mc; //create TimelineMax instance and set to repeat infinitely var amor_tl:TimelineMax=new TimelineMax({repeat:1,repeatDelay:1,yoyo:true}); amor_tl.append(TweenMax.from(amor_mc, 1, {alpha:0, delay:2})); //speed vars var amor_dtn:Number=.5; //loop through bar in bars clip and add tween to timeline for (var amorCount:Number = 1; amorCount <= 143; amorCount++) { //create reference to each individual clip var amorClip:MovieClip=amorMask_mc["bola"+amorCount]; amor_tl.append(TweenMax.from(amorClip, amor_dtn, { alpha:0 } ), -.49); } } } ////////////////////////////////////// var tl:TimelineMax = new TimelineMax ({}); tl.appendMultiple(TweenMax.allFrom(shuffled, 3, { y: -3000, alpha:0, ease:Back.easeOut, easeParams:[.8]}, 5)); }