SWF Maestro: óíèâåðñàëüíûé êîìïèëÿòîð äëÿ ñîçäàíèÿ ïðèëîæåíèé, èãð, õðàíèòåëåé ýêðàíà èç SWF ôàéëîâ

������: ��������� ������ � �����������

� ���� ������� �� �������� ��������� ������, ������� ���� ������������ ����������� ������ ���������. ��� ���� ����� ��������� � ������������ ���������, ��������� �������������, �� ������������� ������������ ������������� FSCommand.

��������� ��������� ��������, ����� ������� ��������� ������ � �����������:

  1. �������� SWF Maestro (SCR).
  2. ������� ������ ��..� � �������� ��������� ����, ������� �� ������� � ������� �������. ��� �������� ��� ������������ ������������ ������ ��� ������.
  3. �������� ������ > ����� ��� ����������.
  4. ������� ���� � ����� �Screensaver2.swf� � �Tutorials\Screensaver2� ����������. ���� ���� ���������� �FSCommand(�storage.get�,��)� � �����, ����� ������: ������ �� ���� ��� ������� ��� �����.
  5. �������� ����� ����� �������� � ������� ���� � ����� �Settings.swf�, ������� �������� ������������ ������� ���� ����. ���� ���� ���������� �FSCommand(�storage.set�,��)� � �����, ����� ��������� ��������� ����.
  6. ������� ���������� ���...�, ����� ��������� ������.
  7. ������������� ��������� ������.
  8. ���������� ������������ SCR-���� � ������������� System32 � ����������, ��� ����������� Windows.
  9. ������� � �Display� � ��������� � �������� ��� ��������� ������ �� ������.
  10. ������� �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");