This is a discussion on Flash Tips & Tricks within the Flash Actionscript Programming forums, part of the Web Development category; Hi, I have started this thread only for FLASH tips & tricks. Here I am going to give the tips ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, I have started this thread only for FLASH tips & tricks. Here I am going to give the tips and tricks in Flash. Here is the first one. When Working with MovieClip object, Donot use onPress, OnRelease event for the movieclip, if it is containing the button objects in it. Because if you enabled the onpress or on release event, then the button click will not be raised. thanks ![]()
__________________ Karpagarajan. R Necessity is the mother of invention |
| Sponsored Links |
| |||
| Flash Tip: Convert Lines to Fills Flash has the option to take any line/stroke that you’ve drawn and convert it to a fill instead, affecting its behavior and how various Flash drawing tools and their settings will operate on them. To do this, select the fill that you want to convert, and click Modify->Shape->Convert Lines to Fills. thanks ![]()
__________________ Karpagarajan. R Necessity is the mother of invention |
| |||
| Paint Bucket Tool The options for the Paint Bucket tool control just how "tolerant" the flood fills are. If you set it to Don't Close Gaps, then the Paint Bucket Tool will only work to fill completely enclosed areas of a shape (that is, shapes that are completely bounded by a line with no broken spaces). But if you set it to Close Small Gaps, it will ignore small breaks in the bounding lines to fill the enclosed area. Close Medium Gaps and Close Large Gaps will cause the Paint Bucket tool to ignore larger and larger spaces in the bounding lines to treat them as enclosed areas. thanks ![]()
__________________ Karpagarajan. R Necessity is the mother of invention |
| |||
| Working with text in FLASH tips Add a text into your flash document. Select your text and press Ctrl +b, which breaks the text into separate letters, you can move the letters around and make the text look strange if you want to. But if you want to edit your text even more select all of the letters and press Ctrl + b again. Now they are all shapes that you can freely edit. So have a play around and change how your text looks. Use the arrow tool and change the edges of the text. thanks
__________________ Karpagarajan. R Necessity is the mother of invention |
| |||
| Hi, Here I have given the short cut key for image open and scaling. To add a jpeg image to your flash document, press Ctrl+r. If you want to scale the selected image file, Press Ctrl+Alt+S, the scale window will be appeared. Give the scale value. thanks ![]()
__________________ Karpagarajan. R Necessity is the mother of invention |
| |||
| Scripting Filters Professional 8 includes a range of filters that allow you to add special effects to objects on the Stage. here I have given the list of filters: You can apply these filters in design time itself to the movie clip or any other objects.Bevel In action script, you can use like this... var theBevelFilter = new flash.filters.BevelFilter(); var theBlurFilter = new flash.filters.BlurFilter(); var theColorMatrixFilter = new flash.filters. ColorMatrixFilter(); var theConvolutionFilter = new flash.filters. ConvolutionFilter(); var theGlowFilter = new flash.filters.Glow- Filter(); var theGradientBevelFilter = new flash.filters. GradientBevelFilter(); thanks ![]()
__________________ Karpagarajan. R Necessity is the mother of invention |
| |||
| Here is the tips to find a string in a given string. In action script, there is no function available like "instr()" in VB. to find a string we need to write a function like ..
The above sample function will return a pos of the find string in the source string and if it is not found, then it will return -1. hope it will be useful for you. thanks ![]()
__________________ Karpagarajan. R Necessity is the mother of invention Last edited by Karpagarajan : 04-05-2007 at 08:46 AM. |
| |||
| Hi All, Here is the Code tips for creating the Tool tip in your flex application. class Tooltip {to implement the tooltip class in your application, please copy the below code var tt:Tooltip = new Tooltip(0xFFFFEC, 0x000000);Hope it will be very useful for you thanks ![]()
__________________ Karpagarajan. R Necessity is the mother of invention |
| |||
| Quote:
Hi Karpagarajan, its good, if we dont know the exact value for scaling, there is a another option for scalling an object (may be image or shape or a movieclip somthing) press q when your object is selected the sacling mode appear arround the the selected object (now you can scale or rotate as your wish) ![]()
__________________ Thanks -pesc- |
| |||
| Yeah that is there. Thanks posting the tips. And now Flash CS3 came. I will try to post new techniques in that. Keep on posting new techniques here. So that the people who wants to know flash tips, they can get it from one place instead of searching all over the web for a single tips. thanks ![]()
__________________ Karpagarajan. R Necessity is the mother of invention |
| |||
| Hey All, I have one tip for flash people who works with action script and the data comes from server programming or server side xml. The tip is, Use "mx.controls.Alert.show()" instead of using "getURL("javascript:alert('');")" why because, the getURL function sometime fails to make alert, it will lead you to make false programming. Thanks -kb |
| |||
| when we set number of text box or buttons or combo when we click tab it moves to next, for example if you have a clip in that order, tab does not work on the clip, for that you had to enable the tab to true. for example; clip1_mc.tabEnabled = true; then only tab works on the clip. |
| |||
| In actionscript if we copy an array like the below code. After that we changed any one array it will change that two arrays. See the code Code: var original:Array = [ 1, 2, 3 ]; var copy:Array = original; copy[0] = 100; trace( original[0] ); // 100 trace( copy[0] ); // 100 Code: var original:Array = [ 1, 2, 3 ]; var copy:Array = [].concat( original ); copy[0] = 100; trace( original[0] ); // 1 trace( copy[0] ); // 100 Thanks |
| |||
| This is the sample way to create a flash menu. HTML Code: import mx.controls.Menu;
import mx.controls.MenuBar;
import flash.net.FileReference;
var openListener:Object = new Object();
var fileRef:FileReference = new FileReference();
fileRef.addListener(openListener);
var my_mb:MenuBar;
var file_menu:Menu = my_mb.addMenu("File");
var edit_menu:Menu = my_mb.addMenu("Edit");
var view_menu:Menu = my_mb.addMenu("View");
var control_menu:Menu = my_mb.addMenu("Control");
var help_menu:Menu = my_mb.addMenu("Help");
file_menu.addMenuItem({label:"New Playlist", data:"Control+N", instanceName:"newInstance"});
file_menu.addMenuItem({label:"Open", instanceName:"openInstance"});
file_menu.addMenuItem({label:"Open URL", instanceName:"openUrlInstance"});
file_menu.addMenuItem({label:"Exit", instanceName:"exitInstance"});
view_menu.addMenuItem({label:"Full Screen", instanceName:"fullScreenInstance"});
view_menu.addMenuItem({label:"Half Size", instanceName:"halfSizeInstance"});
view_menu.addMenuItem({label:"Minimize", instanceName:"minimizeInstance"});
control_menu.addMenuItem({label:"Play", instanceName:"playInstance"});
control_menu.addMenuItem({label:"Pause", instanceName:"pauseInstance"});
control_menu.addMenuItem({label:"Next", instanceName:"nextInstance"});
control_menu.addMenuItem({label:"Previous", instanceName:"previousInstance"});
control_menu.addMenuItem({label:"Volume Up", instanceName:"volumeUpInstance"});
control_menu.addMenuItem({label:"Volume Down", instanceName:"volumeDownInstance"});
control_menu.addMenuItem({label:"Mute", instanceName:"muteInstance"});
help_menu.addMenuItem({label:" Help", instanceName:"helpInstance"});
help_menu.addMenuItem({label:"Shortcuts", instanceName:"keyBoardInstance"});
help_menu.addMenuItem({label:"About", instanceName:"aboutInstance"});
//Create listener object.
var mbListener:Object = new Object();
mbListener.change = function(evt_obj:Object)
{
var menuItem_obj:Object = evt_obj.menuItem;
switch (menuItem_obj.attributes.instanceName)
{
case "newInstance":
trace("New menu item");
break;
case "openInstance":
openFile();
trace("Open menu item");
break;
case "openUrlInstance":
trace("Open URL");
break;
case "exitInstance":
trace("Exit menu item");
fscommand("quit", "None");
break;
case "fullScreenInstance":
trace("fullScreenInstance");
fscommand("fullscreen", true);
break;
case "halfSizeInstance":
trace("halfSizeInstance");
fscommand("fullscreen", false);
break;
case "minimizeInstance":
trace("minimizeInstance");
break;
case "playInstance":
trace("playInstance");
break;
case "pauseInstance":
trace("pauseInstance");
break;
case "nextInstance":
trace("nextInstance");
break;
case "previousInstance":
trace("previousInstance");
break;
case "volumeUpInstance":
trace("volumeUpInstance");
break;
case "volumeDownInstance":
trace("volumeDownInstance");
break;
case "muteInstance":
trace("muteInstance");
break;
case "helpInstance":
trace("helpInstance");
break;
case "keyBoardInstance":
trace("keyBoardInstance");
break;
case "aboutPlayerInstance":
trace("aboutPlayerInstance");
break;
}
//trace(menuItem_obj);
};
//Add listener.
file_menu.addEventListener("change", mbListener);
view_menu.addEventListener("change", mbListener);
control_menu.addEventListener("change", mbListener);
help_menu.addEventListener("change", mbListener);
function openFile()
{
fileRef.browse();
openListener.onSelect = function(file1:FileReference):Void
{
trace("Opened " + file1.name);
};
}
__________________ S.Balasubramanian Nothing is impossible Last edited by Balasubramanian.S : 02-20-2008 at 01:04 AM. |
| |||
| This is a simple way to create a right Click menu onClipEvent(load) { //MENU.customItems.push(Functioned2); MENU = new ContextMenu(); MENU.hideBuiltInItems(); Functioned = new ContextMenuItem("This movie is copyrighted by Your Company Name", doSomething); Functioned2 = new ContextMenuItem("Visite Our Website", doSomething2); MENU.customItems.push(Functioned); MENU.customItems.push(Functioned2); _root.menu = MENU; function doSomething() { } function doSomething2() { getURL("http://www.Discussweb.com", _blank); } }
__________________ S.Balasubramanian Nothing is impossible |
| |||
| Hi, To Upload or Download a file using flash in web applications use "FileReference" class. The FileReference class provides a means to upload and download files between a user's computer and a server. An operating-system dialog box prompts the user to select a file to upload or a location for download. Each FileReference object refers to a single file on the user's hard disk and has properties that contain information about the file's size, type, name, creation date, modification date, and creator type (Macintosh only). FileReference instances are created in two ways: When you use the new operator with the FileReference constructor: var myFileReference = new FileReference(); When you call FileReferenceList.browse(), which creates an array of FileReference objects Thanks A.Ramesh |
| |||
| Keyboard Keys and Key Code Values: Letters A to Z and standard numbers 0 to 9: HTML Code: Letter or number key, Key code, ASCII key code
A 65 65
B 66 66
C 67 67
D 68 68
E 69 69
F 70 70
G 71 71
H 72 72
I 73 73
J 74 74
K 75 75
L 76 76
M 77 77
N 78 78
O 79 79
P 80 80
Q 81 81
R 82 82
S 83 83
T 84 84
U 85 85
V 86 86
W 87 87
X 88 88
Y 89 89
Z 90 90
0 48 48
1 49 49
2 50 50
3 51 51
4 52 52
5 53 53
6 54 54
7 55 55
8 56 56
9 57 57
a 65 97
b 66 98
c 67 99
d 68 100
e 69 101
f 70 102
g 71 103
h 72 104
i 73 105
j 74 106
k 75 107
l 76 108
m 77 109
n 78 110
o 79 111
p 80 112
q 81 113
r 82 114
s 83 115
t 84 116
u 85 117
v 86 118
w 87 119
x 88 120
y 89 121
z 90 122 Last edited by aramesh : 02-18-2008 at 02:31 AM. |
| |||
| How to download Flash object embeded in HTML Page? There are two ways to download the (.swf) file, 1. First we want to know the file name of .swf, we can get it by Right click the mouse View Source and Enter the key word .swf in find option. we can get the file name. Now, we can take this file from Temporary Internet Files folder in our system. While we visit or browse a site all file are stored in Temporary Internet Files, from this folder we can take all the files. 2. Second method is by using some swf catcher (like Sothink Swf Catcher) softwares we can download the file. By using these methods only ill download the Flash object. Regards A.Ramesh |