Pages

Showing posts with label Volume. Show all posts
Showing posts with label Volume. Show all posts

May 3, 2011

Adobe Flash CS3,CS4,CS5 (ActionScript 3.0 AS3) - Video/MovieClip/MC/Movie Clip - FLV/SWF - sound/audio volume decreasing or increasing or mute or reduce code. -- How to sound off in a flash movieclip as3


Adobe Flash CS3,CS4,CS5 (ActionScript 3.0 AS3) - Video/MovieClip/MC/Movie Clip - FLV/SWF - sound/audio volume decreasing or increasing or mute or reduce code.


Over the Internet, I had searched a lot and found few articles that suggested me to add soundclips as an external object and then control or reduce it(volume/sound) but what if  I have a video.swf or flv which contains sound/audio in my library or in the stage and I want to reduce or increase it's volume/sound.After , searching for 5 hours I was bored but finally found the solution  and now I want to share it with everyone.


So no more talk , just read the code and you will have the idea how to do it.


Code:
//Suppose I have a movieclip/mc/movie clip named 'video' which contains audio and video entity 
// we are writting as3/actionscript 3.0 coding , follow as below.


//Mute Volume/Sound
video.soundTransform = new SoundTransform(0);  //maybe it won't work in AS2/ActionScript 2.0...works in as3



//Full Volume/Sound
video.soundTransform  = new SoundTransform(1);  //maybe it won't work in AS2/ActionScript 2.0...works in as3


//Half Volume/Sound
video.soundTransform = new SoundTransform(.5);  //maybe it won't work in AS2/ActionScript 2.0...works in as3




SEO Tags:


Flash ,

Flash Sound off ,

Flash Sound Reduce from Original ,

Flash Sound Reduce in a movieclip ,

Flash AS3 Sound Reduce in a movieclip ,

Flash AS3 Sound Reduce in a movieclip ,

Flash AS3 Sound Mute in a movieclip ,

Flash AS3 Sound Mute in a flv file ,

Flash AS3 Sound Reduce in a movieclip ,

Flash AS3 Sound Reduce in a flv file ,

Flash AS3 Sound Reduce in a movie file ,

Flash AS3 Sound Sound off flv file ,

Flash AS3 Sound SoundOff in movieclip ,

Soundoff




Adobe Flash CS3,CS4,CS5 (ActionScript 3.0 AS3) - Send Data (SendData) to a URL or PHP or ASP Page as Post or Get Method Example

Adobe Flash CS3,CS4,CS5 (ActionScript 3.0 AS3) - Send Data (SendData) to a URL or PHP or ASP Page as Post or Get Method Example
by using this method we can send email to our clients.


Tested on Flash ActionScript 3.0(AS3) - 

function send_data_to_url():void
{
var url_var:URLVariables = new URLVariables();
url_var.email = "auk.junk@live.com";

 url_var.first_name      = "Alim";
 url_var.middle_name   = "Ul";
 url_var.last_name           = "Karim"; //Alim Blog
 url_var.blog             = "Blog";
 //add as much as you want.
 trace(url_var);

sendData("example.php",url_var); //or use asp page url

}

function sendData(url:String, _vars:URLVariables):void
{
var request:URLRequest = new URLRequest(url);
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
request.data = _vars;
request.method = URLRequestMethod.POST; //Set Get Method if you want
loader.addEventListener(Event.COMPLETE, handleComplete);
loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
loader.load(request);

}
function handleComplete(event:Event):void
{
var loader:URLLoader = URLLoader(event.target); // send request complete , you can do   what ever you want
}
function onIOError(event:IOErrorEvent):void
{
//a.text = "Error loading URL."; // print error in a textfield
}


Tags:

Flash ActionScript,

SendData,

to url,

ASP ,

PHP,AS3

Mar 10, 2011

Few Question & Answers About .Net Framework - Part 1

Explain the .Net Framework.

The .Net framework allows infrastructural services to all the applications developed in .net compliant language. It is an engine that provides runtime services using its component like Common Runtime Language. It consists of two main components such as Common Language Runtime and Framework Class Library.

Describe the .Net Framework Architecture. 

The .Net Framework has two main components:
.Net Framework Class Library: It provides common types such as data types and object types that can be shared by all .Net compliant language.

The Common language Runtime: It provides services like code execution, type safety, security, thread management, interoperability services.
 

What are the components of the .Net Framework?

Class Loader, Compiler, Garbage Collection, Type checker, Debug engine, Exception Manager, Security engine, Thread manager, COM Marshallar, Class Library.

Explain the role of assembly in the .Net Framework.

