Flash Gallery | Flash Templates | Flash Menu | Flash Design | Flash Audio & Video

flash page flip

Actionscript 3.0 video tutorials

+ Reply to Thread
Page 3 of 7
FirstFirst 1 2 3 4 5 ... LastLast
Results 21 to 30 of 61

Thread: Images Scroller

  1. #21
    Junior Member Settled In PLUGGER is on a distinguished road
    Join Date
    Jan 2008
    Posts
    7
    Rep Power
    0

    Re: Images Scroller

    amazing Flash templates
    ok typical, when you ask for help, all of a sudden it comes to you


    it seems the images.xml file must be in the main dir that you have the php or html file in


    but thats anyways and i love this script, thank you

  2. #22
    Junior Member Settled In PLUGGER is on a distinguished road
    Join Date
    Jan 2008
    Posts
    7
    Rep Power
    0

    Re: Images Scroller

    ok a quick question for you

    the images (thumbnails) i want to use are small images 145x120

    now i need the popu to load a different image, because i want to add text to the bottom of the image

    so can you tell me how i can make it load thumbnails and how i can have it load the pop0.html as how i edit the pop0.html file

    if you understand me

    thumnails and main images need to be independant

  3. #23
    Junior Member Settled In PLUGGER is on a distinguished road
    Join Date
    Jan 2008
    Posts
    7
    Rep Power
    0

    Re: Images Scroller

    anyone got any ideas for the above question

    i would be gratefull if there is a solution to this

  4. #24
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,457
    Rep Power
    8

    Re: Images Scroller

    Hi

    Just change the images into the popups...
    isn't it ?

  5. #25
    Junior Member Settled In Barton68 is on a distinguished road
    Join Date
    Apr 2008
    Posts
    2
    Rep Power
    0

    Re: Images Scroller

    Hi,
    you've created some great components....
    Can the component be configured, XML or HTML, to automatically start scrolling? Also, anyway to switch off the mouse the mouse reverse direction and speed increase?
    Thanks again,
    Mark.

  6. #26
    Junior Member Settled In IrfanZaidi is on a distinguished road
    Join Date
    Jun 2008
    Posts
    1
    Rep Power
    0

    Re: Images Scroller

    Can you please tell me how to restrict popup. I want the links on images to open in the same window.
    This is really urgent, can anyone please help me to resolve this.

    Many Thanks

  7. #27
    Junior Member Settled In Lana is on a distinguished road
    Join Date
    Jun 2008
    Posts
    1
    Rep Power
    0

    Re: Images Scroller

    Hi! I love this scroller.....I have a question, how do you make it so that it starts scrolling itself? without having to rollover with the mouse.....

    thanks in advance!
    ~L~

  8. #28
    Junior Member Settled In maconbot is on a distinguished road
    Join Date
    Jan 2008
    Posts
    2
    Rep Power
    0

    Lightbulb Re: Added more features to Images Scroller

    Hi Flep,

    My first time contacting you. I must tell you, your work with utilities has been instrumental in taking me from novice to intermediate. So a big thank you!

    I have added some more features to the ImagesScoller, however I can't figure out a way to make the name of the XML file dynamic and how to link what XML file gets pulled to a combobox. Here is the link...
    main

    Long term, the combobox will be populated from an SQL database. And XML files, will be added with a certain naming convention created via a PHP script, which will also link SQL database names with XML file names and locations.

    The only code I have changed is in Main.as. My thought was I was going to have LoadingXML.as dynamically pull from a .txt file. And everytime a new "Item" was "selected" in the comboBox, flash would write URLvairables to that txt file, and then when LoadingXML was forced to UPDATE it would pull the myComboBox.selectedItem name , now stored in the txt file, and change what XML file it is opening.

    I have tried this in a couple different ways, I can see that the problem lies in REFRESHING the Arrays, if I knew how to load "LoadingXML.as" fresh everytime a comboBox Item was selected, I would be done. But I don't know how to removeChild so to speak the Arrays and finally how to call back up "loadImages()" and have it load LoadingXML fresh everytime. Where in LoadingXML I would place...

    Code:
     //Create the URLLOader instance
     var myLoader:URLLoader = new URLLoader()
     //the data will come as URL-encoded variables
     myLoader.dataFormat = URLLoaderDataFormat.VARIABLES
     //Load using an URLRequest, even beeing local
     myLoader.load(new URLRequest("refXML.txt"))
     //onLoad handler listener
     myLoader.addEventListener(Event.COMPLETE, onDataLoad)
     //Error handling 
     myLoader.addEventListener(IOErrorEvent.IO_ERROR, onIOError)
     myLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError)
     //Could be an error or just a message
     myLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus)    
     //add a listener for the complete event
     function onDataLoad(evt:Event){
      Title_txt.htmlText = evt.target.data.Title 
     }
     //error callbacks
     function onIOError(evt:IOErrorEvent){
      trace("IOError: "+evt.text)
     }
     function onHTTPStatus(evt:HTTPStatusEvent){
      trace("HTTPStatus: "+evt.status)
     }
     function onSecurityError(evt:SecurityErrorEvent){
      trace("SecurityError: "+evt.text)
     }
    stop()
    and do something like this to your LoadingXML.as code

    Code:
    private function loadXML():void
      {
       var loader:URLLoader=new URLLoader();
       loader.addEventListener(Event.COMPLETE,completeHandler);
     
       // Cambia l'url del file XML 
       var request:URLRequest=new URLRequest(evt.target.data.Title + ".xml");
       try
    etc..., etc...


    Finally, here is the modified Main.as
    Code:
    /*
     *************************************
     * Images Scroller
     * Flash CS3 Blog con Tutorial e risorse per Flash cs3 e Actionscript 3.0         
     * © Author: Filippo Lughi           
     * version 1.0                       
     *************************************
     */
    package
    {
     //Mix - Slider and TextInput, FlepStudio
     import flash.display.MovieClip;
     import flash.display.Sprite;
     import flash.display.Loader;
     import flash.text.TextField;
        import flash.text.TextFieldType;
        import flash.text.TextFieldAutoSize;
     //FlepStudio
        import flash.events.TextEvent;
     import flash.utils.Timer;
     import flash.events.TimerEvent;
     import flash.events.Event;
     import flash.events.MouseEvent;
     import flash.net.URLRequest;
     import flash.net.navigateToURL;
     import flash.system.Security;
     import fl.events.SliderEvent;
     //ComboBox
     import fl.controls.Button;
     import fl.controls.ComboBox;
     import fl.controls.List;
     
     public class Main extends MovieClip
     {
      public var file_xml:LoadingXML;
     
      public var objects_array:Array;
      public var pics_array:Array;
     
      public var container_mc:MovieClip;
      public var gal_ctnr_mc:MovieClip;
      public var gal_combo_ui:MovieClip;
     
      private var counter:int=0;
      private var ratio:Number;
      private var speed:int=1;
     
      private var boo:Boolean=true;
     
      private var inputTextField:TextField = new TextField();
      private var result:String = "";
      public var tim:Timer = new Timer(50);
      public var xInc:Number = 100;
     
      public function Main()
      {
       Security.LOCAL_TRUSTED;
       init();
       loadXML();
       configureListeners();
       TextEvent_TEXT_INPUT();
       galleryCombo();
      }
     
      private function init():void
      {
       stage.frameRate=31;
     
       objects_array=new Array();
       pics_array=new Array();
     
       container_mc=new MovieClip();
       addChild(container_mc);
       gal_ctnr_mc=new MovieClip();
       addChild(gal_ctnr_mc);
       gal_combo_ui=new MovieClip();
       addChild(gal_combo_ui);
      }
     
      private function loadXML():void
      {
       file_xml=new LoadingXML(this);
      }
     
      //ComboBox - Start
      private function galleryCombo():void
      {
       var myComboBox:ComboBox = new ComboBox();
       myComboBox.prompt = "Select an item";
       myComboBox.addItem({label:"images"});
       myComboBox.addItem({label:"Item B"});
       myComboBox.addItem({label:"Item C"});
       myComboBox.move(10, 10);
       myComboBox.addEventListener(Event.CHANGE, clickHandler);
       gal_combo_ui.addChild(myComboBox);
       var myList:List = new List();
       myList.rowCount = myList.length;
       myList.selectable = false;
       myList.move(myComboBox.x, myComboBox.y + myComboBox.height + 10);
       gal_combo_ui.addChild(myList);
     
       function clickHandler(event:Event):void 
       {
           if (myComboBox.selectedIndex > -1) 
        {
         configureListeners();
           }
       }
      }
      //ComboBox - End
     
      //Sliders and InputText - Start
      public function TextEvent_TEXT_INPUT() 
      {
       inputTextField.x = 800;
       inputTextField.y = 400;
       inputTextField.border = true;
       inputTextField.type = TextFieldType.INPUT;
       inputTextField.addEventListener(TextEvent.TEXT_INPUT, textInputHandler);
       this.addChild(inputTextField);
      }
     
      private function textInputHandler(event:TextEvent):void 
      {   
                var numExp:RegExp = /[0-9]/;
       event.preventDefault();  
                inputTextField.text = result;                
                inputTextField.setSelection(result.length + 1, result.length + 1);
     
                if (inputTextField.text.length == 1 || inputTextField.text.length == 2) 
       {
                    if(numExp.test(event.text) == true) 
        {
                        updateCombination(event.text);
                    } 
        else 
        {
                        sliderLabel.text = "input type numeric";
                    }
       }
       else
       {
        if(numExp.test(event.text) == true) 
        { 
                        updateCombination(event.text);
                    }
        else
        {
                        sliderLabel.text = "input type numeric";
                    }
                }
                if(inputTextField.text.length == 2)
       {
        posX();
        result="";
             }
      }
     
      private function posX():void
      {
       sliderLabel.text = "";
       gal_ctnr_mc.x = xInc + Number(inputTextField.text);
      }
     
      private function updateCombination(s:String):void 
      {
       sliderLabel.text = "";
       result += s;           
       inputTextField.text = result;
       inputTextField.setSelection(result.length + 1, result.length + 1);
            }
     
      private function configureListeners():void 
      {
                slider.addEventListener(SliderEvent.CHANGE, sliderChanged);
                slider.addEventListener(SliderEvent.THUMB_DRAG, sliderDrag);
      }
     
      private function sliderDrag(e:SliderEvent):void {
                trace("Slider dragging: " + e.target.value);
                inputTextField.text = e.target.value;
       posX();
            }
            private function sliderChanged(e:SliderEvent):void {
                inputTextField.text = e.target.value;    
            }
      //Sliders and InputText - End
     
      public function loadImages():void
      {
        var caricatore:Caricatore=new Caricatore(this,objects_array[counter].image,counter);
        counter++;
      }
     
      public function positionClips():void
      {
       removeChild(loading_txt);
       removeChild(info_txt);
     
    
       for(var i:int=0;i
        {
        if(i>0)
         pics_array[i].x=pics_array[i-1].x+pics_array[i-1].width;
        pics_array[i].visible=true;
       }
     
       ratio=-container_mc.width/stage.stageWidth;
     
       addListeners();
       addMouseListeners();
       moveContainer();
      }
     
      private function addListeners():void
      {
    
       for(var i:int=0;i
        {
        pics_array[i].addEventListener(MouseEvent.MOUSE_DOWN,openPopUp);
       }
      }
     
      private function addMouseListeners():void
      {
       stage.addEventListener(MouseEvent.MOUSE_MOVE,mouseIsMoving);
       stage.addEventListener(Event.MOUSE_LEAVE,mousehasGone);
      }
     
      private function mouseIsMoving(evt:MouseEvent):void
      {
       boo=true;
      }
     
      private function mousehasGone(evt:Event):void
      {
       boo=false;
      }
     
      private function moveContainer():void
      {
       container_mc.addEventListener(Event.ENTER_FRAME,moveMe);
      }
     
      private function moveMe(evt:Event):void
      {
       if(boo)
       {
        var arrX:Number=mouseX*ratio+stage.stageWidth/2;
        var dx:Number=arrX-evt.currentTarget.x;
        var ax:Number=dx*.1;
        evt.currentTarget.x+=ax;
        check(evt.currentTarget as MovieClip);
       }
       else
       {
        evt.currentTarget.x-=speed;
        check2(evt.currentTarget as MovieClip);
       }
      }
     
      private function check(m:MovieClip):void
      {
       if(m.x<-m.width+stage.stageWidth)
        m.x=-m.width+stage.stageWidth;
       else if(m.x>0)
        m.x=0;
      }
     
      private function check2(m:MovieClip):void
      {
       if(m.x<=-m.width+stage.stageWidth)
        speed*=-1;
       else if(m.x>=0)
        speed*=-1;
      }
     
      private function openPopUp(evt:MouseEvent):void
      {
       var logoLoader:Loader=new Loader();
       var galleryLoader:URLRequest=new URLRequest(objects_array[evt.currentTarget.id].pop);
       logoLoader.load(galleryLoader);
     
       var total:uint = gal_ctnr_mc.numChildren;
       if (total > 0)
       {
        gal_ctnr_mc.addChildAt(logoLoader,0);
        logoLoader.x = 0;
        logoLoader.y = 150;
        gal_ctnr_mc.removeChildAt(1);
       }
       else
       {
        gal_ctnr_mc.addChildAt(logoLoader,0);
        logoLoader.x = 0;
        logoLoader.y = 150;
       }
      }
     }
    }
    Please let me know if I have not provided enough information. If this project gets picked up, I would like to give you credit or donate or something. Let me know what you prefer.

    Thanks for your awesome work!
    -maconbot

  9. #29
    Junior Member Settled In maconbot is on a distinguished road
    Join Date
    Jan 2008
    Posts
    2
    Rep Power
    0

    Lightbulb Re: Images Scroller Document Class

    After progressing more I realized the best solution was to force myself to study your tutorial on how to load an external SWF that has it's own document class. It gets really mind bogging when you are not used to thinking "the right way" on how to organize ones classes. But like you say, step by step...I am getting it!

    Thanks again for all your work!
    -maconbot

    PS I attached the file. I've changed some of the properties and function names to terms that make sense to me in how I am understanding Flash.
    Attached Files

  10. #30
    Junior Member Settled In Eddette is on a distinguished road
    Join Date
    Sep 2008
    Posts
    1
    Rep Power
    0

    Re: Images Scroller

    Hi Flep,

    Thank you for this!

    I am having some problems getting this to work in my website. I am new to Flash CS3.

    I changed the scroller to show vertically, but for some reason the images do not want to load? What am I doing wrong?

    Have a look at what it does: http://almost-new.co.uk/main.html

    Please help!!
    Last edited by Onsitus; 18-09-08 at 11:51.

+ Reply to Thread
Page 3 of 7
FirstFirst 1 2 3 4 5 ... LastLast

Similar Threads

  1. Illusion - images gallery
    By Flep in forum FlepStudio utilities
    Replies: 37
    Last Post: 08-01-10, 23:05
  2. UIloader can't find images
    By cananot in forum Components
    Replies: 0
    Last Post: 28-11-09, 03:30
  3. Caricare images da xml
    By nocciola in forum Actionscript 3.0 avanzato
    Replies: 0
    Last Post: 12-04-09, 08:13
  4. Scroll Continuo Images Scroller
    By soteha in forum AIUTO utilitą free
    Replies: 14
    Last Post: 12-01-09, 13:02
  5. unload images
    By karonte in forum Actionscript 3.0 base
    Replies: 2
    Last Post: 14-05-08, 20:01

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Optimization by vBSEO