_Brunoo_ 0 Denunciar post Postado Julho 16, 2010 bom , tenho esse codigo abaixo tudo funcionante , mas tenho que aumentar a altura das imagens e nao estou conseguindo .. // Tweener // http://code.google.com/p/tweener/ import caurina.transitions.Tweener; slider_info.text = "carregando..."; link_title.text = ""; link_description.text = ""; var folder:String = "thumbnails/"; var start_from:Number = 0; var no_of_tn:Number = 5; var i:Number; var tn:Number = 0; var current_no:Number = 0; var tween_duration:Number = 0.8; // seconds var total:Number; var flashmo_xml:XML; var flashmo_tn_list = new Array(); var thumbnail_group:MovieClip = new MovieClip(); this.addChild(thumbnail_group); thumbnail_group.mask = slider_mask; function load_gallery(xml_file:String):void { var xml_loader:URLLoader = new URLLoader(); xml_loader.load( new URLRequest( xml_file ) ); xml_loader.addEventListener(Event.COMPLETE, create_thunbnail_slider); } function create_thunbnail_slider(e:Event):void { flashmo_xml = new XML(e.target.data); total = flashmo_xml.thumbnail.length(); for( i = 0; i < total; i++ ) { flashmo_tn_list.push( { filename: flashmo_xml.thumbnail[i].filename.toString(), title: flashmo_xml.thumbnail[i].title.toString(), description: flashmo_xml.thumbnail[i].description.toString(), url: flashmo_xml.thumbnail[i].url.toString(), target: flashmo_xml.thumbnail[i].target.toString() } ); } load_tn(); } function load_tn():void { var pic_request:URLRequest = new URLRequest( folder + flashmo_tn_list[tn].filename ); var pic_loader:Loader = new Loader(); pic_loader.load(pic_request); pic_loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, tn_progress); pic_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, tn_loaded); tn++; } function tn_progress(e:ProgressEvent):void { slider_info.text = "carregando... " + tn + " de " + total; } function tn_loaded(e:Event):void { if( tn < total ) load_tn(); else slider_info.text = ""; var flashmo_tn_bm:Bitmap = new Bitmap(); var flashmo_tn_mc:MovieClip = new MovieClip(); flashmo_tn_bm = Bitmap(e.target.content); flashmo_tn_bm.smoothing = true; flashmo_tn_mc.addChild(flashmo_tn_bm); flashmo_tn_mc.name = "flashmo_tn_" + thumbnail_group.numChildren; flashmo_tn_mc.buttonMode = true; flashmo_tn_mc.addEventListener( MouseEvent.MOUSE_OVER, tn_over ); flashmo_tn_mc.addEventListener( MouseEvent.MOUSE_OUT, tn_out ); flashmo_tn_mc.addEventListener( MouseEvent.CLICK, tn_click ); flashmo_tn_mc.x = thumbnail_group.numChildren * 150; thumbnail_group.addChild( flashmo_tn_mc ); } function tn_over(e:MouseEvent):void { var mc:MovieClip = MovieClip(e.target); current_no = parseInt(mc.name.slice(11,13)); Tweener.addTween( mc, { alpha: 0.5, time: tween_duration, transition: "easeIn" } ); link_title.text = flashmo_tn_list[current_no].title; link_description.text = flashmo_tn_list[current_no].description; } function tn_out(e:MouseEvent):void { var mc:MovieClip = MovieClip(e.target); current_no = parseInt(mc.name.slice(11,13)); Tweener.addTween( mc, { alpha: 1, time: tween_duration, transition: "easeOut" } ); link_title.text = ""; link_description.text = ""; } function tn_click(e:MouseEvent):void { var mc:MovieClip = MovieClip(e.target); current_no = parseInt(mc.name.slice(11,13)); navigateToURL( new URLRequest( flashmo_tn_list[current_no].url ), flashmo_tn_list[current_no].target ); } function move_slider():void { if( total - start_from < no_of_tn ) start_from = total - no_of_tn; if( start_from < 0 ) start_from = 0; Tweener.addTween( thumbnail_group, { x: - start_from * 250, time: tween_duration, transition: "easeInOutQuart" } ); } flashmo_previous.addEventListener( MouseEvent.CLICK, move_left ); flashmo_next.addEventListener( MouseEvent.CLICK, move_right ); function move_left(e:MouseEvent):void { start_from -= no_of_tn; move_slider(); } function move_right(e:MouseEvent):void { start_from += no_of_tn; move_slider(); } Compartilhar este post Link para o post Compartilhar em outros sites
Thiago de Oliveira Cruz 21 Denunciar post Postado Julho 16, 2010 Adicione um listener ao INIT do MC pic_loader.contentLoaderInfo.addEventListener(Event.INIT, tn_init); E ai faça sua função de resize. Abraços Compartilhar este post Link para o post Compartilhar em outros sites
_Brunoo_ 0 Denunciar post Postado Julho 16, 2010 não entendi... onde tenho que inserir isso?? e como faço a função de resize?? desculpa a ignorancia mas não tenho experienza com AS3 Compartilhar este post Link para o post Compartilhar em outros sites
Thiago de Oliveira Cruz 21 Denunciar post Postado Julho 16, 2010 E fez esse código até ai como -.- pic_loader.contentLoaderInfo.addEventListener(Event.INIT, tn_init); function tn_init(e:Event):void{ // Crie seu resize aqui! } Abraços Compartilhar este post Link para o post Compartilhar em outros sites
Elektra 102 Denunciar post Postado Julho 18, 2010 E fez esse código até ai como -.- pic_loader.contentLoaderInfo.addEventListener(Event.INIT, tn_init);function tn_init(e:Event):void{ // Crie seu resize aqui!}Abraços @ berseck --> Template do flashmo.com Compartilhar este post Link para o post Compartilhar em outros sites
Rafael Swerts 0 Denunciar post Postado Julho 18, 2010 Complicado né?! Nego copia o código e iventa que o fez, e depois quer trabalhar em cima, sem saber nem o que é uma função. f***.! Compartilhar este post Link para o post Compartilhar em outros sites
_Brunoo_ 0 Denunciar post Postado Agosto 6, 2010 Complicado né?! Nego copia o código e iventa que o fez, e depois quer trabalhar em cima, sem saber nem o que é uma função. f***.! NUnca disse que fui eu que fiz , nao mexo com as3 Compartilhar este post Link para o post Compartilhar em outros sites
Elektra 102 Denunciar post Postado Agosto 7, 2010 Se não conhece AS3 não pode funcionar mesmo, nem mesmo a solicitação para que alguém faça o serviço pra você. Melhor procurar outro template grátis com tudo pronto, ou contratar alguém e pagar por isso. A finalidade do fórum é auxiliar, não dar pronto de mão beijada! ps: quando tentamos auxiliar honestamente outros colegas do fórum em alguma área ao nosso alcance, por mínimo que seja nosso conhecimento (mesmo errando), conquistamos o interesse para a solução de nossas necessidades. Fica a sugestão. Abs Compartilhar este post Link para o post Compartilhar em outros sites
_Brunoo_ 0 Denunciar post Postado Agosto 9, 2010 Se não conhece AS3 não pode funcionar mesmo, nem mesmo a solicitação para que alguém faça o serviço pra você. Melhor procurar outro template grátis com tudo pronto, ou contratar alguém e pagar por isso. A finalidade do fórum é auxiliar, não dar pronto de mão beijada! ps: quando tentamos auxiliar honestamente outros colegas do fórum em alguma área ao nosso alcance, por mínimo que seja nosso conhecimento (mesmo errando), conquistamos o interesse para a solução de nossas necessidades. Fica a sugestão. Abs Que Deus te abençoe Compartilhar este post Link para o post Compartilhar em outros sites