Thursday, December 18, 2003
Create a text field dynamically:
this.createTextField("name", depth, X, Y, width, Height);
this.createTextField("tf_txt", 1, 50, 50, 360, 150);
Create format for the text field dynamically:
myTform = new textFormat(font, size, color, bold, italic, underline, url, target, align, leftMargin, rightMargin, indent, leading);
myTform = new textFormat("Verdana", 9, 0xff3300, null, true);
Or
myTform = new textFormat();
myTform.font ="Verdana";
myTform.size = 9;
myTform.color = 0xff3300;
| Post New Message
this.createTextField("name", depth, X, Y, width, Height);
this.createTextField("tf_txt", 1, 50, 50, 360, 150);
Create format for the text field dynamically:
myTform = new textFormat(font, size, color, bold, italic, underline, url, target, align, leftMargin, rightMargin, indent, leading);
myTform = new textFormat("Verdana", 9, 0xff3300, null, true);
Or
myTform = new textFormat();
myTform.font ="Verdana";
myTform.size = 9;
myTform.color = 0xff3300;
| Post New Message
Sunday, September 28, 2003
Create a new array:
nameofthearray = new Array();
Add a new item to the array:
nameofthearray[0]="value of the new item";
You can add the items in when you created the new array:
nameofthearray = new Array("item 1", "item 2", "item 3");
Access the length of an array:
nameofthearray.length
Adding a new iten to the end of the array:
nameofthearray[nameofthearray.length] = "value of the new item";
Loop through an array:
for (i in nameofthearray) {
trace(nameofthearray[i]);
}
The position of the mouse is _root._xmouse and _root._ymouse
hitTest will allow only one movie clip to list then to the mouse action at a time.
this.hitTest(_root._xmouse, _root.ymouse) {
}
| Post New Message
nameofthearray = new Array();
Add a new item to the array:
nameofthearray[0]="value of the new item";
You can add the items in when you created the new array:
nameofthearray = new Array("item 1", "item 2", "item 3");
Access the length of an array:
nameofthearray.length
Adding a new iten to the end of the array:
nameofthearray[nameofthearray.length] = "value of the new item";
Loop through an array:
for (i in nameofthearray) {
trace(nameofthearray[i]);
}
The position of the mouse is _root._xmouse and _root._ymouse
hitTest will allow only one movie clip to list then to the mouse action at a time.
this.hitTest(_root._xmouse, _root.ymouse) {
}
| Post New Message
Tuesday, September 23, 2003
Creating an Auto-Start CD using Flash :: Community MX
Creating an Auto-Start CD using Flash
By: Bill Horvath
I had a client once with no internet access. I know... I felt like starting up a charity in his name too. He wanted a website, but had no practical way to view it. I burned his website to a CD for him, but he had no understanding of how to open the index page on the CD. Using Notepad and Flash, I created a CD that would launch his browser window for him, and open up the index page so that all he had to do was navigate the website through his browser. But that's a whole other story. Sigh. The nice part of this method is that the user doesn't need Flash in order for the Flash executable to run.
You'll need the following tools to complete this project:
1. A text editing program (notepad, Word, etc.)
2. Flash
3. CD burning software
FYI: This solution will only work when the CD is loaded on a computer using Windows95 or greater.
Step One: Creating the .inf file
Open up any text editor that will allow you to save a .txt file, and type in the following:
[autorun]
open=startbrowser.exe
icon=favicon.ico
Save this as a text file, anywhere you like. Windows will look at the CD before deciding what to do with it. If it encounters [autorun], it will look for the next line, 'Open=" and will open the file indicated in that line, which in this case is 'startbrowser.exe', which we will explain later.
You could also use open=/FolderName/startbrowser.exe if the executable is going to be placed in a subdirectory on the cd.
The next line, 'icon=favicon.ico' is the icon that the user will see next to the drive letter representing their CD-Rom drive after inserting your CD into the drive. It can be your company logo, your client's company logo, or a happy face- whatever you like.
You could also use a .bmp file instead of .ico if you want to. Either way, set the size to 16 x 16 pixels. If you'd like to learn how to create an icon file, you can see Laurie Casolino's Kbase item here. If you do not include the icon= line, Windows will use it's own default CD-Rom icon. You can also name the icon anything you like. It doesn't have to be 'favicon'... It could be 'melvin'. But that would be odd.
Your .inf file is completed
| Post New Message
Creating an Auto-Start CD using Flash
By: Bill Horvath
I had a client once with no internet access. I know... I felt like starting up a charity in his name too. He wanted a website, but had no practical way to view it. I burned his website to a CD for him, but he had no understanding of how to open the index page on the CD. Using Notepad and Flash, I created a CD that would launch his browser window for him, and open up the index page so that all he had to do was navigate the website through his browser. But that's a whole other story. Sigh. The nice part of this method is that the user doesn't need Flash in order for the Flash executable to run.
You'll need the following tools to complete this project:
1. A text editing program (notepad, Word, etc.)
2. Flash
3. CD burning software
FYI: This solution will only work when the CD is loaded on a computer using Windows95 or greater.
Step One: Creating the .inf file
Open up any text editor that will allow you to save a .txt file, and type in the following:
[autorun]
open=startbrowser.exe
icon=favicon.ico
Save this as a text file, anywhere you like. Windows will look at the CD before deciding what to do with it. If it encounters [autorun], it will look for the next line, 'Open=" and will open the file indicated in that line, which in this case is 'startbrowser.exe', which we will explain later.
You could also use open=/FolderName/startbrowser.exe if the executable is going to be placed in a subdirectory on the cd.
The next line, 'icon=favicon.ico' is the icon that the user will see next to the drive letter representing their CD-Rom drive after inserting your CD into the drive. It can be your company logo, your client's company logo, or a happy face- whatever you like.
You could also use a .bmp file instead of .ico if you want to. Either way, set the size to 16 x 16 pixels. If you'd like to learn how to create an icon file, you can see Laurie Casolino's Kbase item here. If you do not include the icon= line, Windows will use it's own default CD-Rom icon. You can also name the icon anything you like. It doesn't have to be 'favicon'... It could be 'melvin'. But that would be odd.
Your .inf file is completed
| Post New Message
Monday, September 22, 2003
Macromedia ColdFusion MX MX - Using Macromedia Flash Remoting MX with Macromedia ColdFusion MX
| Post New Message
| Post New Message
Thursday, September 18, 2003
I'd start with something basic like this..
// Flash
this.lvSession = new LoadVars();
this.lvSession.onLoad = function( s )
{
if( s )
{
// Do something with your data
for( var i in this )
{
trace( i + " - " + this[i] );
}
}
else
{
// Throw exception
// Could not load data
// tell the user what happened
}
};
ASSetPropFlags( this.lvSession, ["onLoad"], 1, 1 );
this.lvSession.load( "getSession.cfm" );
// Cold Fusion
keys = StructKeyArray( Session );
for( i = 1; i lte ArrayLen( keys ); i = i + 1 )
{
writeOutput( "&" & keys[i] & "=" & Session[keys[i]] & "&" );
}
//
You may find remoting more flexible. You can just pass the entire session struct through it.
| Post New Message
// Flash
this.lvSession = new LoadVars();
this.lvSession.onLoad = function( s )
{
if( s )
{
// Do something with your data
for( var i in this )
{
trace( i + " - " + this[i] );
}
}
else
{
// Throw exception
// Could not load data
// tell the user what happened
}
};
ASSetPropFlags( this.lvSession, ["onLoad"], 1, 1 );
this.lvSession.load( "getSession.cfm" );
// Cold Fusion
keys = StructKeyArray( Session );
for( i = 1; i lte ArrayLen( keys ); i = i + 1 )
{
writeOutput( "&" & keys[i] & "=" & Session[keys[i]] & "&" );
}
//
You may find remoting more flexible. You can just pass the entire session struct through it.
| Post New Message
If I were I would pass the the username value to the swf file through a =
url parameter in the embed tag and then access it in flash directly by =
entering the name of the url variable. Like this:
codebase=3D"http://download.macromedia.com/pub/shockwave/cabs/flash/swfla=
sh.cab#version=3D6,0,29,0" width=3D"600" height=3D"350">
value=3D"yourfile.swf?username=3Dusername&whatever=3Dwhatever">
quality=3D"high" =
pluginspage=3D"http://www.macromedia.com/go/getflashplayer" =
type=3D"application/x-shockwave-flash" width=3D"600" =
height=3D"350">
Then, you'll access the url parameter in flash directly by the name of =
the url parameter.
| Post New Message
url parameter in the embed tag and then access it in flash directly by =
entering the name of the url variable. Like this:
codebase=3D"http://download.macromedia.com/pub/shockwave/cabs/flash/swfla=
sh.cab#version=3D6,0,29,0" width=3D"600" height=3D"350">
value=3D"yourfile.swf?username=3Dusername&whatever=3Dwhatever">
quality=3D"high" =
pluginspage=3D"http://www.macromedia.com/go/getflashplayer" =
type=3D"application/x-shockwave-flash" width=3D"600" =
height=3D"350">
Then, you'll access the url parameter in flash directly by the name of =
the url parameter.
| Post New Message