.Net Framework keeps executable code or DLL in the form of assembly. .Net Framework maintains multiple versions of the application in the system through assembly. The assemblies have MSIL code and manifest that contains metadata. The metadata contains version information of the assembly.

Describe the GAC in the .Net Framework. 

.Net Framework provides Global Assembly cache, a machine-wide cache. It stores shared assemblies that can be accessed by multiple languages.

Explain the Debug class methods.

a. Assert:This method checks for a condition. It displays a user message if the condition is false.
b. Write:used to write information which will be used by Trace Listeners.
c. WriteIf:Write information for Trace Listeners only if the condition is true.
d. WriteLine: same as write but, every time writes in a new line.
e. WriteLineIf:same as WriteIf but everytime writes in a new line.

Explain the methods of windows-based authentication

Anonymous authentication gives access to read-only areas of the Web site which do not need any username and password.

Basic Authentication It is done through IIS. This is based on the windows user accounts. When using Basic authentication, the browser lets the user to enter the username and password.
Digest authentication allows sending hash or digesting over the network rather than the plain text as in the case of basic authentication.
Integrated Windows authentication- It is based on users having Windows domain accounts. This type of authentication prevents from pasing the password across the network. It is considered to be the best authentication system over intranet.

What are the ways to optimize the performance of a windows application?

a. Knowing when to use StringBuilder
b. Comparing Non-Case-Sensitive Strings
c. Use string.Empty
d. Replace ArrayList with List<>
e. Use && and || operators
f. Smart Try-Catch
g. Replace Divisions
h. Code profiling
i. Use performance monitor to observe counters written in the application

Explain the key events in the lifecycle of the form.

a. Load: fired when form is first loaded in the application
b. Activated: fired whenever the form gets the focus i.e. when loaded first time, restored from the minimize state, whenever the form is brought in front.
c. Deactivated: fired whenever the form looses focus i.e. when form is closed, minimized, when it is in background.
d. Closing: Triggered when application wishes to be closed.
e. Closed: Triggered when application is closed.
f. Disposed: Used for garbage collection. 

Explain all the windows that help with your debugging.

Call stack: This window provides a description for the flow of application till the current line where the debugger is pointing to. It gives the page information, method name, arguments, line number etc.
Locals: This window provides access and information about all the local variables available at current line. One can see the values of all the local variables/values available at the current line.
Watch: This window has a list of variables that are of interest to the developer. The developer explicitly adds watch to the variables that he is interested in and they all are listed in this window for observation.
Immediate: Immediate window is like a live application paradigm. One can write code in this and see the values that are returned on the basis of current execution of the application. Breakpoints: This window lists all the lines of codes that have a breakpoint and the condition when it will be hit. It also gives the count representing the number of times that breakpoint has been hit.
Output: this window gives a description of assemblies and code that has been loaded by the runtime as the application is being executed.
Autos: This window lists all the available objects present in the current page.
Threads: Lists all the Worker threads along with their unique id, location, category, name priority and suspend status.
Modules: This window lists all the modules available as per the loaded assemblies under the available namespaces. It also tells if they are Optimized, user code, their symbol status, version, timestamp, the process under which they are running information along with the name of the assembly they are in.
Processes: Tells about the processes that are run from this application.

What is the default access modifier for the member? 

  VB.NET C#
Class variable Private Private
Class method Public Private
Structure variable Public Public
Structure method Public Private
  

What are code groups in .NET?

Code group is a logical grouping of code that follows some given conditions for membership. Code groups have some permission sets that are checked before to grant the membership of the code group.
 

Define Data Access Modifier. 

Access Modifiers or Access specifiers provide a class, a variable or a function with accessibility. It means that they govern who can access them.

What are the access modifiers available?    

Answer
There are five different access modifiers:
  • public: It specifies that it can be accessed by anyone.
  • private: Private declared variables, classes or functions can be accessed only by the member functions. No one from outside the class can access them.
  • protected: This access specifier is useful in a hierarchy wherein an access can be given only to the child classes.
  • internal: These limit an access only within an assembly. Its is similar to a friend function of C++.
  • protected internal: These limit the access within the assembly and to the child classes in the hierarchy  

What is strong-typing versus weak-typing? Which is preferred? Why?

In weak typing, it is allowed to define a block of memory as another type (casting).
Languages like C, C++ are weakly and statically typed.
Languages like Perl and PHP are weakly typed as you can add numbers to strings and they will implicitly coerce it.
Languages like Java, C# and Python are strongly typed. In these the type conversion needs to be explicitly handled.
For scripts we use weak typing.
In big programs, we use strong typing which can reduce errors at compile time.