������: ��������� ������ � �����������
� ���� ������� �� �������� ��������� ������, ������� ���� ������������
����������� ������ ���������. ��� ���� ����� ��������� � ������������
���������, ��������� �������������, �� ������������� ������������ �������������
FSCommand.
��������� ��������� ��������, ����� ������� ��������� ������ � �����������:
- �������� SWF Maestro (SCR).
- ������� ������ ��..� � �������� ��������� ����, ������� �� �������
� ������� �������. ��� �������� ��� ������������ ������������ ������
��� ������.
- �������� ������ > ����� ��� ����������.
- ������� ���� � ����� �Screensaver2.swf� � �Tutorials\Screensaver2�
����������. ���� ���� ���������� �FSCommand(�storage.get�,��)� �
�����, ����� ������: ������ �� ���� ��� ������� ��� �����.
- �������� ����� ����� �������� � ������� ���� � ����� �Settings.swf�,
������� �������� ������������ ������� ���� ����. ���� ���� ����������
�FSCommand(�storage.set�,��)� � �����, ����� ��������� ���������
����.
- ������� ���������� ���...�, ����� ��������� ������.
- ������������� ��������� ������.
- ���������� ������������ SCR-���� � ������������� System32 � ����������,
��� ����������� Windows.
- ������� � �Display� � ��������� � �������� ��� ��������� ������
�� ������.
- ������� �Settings�, ����� ������� ����, � ����� �Preview�.
FLA-����� ��������� ������, �� ������� ���� ������� �Screensaver2.swf�
� �Settings.swf� �� ������� � ���������� 'Tutorials\FLAs'.
�������� Screensaver2.swf:
������� �� 100 ������.
1-� ���� �������� ActionScript:
stop();
var isGreen="N";
function watchCallback (id, oldval, newval) {
if(newval!="Y") {
gotoAndPlay(10);
} else {
gotoAndPlay(60);
}
};
_root.watch("isGreen", watchCallback);
fscommand("storage.get","Green,isGreen");
�����������:
stop();
������������� ���������������, ����� ���������������� ��������� ������
� ������: ����� ����� ������ ��������������.
var isGreen="N";
�������������� ����������, � ������� ����� ������: ������ �� �������
����.
function watchCallback (id, oldval, newval)
��� ������� ����� ��������� ����� ����� ��������� ������ �� ���������
��������. ��� ����������� �������� ������ � ��������� � 10�� �����,
���� �� ������ ������� ����, ����� � ��������� � 60�� �����.
_root.watch("isGreen",
watchCallback);
���� ������� watch-������� �� ������������ ������������� ���������� isGreen.
����� ���������� ������� ��������, ���������� ����� ����� watchCallback-�������.
fscommand("storage.get","Green,isGreen");
���� ������� �� ������ �������� Green �� ��������� �������� � �����������
��� ���������� isGreen.
����������. �� �� ����� ������ ��������� �������� � ������� FSCommand(�storage.get�,��) � ������� � ������� �����, �.�. FSCommand-������� ����������� � ���������� ���������� ����������, �� ������������ ��������� ��������. ������� ��������� ������� ���������������� �������, ������� ����������� ����� ��������� ��������.
����� 10-50:
�������� ��������� ������ ����.
50 ���� ����� �������� ActionScript ��� ������������ ��������:
gotoAndPlay(10);
����� 60-100:
�������� ��������� �������� ����.
100 ���� ����� �������� ActionScript ��� ������������ ��������:
gotoAndPlay(60);
�������� Settings.swf:
������� �� ������ �����.
���� �������� ��� RadioButton��: option1 (����� ���) � option2 (������� ���).
Option1 �������� ActionScript:
on (release) {
fscommand("storage.set","Green,N");
}
Option2 �������� ActionScript:
on (release) {
fscommand("storage.set","Green,Y");
}
����� ������������ �������� ������ �����, � ��������� �������� ���������� �Green� �� ��������� �N�. ����� �������� ������ � ���������� �Green� �� ��������� �Y�.
����� ���� �������� ActionScript ��� ������������� �����: stop();
var isGreen="N";
function watchCallback (id, oldval, newval)
{
if(newval!="Y") {
option1.setState(true);
} else {
option2.setState(true);
}
};
_root.watch("isGreen", watchCallback);
fscommand("maestro.storage.get","Green,isGreen"); |