Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   Общие вопросы о Flash (не затрагивающие ActionScript) (http://www.flasher.ru/forum/forumdisplay.php?f=60)
-   -   проверка данных (http://www.flasher.ru/forum/showthread.php?t=68272)

skywalker1 24.08.2005 01:00

проверка данных
 
Простите за беспокойство у меня вопрос возник такой, поддерживает ли флаш регулярные выржения ( как в яваскрипт). Мне тут надо проверить введение данных в определённые поля и только пока одна мысль проверять если (textfielв1=="") то selection.SetFocus на textfielв1. но это коряво работает конечно. Можно как нибудь дезактивировать кнопку отправки данных как в ява ксрипт disabled пока не будут введены все данные?
Спасибо за помощь.

Den0k 24.08.2005 01:10

_root.b_btn.enabled = false;

b_btn - твоя кнопка

skywalker1 24.08.2005 01:15

спасибо большое! сейчас попробую. а регулярные выр поддерживет?

Den0k 24.08.2005 01:19

не за что)
у меня в голове опилки))) ты поясни что такое регулярные выражения!

skywalker1 24.08.2005 01:42

Я во влеше новенькая но в ява скрипт можно задать переменную например var check_mail=/^.+\@.+\..+$/; для проверки правильности введения майла. Есть ди там символ @ или точка итп

Den0k 24.08.2005 02:49

именно такого во Флеше нет.
посмотри вот это в хелпе :
String class
String.indexOf()
TextField class
Удачи!

skywalker1 24.08.2005 03:22

спасибо, пойду почитаю.

ffffff 24.08.2005 05:03

бинин! почаму люди никогда не читают доку поставляемую с программой? конечно по ней неудобно изучать программу или получать первое представление о работе, но такие вещи как работа регулярных выражений вполне можно тама посмареть! итак! нажимаем Ф1 и в поиске вписываем regex и что же получаем?

Differences between ActionScript and JavaScript
ActionScript is similar to the core JavaScript programming language. You don’t need to know JavaScript to use and learn ActionScript; however, if you know JavaScript, ActionScript will seem familiar.

This manual does not attempt to teach general programming. There are many resources that provide more information about general programming concepts and the JavaScript language.

The European Computers Manufacturers Association (ECMA) document ECMA-262 is derived from JavaScript and serves as the international standard for the JavaScript language. ActionScript is based on the ECMA-262 specification. For more information, see http://www.ecma-international.org/pu.../Ecma-262.htm).
Netscape DevEdge Online has a JavaScript Developer Central site (http://developer.netscape.com/tech/j...ipt/index.html) that contains documentation and articles useful for understanding ActionScript. The most valuable resource is the Core JavaScript Guide.
The Java Technology site has tutorials on object-oriented programming (http://java.sun.com/docs/books/tutorial/java/index.html) that are targeted for the Java language but are useful for understanding concepts that you can apply to ActionScript.
Some of the differences between ActionScript and JavaScript are described in the following list:

ActionScript does not support browser-specific objects such as Document, Window, and Anchor.
ActionScript does not completely support all the JavaScript built-in objects.
ActionScript does not support some JavaScript syntax constructs, such as statement labels.
In ActionScript, the eval() function can perform only variable references.
ActionScript 2.0, the latest version of the ActionScript language, supports several features that are not in the ECMA-262 specification, such as classes and strong typing. Many of these features are modeled after the ECMAScript 4 Draft Proposal currently in development by ECMA TC39-TG1 (see www.mozilla.org/js/language/es4/index.html), the standards committee in charge of the evolution of the ECMA-262 specification.
ActionScript does not support regular expressions using the RegExp object. However, Macromedia Central does support the RegExp object.

Den0k 24.08.2005 09:05

если честно я о том же)
тут каждый вопрос не только от новичка можно редиректить в хелп;-)

skywalker1 24.08.2005 14:56

народ я по англиски не понимаю. спасибо за помощь.


Часовой пояс GMT +4, время: 00:58.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.