Sunday, December 18, 2011

More Flash Inteview Questions

Q11. Can you read a remotely placed sound file? Where will you store the location of the sound file?
Ans: Yes, the server will store the location of the sound file, and will send it to the client whenever required.

Q12. How do you use Tweening?
Ans: Refer to the post: http://bashwithflash.blogspot.com/2011/01/tweening-part-i.html

Q13. How do you use drag and drop in action script?
Ans: The following piece of code starts the drag for myMC display object when mouse is clicked over it, and stops the drag when the mouse is released up.

    myMC.addEventListener(MouseEvent:CLICK, onMouseClick, false, 0 , true);
    myMC.addEventListener(MouseEvent:MOUSE_UP, onMouseClick, false, 0 , true);

    function onMouseClick(e:MouseEvent)
    {
        startDrag(this);
    }
   
    function onMouseUp(e:MouseEvent)
    {
        stopDrag();
    }

Q14. What is the use of preloader? How can you create one?
Ans: Refer to the post: http://bashwithflash.blogspot.com/2011/01/creating-your-own-flash-preloader.html

Q15. What are the different design patterns available in flash?
Ans: 

    1) Factory Method Pattern
    2) Singleton Pattern
    3) Decorator Pattern
    4) Adapter Pattern
    5) Command Pattern
    6) Observer Pattern
    7) Strategy Pattern
    8) Template Method Pattern
    9) State Pattern
    10) ModelViewController Pattern
    11) Symmetric Proxy Pattern
    12) Composite pattern
   

Q16. What is the purpose of bitmap caching?
Ans: Refer to the post: http://bashwithflash.blogspot.com/2010/12/when-does-it-make-sense-to-use-bitmap.html

Q17. Which ActionScript method should be used to bring a component from the library to the stage?
Ans: attachMovie

Q18. Describe Event Flow in flash.
Ans: The event flow is conceptually divided into three parts.
    1) Capture phase: This phase comprises all of the nodes from the Stage to the parent of the target node.
    2) Target phase: This phase consists solely of the target node.
    3) Bubbling phase: This phase comprises the nodes encountered on the return trip from the parent of the target node back to the Stage.

Q19. How do you create pop-up window in flash?
Ans: The following piece of code opens up a new window on the click of "myMC" display object.

    myMC.addEventListener(MouseEvent:CLICK, onMouseClick, false, 0 , true);

    function onMouseClick(e:MouseEvent):void {
            ExternalInterface.call("window.open", "http://bashwithflash.blogspot.com/", "win", "width=500,height=500");
        }

Q20. Explain the difference between Stream Sound and Event Sound.
Ans: Refer to the post: http://bashwithflash.blogspot.com/2010/12/sound-bound.html

No comments:

Post a Comment