Flash Image Gallery with XML

1.Create one XML file for loading the images & title in the xml

Eg

<gallery>

<image ptext=”Title1.1” main=”test.jpg” />

<image ptext=”Title1.2” main=”test1.jpg” />

<image ptext=”Title1.3” main=”test2.jpg” />

end </gallery>



save the name in xmlphoto.xml

2.Create the new flash file save the file as photogallery.
3.In flash file create the movie clip & give the instancename as loader_mc
4.Create the dynamic text field and give the instance name caption
5.create the new layer & named it actions paste the code

//create the xml object

myphoto – new XML();
myphoto.ignoreWhitespace = true;
myphoto.load(“xmlphoto.xml”);

//create array for photos,text to store separately
toa = new Array();
photo = new Array();
Ptext = new Array();
var nx:Number;

myphoto.onLoad = function(success)
{
toa = myphoto.firstChild.childNodes;
// trace(toa);
loader_mc._alpha=0
trace(loader_mc._alpha);
for(i=0;i
{
photo.push(toa[i].attributes.main);
//trace(photo);
ptext.push(toa[i].attributes.ptexts);
//trace(ptext);
}
fadeef();
loader_mc.loadMovie(photo[0]);
caption.text =ptext[0];
nx=0;
//nextImage();
//trace(“Loaded Success….”);
}

function fadeef()
{

this.onEnterFrame=function(){
if(loader_mc._alpha<=100){
//increase the opacity on each frame
loader_mc._alpha+=6;
trace(loader_mc._alpha);
}else{
//once the opacity reaches 100, delete the on enter frame function
delete loader_mc.onEnterFrame;
//loader_mc._alpha+=4;

}
}
}
//setProperty(loader_mc,_alpha,0);
next_btn.onPress= function()
{
loader_mc._alpha=0
//trace(“nextImage loaded”);
if(nx
0)
{
nx–;
fadeef()
loader_mc.loadMovie(photo[nx]);
caption.text =ptext[nx];
next_btn._visible=true;
}
else
{
prev_btn._visible= false;
}
}

Datagrid in Flex

1.Frisr we start to create new mxml project for flex.
2.name to save dataxml.mxml
3.Usign httpservice we retrive the data & send data to server.
4.for display the data we use datagrid to display the records
5.To display specific fields in datagrid we use the columns to specify the fields to display
6.In httpservice we include the result funciton to retrieve the data in xml
7.paste the code in mxml & run the file.
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”  backgroundColor=”#ffffff” layout=”vertical” initialize=”employeeService.send()” >

<mx:Script>
<![CDATA[
import mx.rpc.events.FaultEvent;
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;

// Variable to hold the results of the HTTPService call
[Bindable]
private var employeeData:ArrayCollection;

// result event handler for employeeService HTTPService call
private function resultHandler(event:ResultEvent):void {
employeeData = event.result.employees.employee;
trace(“Data load success”);
}

// fault event handler for employeeService HTTPService call
private function faultHandler(event:FaultEvent):void {
// Add code here for what to do when there is an error retrieving data
}

]]>
</mx:Script>

<mx:HTTPService id=”employeeService”
url=”data/employees.xml”
result=”resultHandler(event)”
fault=”faultHandler(event)”/>

<!– DataGrid displaying a subset of the data returned from the call to the server.–>
<mx:DataGrid dataProvider=”{employeeData}”
alternatingItemColors=”[#CCCCCC, #AAAAAA]”>
<mx:columns>
<mx:DataGridColumn dataField=”firstname”
headerText=”First Name” />
<mx:DataGridColumn dataField=”lastname”
headerText=”Last Name” />
<mx:DataGridColumn dataField=”title”
headerText=”Title”
width=”250″ />
<mx:DataGridColumn dataField=”department”
headerText=”department”
width=”250″ />
</mx:columns>
</mx:DataGrid>

</mx:Application>

Volume Slider bar in Flash

1.Create new fla file save it as volumeslider.fla

2,create 4 new layer in that file name as it actions buttion slider bar

3.select the bar & create one bar in the layer & convert into movieclip give the instance name as bar_mc

4.select the slider layer & create the slider ,convert into the movieclip give the instance name as slider_mc

5.In button layer create the play,stop buttons,give the instance name for the buttons as play_btn,stop_btn

6.Import the song into library give the identifier name as “test” & select the linkage checkbox in the properties.

7.Finaly select the action layer & paste this code for the volume

slider slider_mc.onPress = function() { this.startDrag(true,_root.bar_mc._x,_root.bar_mc._y,_root.bar_mc._x+335,_root.bar_mc._y); } in this 335 indicate as the width of thebar .

slider_mc.onRelease = slider_mc.onReleaseOutside= function() {

this.stopDrag();

}

play_btn.onRelease = function() {

mySound = new Sound();

mySound.attachSound(“test”);

mySound.start(0,50);

}

stop_btn.onRelease = function() { stopAllSounds(); }

slider_mc.onMouseMove =function() {

np = new Object();

np.x= this._x;

np.y= this._y;

_root.bar_mc.globalToLocal(np);

_root.mySound.setVolume(-1*np.x);

}

Dynamic Text Effects in Flash

Loading the text using text file.

1.First we create a text file with one variable.
for example
myVariable=<p class=’header’>Welcome to brianwiltshire.net</p><p>In this example i will illustrate how to load an external text file into flash and then style it with an external stylesheet. Yes that’s right CSS,  dynamic text and Flash</p>
<p class=’footer’><a href=’http://www.brianwiltshire.net’>Click here for more info.</a></p>

2.After that we create the css file for the class which we apply in the text file

p{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color:#999999;
}

.header{
font-size: 18px;
font-weight:bold;
color:#FF9933;
}

.footer{
font-family:Geneva, Arial, Helvetica, sans-serif;
text-align:right;
}

a{
color:#FF0000;
text-decoration:underline;
font-weight:bold;
font-size: 10px;
}

3.Create the dynamic text field in flash.give the instance name as myText_txt
4.Convert this text field into movieclip & give the instance name as text_mc.
5.Double click the movieclip,create the new layer named as actions:
paste this code for loading the css file into flash,one function called for loading the data from that text file
(name.txt) file.

var myStyle = new TextField.StyleSheet();
myStyle.load(“myStyle.css”);
myStyle.onLoad = function() {
myText_txt.styleSheet = myStyle;
};

textLoader();

function textLoader() {
myData = new LoadVars();
myData.onLoad = function() {
myText_txt.html = true;
myText_txt.htmlText = this.myVariable;
};
myData.load(“name.txt”);
}

6.Go to the mail clip & create the new layer and names it actions,paste the following code into that layer
this code for transaction effect with scripts,
First 2 lines are include the tween,easing transition effects from library.

import mx.transitions.Tween;
import mx.transitions.easing.*;

new Tween(text_mc, “_x”, Elastic.easeOut, Stage.width, 200, 3, true);

7. try this effect also for example only in same main actions layers to paste this code

var ball_tween:Tween = new Tween(text_mc, “_x”, Regular.easeIn, 0, 250, 3, true);
ball_tween.onMotionFinished = function() {
ball_tween.continueTo(200, 3);
};

8. Test the movie

Form submitting using flash

Form submitting using flash
1. First we create a three text fields like (Name,Email,Address),for address we choose the text area for multiple lines. Give the instance name for the text,text area fields (name1,email,address1)

2. Create new key frame on 10 lable it success & create 20 th key frame label it Error

3. On that keyframes give the success messagein 10th key frame & error message on 20th key frame

4. After that we add the button for submitting the form.(Create the button for submit & give the instance name as send_btn)

5. Create new layer name it Action script , in this layer create the loadvariable for sending the values to server(php,.Net.), retrieve the data in server
var sendLoad:LoadVars = new LoadVars(); // send the values to php
var recLoad:LoadVars = new LoadVars(); // retrieve the values

send_btn.onRelease = function() {
formSend();
}
function formSend() {
sendLoad.name1 = name1.text;
sendLoad.email = email.text;
sendLoad.message1 = message1.text;
sendLoad.sendAndLoad(“mail.php”,recLoad); }

Finally we create the php file to send mail For exp : In this sentOk is to send the message (mail send success or any error) And add this code in flash
recLoad.onLoad = function() {
if(this.sentOk) {
_root.gotoAndStop(“success”);
}
else {
_root.gotoAndStop(“erorr”); }
}
For checking success message or error message

13 Useful Free Online Video Converters

 

In the other hand, so projects that include video content may need to handle video files and convert it to different formats. Video editing tools are expensive to fill the needs for both sides. However, free video converting sites can handle this task easily and with simple few steps. The free online video converting sites allows you to convert video files to different extensions that is commonly recognized by video sharing sites such as FLV, MOV and AVI…etc. Also, some of these sites allows you to convert uploaded video content or video content from You Tube and download it to your pc after downloading it. Furthermore, you can integrate your video content with video sharing sites such as You Tube or even download video content from these sites easily as FLV Flash video format. Therefore, I find it useful to share this exclusive list of the free online video converting sites and sites that provide integrating your video content with different video sharing sites and social networks.

Flvto

 

With couple of clicks, FLVto free site provides you a simple way to convert video from URL or from your pc to  other video formats.

Online Video Converter

 

Online Video Converter does not just provide video conversion to your files, but also integrate your video content with different devices such as iPhone and iPod. Also, it gives you wide varietyf file extensions such as FLV, MPEG and MOV…etc.

Media Convert

Going beyond just converting your video file, Media Convert converts video files with giving you advanced setting to set different video options such as the quality, duration, dimensions and others.

Vixy

With Vixy, you can provide the URL of your video of the You Tube video and convert it with one click to different formats and download it.

Media Converter

Media Converter helps you to convert video content from your PC or URL to different formats.

You Convert It

Movavi

Zamzar

Zamzar provides you extra feature after converting video content, it lets you manage video files as well.

Demo Templates

Cellsea

Cellsea converts your video files free and easy and integrate it with video sharing sites such as You Tube and Metacafe.

Video Converter

Tubeminator

Tubeminator provides high intgeration with video sharing sites such as Vimeo and you converted video file from your PC or directly from URL.

All 2 Convert

Pop Up window within flash

1. Create button in flash.
2. paste the code for that button
on(release)
{
getURL(javascript:openNewWindow(‘somePage.html’,’thewin’,
‘height=100,width=250,toolbar=no,scrollbars=yes’);)
}
3. In Html page.,paste this code in HEAD section

<script>
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
</script>

4. Embeded your swf file in html page

CSS – Site Collection