PDA

View Full Version : String


Sanko
04-26-2003, 04:23 PM
Need help validating a input box in the zip file you find the fla, and a little program that explains my problem

CyanBlue
04-26-2003, 11:30 PM
Howdy and Welcome... ;)

Are you looking for the solution to the number 3???3) if i already insert a character in the textbox i cant insert two or more
blanks spaces, example "Macromedia Flash"; there is four blank spaces
before the word Macromedia, and it shoul be "Macromedia Flash"Now, I need some clarifications... You have "Macromedia Flash" in the text field, and you want to eleminate multiple spaces??? I can type multiple spaces in the Flash movie, but I am limited to two spaces in the VB text field...
And that 'before' that I have in bold should be after, right???

Need some more information... ;)

Sanko
04-27-2003, 03:08 AM
First Thanks to view my post. ::cool::

I want to restrict the flash input box to no more of two blank spaces consecutives, actually i want to simulate the validation of the VB textbox in flash.

And yes that before must be an After sorry
:eek:

If you know VB i have the function that validates the textbox for view and try to make it for Flash

CyanBlue
04-27-2003, 09:20 AM
Howdy...

This seems to be working... Check it out and let me know... ;)String.prototype.flUpperCase = function()
{
var words = this.split(" ");
var i = words.length;
while (i--)
{
words[i] = words[i].substr(0, 1).toUpperCase() + words[i].substr(1);
}
return words.join(" ");
};
S.onChanged = function()
{
if (S.text.length == 1)
{
if (key.getAscii() == 32)
{
S.text = "";
break;
}
}
if (Key.getAscii() == 32)
{
Acu++;
trace("Space... " + Acu);
if (Acu > 1)
{
// here goes the validation to disable a new
// blank space
// S.restrict = chr(32); not work
S.text = S.text.substr(0, Selection.getCaretIndex() - 1) + S.text.substr(Selection.getCaretIndex());
}
}
else
{
Acu = 0;
R = S.text.flUpperCase();
S.text = R;
}
};

Sanko
04-27-2003, 11:59 AM
Amazing!!!


Very, very, very Thanks CyanBlue the actionscript works

perfectly :)

CyanBlue
04-27-2003, 12:21 PM
Glad to be of your service... ;)

I gotta thank you for letting me know that I can put Flash movie into the VB application... I guess VB works as some sort of wrapper for the Flash movie??? How hard is it to do that??? I know that this can be done easily with third party projector tools in Flash, but I gotta ask if this can be done with this sort of setting as well... I want to know if Flash can send some string to the VB wrapper and have VB save a text file in the same directory where the VB wrapper resides??? Also, it won't be crossplatform if I do that with VB, right??? ;)

Thank you...

Sanko
04-27-2003, 01:00 PM
Yes you can use Flash in VB and it works like an backend program so you can create internet and client/server, desktop apps.

For example if you use Dreamweaver and Flash to make a Flash Chat project in Asp, Php, Coldfusion etc it works like this

Dreamweaver ---->> DB in PHP <<---- Flash

So with Vb you can use flash and Access, excel,Oracle, etc using this method

Vb.exe ---->> MS Access <<----- Flash

I added a zip that explains how to use flash in vb it contains

* How read/write a flash textbox in vb
* Trigering actions like flash buttons, menus, etc
* Reading flash form elements listboxes, combos, options buttons

Sanko
04-27-2003, 01:04 PM
Now in this zip you find how to change the contextual menu that show when you click in a flash (*.swf) movie

I hope this can help you

Other question

¿where i can find a Data Base Grid to use in flash to show data of a DB?

CyanBlue
04-28-2003, 07:12 PM
Geez... You are too kind, Sanko... ;)

I don't have VB installed on my machine, so I gotta check the file after I find my VB CD... But I am sure it shouldn't be too hard... The only problem is that I got off of VB on VB5, so there's some gap in my memory system... That's what I gotta get over first, I think... ;)

Let me ask you this, Sanko... Tell me if this can be done in VB, possibly VB5... ;)
It is already over my hand that I cannot find what I have within the bookmarks of the IE...
So, I want to create a little program that reads all the favorite links in my computer... I want the VB to read all the contents including the fiile name and the content of the file and the folder that the file is located in, and send all of these to Flash in a form of an array so that I could use that data in Flash where I want to have some searchable functionalities and others...

I just want this one published for myself, so it doesn't have to be crossplatform... I just need this one to be run in W2K...

What do you think??? Do you think this can be done??? ;)

As for your question...¿where i can find a Data Base Grid to use in flash to show data of a DB?I am not sure what you mean by 'Data Base Grid'... Do you mean some sort of table or the one similar to datagrid component???
Go check it out at the FlashComponents.net (http://www.flashcomponents.net/components.cfm?nav=2) and search the place with 'table' to see some of the interesting ones...
I think I have played with Table component (http://www.flashcomponents.net/component.cfm?nav=2&id=205) and FTableClass (http://www.flashcomponents.net/component.cfm?nav=2&id=169) a while ago...

Let me know if those are what you want to use... ;)

Sanko
04-29-2003, 03:29 PM
:rolleyes: Ok let see

I think that maybe be 2 ways to do this

1) is using a call to a windows api you can look for more info here

Code (http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=35221&lngWId=1)

2) Using the Filelistbox, Dirlistbox and Drivelistbox, normaly the folder with all the links of the favorites in explorer is in the dir of c:\windows\system\favorites\ in Win 9X or in Win2K c:\winnt\system32\favorites\
You must copy the name of the folders and files in a variable or variables and then pass to the array.

If i not clear please tell me
:confused:

purplefish32
11-15-2005, 08:34 PM
hi, iv bin looking for this info for quite a long time... thank you verry mutch. i just have one question though : i am new to VB, but would like to give it a go. Vhat version of VB do i need though? VB6 or VB studio? Thanks