FORUM

Horizontal 3D Cube Banner

Home / Forum / Components Discussions / Horizontal 3D Cube Banner

  • New tags added for component Horizontal 3D Cube Banner


    #  /  posted on Jan 29, 2011
  • Hi, I've done a website in dremaweaver, im having trouble adding the banner. in my html file I copied the script in, any ideas what im doing wrong please?

    thanks


    #  /  posted on Sep 10, 2011
  • Make sure you copy the swfobject too.

    If this isnt the problem email me and give me details please like a link or something because I cannot guess the problem. Thanks.


    #  /  posted on Sep 12, 2011
  • How can I add the cube within another file swf? with this code does not work:
    

    `package { import flash.display.; import flash.events.; import flash.filters.DropShadowFilter; import flash.net.URLRequest;

    dynamic public class home extends MovieClip 
    {       
        private var loader:Loader;  
        private var swf:String;
    
        public function home()
        {
                        addEventListener(Event.ADDED_TO_STAGE,init);            
        }
    
        private function init(evt:Event):void
        {
                        removeEventListener(Event.ADDED_TO_STAGE,init);         
    
            stage.frameRate=31;
    
            entra();            
        }
        private function entra():void
        {
            swf='component.swf';
            var request:URLRequest=new URLRequest(swf);
            loader=new Loader();
            loader.load(request);
            addChild(loader);           
        }   
    }
    

    }`


    #  /  posted on Nov 18, 2011
  • Hi, send me a mail from my ahouthor's page and I will try to help you.


    #  /  posted on Nov 18, 2011
  • I have a project consisting of a main page with a menu that loads another swf file using the document class. I would like to see the 3D cube inside one of these swf but it gives me the following error:

    INFO: Papervision3D 2.0.0 (March 12th, 2009)

    TypeError: Error #1009:Can not access a property or method of a null object reference. at firecode::Component/::LoadConfig() at firecode::Component$iinit()

    this is the code of main.as page:

    package { import flash.display.; import flash.events.; import flash.filters.DropShadowFilter; import flash.net.URLRequest; import caurina.transitions.Tweener;

    dynamic public class main extends MovieClip { private var loader:Loader; private var swf:String; private var sezioni_array:Array; private var bottoni_sezioni_array:Array; private var id:int=0; private var logo_mc:logo=new logo(); private var menu_mc:menu=new menu(); private var banda_mc:banda=new banda();

    public function main() { init(); }

    private function init():void { stage.frameRate=31;

    preload_mc.x=stage.stageWidth/2; preload_mc.y=stage.stageHeight/2; logo_mc.x=20; logo_mc.y=stage.stageHeight; banda_mc.width=stage.stageWidth; banda_mc.x==0; banda_mc.y=stage.stageHeight; banda_mc.alpha=0.9; menu_mc.x=logo_mc.width+100; menu_mc.y=stage.stageHeight-28;

    sezioni_array=new Array('home.swf','events.swf', 'club.swf', 'restaurant.swf', 'gallery.swf', 'video.swf', 'contact.swf', 'location.swf', 'sponsor.swf'); bottoni_sezioni_array=new Array(logo_mc,menu_mc.events_mc,menu_mc.club_mc,menu_mc.restaurant_mc, menu_mc.gallery_mc,menu_mc.video_mc,menu_mc.contact_mc,menu_mc.location_mc,menu_mc.sponsor_mc);

    entra(); aggiungiListenerMenu();

    checkResize(); } private function aggiungiListenerMenu():void { for(var i:int=0;i < bottoni_sezioni_array.length;i++) { bottoni_sezioni_array[i].id=i; bottoni_sezioni_array[i].addEventListener(MouseEvent.MOUSE_DOWN,cambiaSezione); bottoni_sezioni_array[i].addEventListener(MouseEvent.MOUSE_UP,premuto); } } private function entra():void { swf=sezioni_array[0]; var request:URLRequest=new URLRequest(swf); loader=new Loader(); initListeners(loader.contentLoaderInfo); loader.load(request); id=0; bottoni_sezioni_array[0].gotoAndStop(2); }

    private function cambiaSezione(m:MouseEvent):void { preload_mc.mask_mc.y=0; id=m.target.parent.id; loader.unload(); removeChild(loader); rimuoviListeners(loader.contentLoaderInfo); caricaSezione(m.target.parent.id+1); }

    private function caricaSezione(n:int):void { swf=sezioni_array[id]; var request:URLRequest=new URLRequest(swf); loader=new Loader(); initListeners(loader.contentLoaderInfo); loader.load(request); }

    private function initListeners(dispatcher:IEventDispatcher):void { dispatcher.addEventListener(Event.OPEN,inizia); dispatcher.addEventListener(ProgressEvent.PROGRESS,inCaricamento); dispatcher.addEventListener(Event.COMPLETE,completato); }

    private function rimuoviListeners(dispatcher:IEventDispatcher):void { dispatcher.removeEventListener(Event.OPEN,inizia); dispatcher.removeEventListener(ProgressEvent.PROGRESS,inCaricamento); dispatcher.removeEventListener(Event.COMPLETE,completato); }

    private function inizia(event:Event):void { preload_mc.visible=true; } private function inCaricamento(event:ProgressEvent):void { var n:uint=(event.bytesLoaded/event.bytesTotal)100; var spostamento:Number=-1.44; var percentuale:uint=(event.bytesLoaded/event.bytesTotal)100; spostamento=spostamento*percentuale; Tweener.addTween(preload_mc.mask_mc,{y:spostamento,time:0.2,delay:0,transition:"linear"}) preload_mc.text_preload.text=n.toString(); } private function completato(event:Event):void { addChild(loader); addChild(banda_mc); addChild(logo_mc); addChild(menu_mc);

    preload_mc.visible=false; } private function premuto(m:MouseEvent):void { for(var i:int=0;i < bottoni_sezioni_array.length;i++) { bottoni_sezioni_array[i].gotoAndStop(1); } id=m.target.parent.id; bottoni_sezioni_array[id].gotoAndStop(2); } private function checkResize():void { stage.addEventListener(Event.RESIZE, resizeStage); } private function resizeStage(event:Event):void { init2(); } private function init2():void { preload_mc.x=stage.stageWidth/2; preload_mc.y=stage.stageHeight/2; logo_mc.x=20; logo_mc.y=stage.stageHeight; banda_mc.width=stage.stageWidth; banda_mc.x==0; banda_mc.y=stage.stageHeight; menu_mc.x=logo_mc.width+100; menu_mc.y=stage.stageHeight-28;

    checkResize(); } } }

    and this is the code of the home.swf that loads the 3D cube:

    package { import flash.display.; import flash.events.; import flash.filters.DropShadowFilter; import flash.net.URLRequest; import caurina.transitions.Tweener;

    public class home extends MovieClip { private var loader:Loader; private var swf:String;

    public function home() { addEventListener(Event.ADDED_TO_STAGE,init); }

    private function init(evt:Event):void { removeEventListener(Event.ADDED_TO_STAGE,init);

    stage.frameRate=31;

    checkResize();

    entra(); } private function entra():void { swf='component.swf'; var request:URLRequest=new URLRequest(swf); loader=new Loader(); loader.load(request); addChild(loader); } private function checkResize():void { stage.addEventListener(Event.RESIZE, resizeStage); } private function resizeStage(event:Event):void { init2(); } private function init2():void { checkResize(); } } }

    Can you help me please? Thanks.


    #  /  posted on Nov 28, 2011

Please login to post replies.