AutoPlay Media Studio da shiriftni to`g`irlash Dastur interfeysi


AutoPlay Media Studio  da elektron darslik tayyorlash


Download 145.68 Kb.
bet2/2
Sana19.02.2020
Hajmi145.68 Kb.
1   2

AutoPlay Media Studio  da elektron darslik tayyorlash

Siz AutoPlay Media Studio  yordamida elektron darslik yaratishingiz mumkin.


Elektron Darslikda mavzuga avoz qo`shishingiz mimkin. Shu maboynida vedioga ham qo`shish imkoni mavjud har bir darslik uchun video, harakat effektini berish mumkin.

Rasm 1.


1. Button 1 chiqish Script codi: Application.Exit(0);

2. Button 2 Video kodakni o`rnatish Script codi:  File.Open("AutoPlay\\Docs\\klmcodec152.exe", "", SW_SHOWNORMAL);

3. Button 3 flash playerni o`rnatish Script codi:  File.Open("AutoPlay\\Docs\\flash_player_8.msi", "", SW_SHOWNORMAL);

4. Button 4 Mavzuga o`tish Script codi:   Page.Jump("Page2"); ikkinchi sahifaga o`tish

5. XButton 1 Ovozni qo`yish va o`chirish Script codi:

if (P == 1) then

  Audio.Stop(CHANNEL_BACKGROUND);

P=0;


else

Audio.Play(CHANNEL_BACKGROUND);

P=1;

end
AutoPlay Media Studio da pdf faylni ochish



AutoPlay katalogi yonidan PDFs katalogini Category1 Category2 va CategoryN hosil qiling va uning ichiga document1.pdf, docume nt2.pdf va documentN.pdf ihtiyoriy katalog ichiga istalgan pdf kengaytmali faylni hosil qiling ko`rsatilgan nom bilan.
Dastur tuzilishi bizda Tree1 va PDF1 obektni olamiz va Page1 ga sichqonchaning o`ng tugmasini bosib Porperties bo`limini tanlang va Script ga quyidagi kodni joylashtiring.

sFirstPDFToLoad = "";


function AddToTree(sFullPath)
if (sFirstPDFToLoad == '') then
sFirstPDFToLoad = sFullPath;
end

tPathParts = String.SplitPath(sFullPath);

nRootLength = String.Length(sPDFRootFolder);

sFullFolderPath = tPathParts.Drive .. tPathParts.Folder;


nFullFolderPathLength = String.Length(sFullFolderPath);
sFullFolderPath = String.Mid(sFullFolderPath, 1, nFullFolderPathLength - 1);

if(String.Compare(sPDFRootFolder, sFullFolderPath) == 0) then


tNodeData = {};
tNodeData['Text']=tPathParts.Filename;
tNodeData['Data']=sFullPath;
tNodeData['ImageIndex']="0";

Tree.InsertNode("Tree1", Tree.GetChildCount("Tree1", "0") + 1, tNodeData);


else
sSearchString = tPathParts.Folder;
sSearchString = String.TrimRight(sSearchString, '\\');
nPosLastSlash = String.ReverseFind(sSearchString, '\\');
sSearchString = String.Mid(sSearchString, nPosLastSlash + 1, -1);
sFoundNodeIndex = Tree.FindNodeByText("Tree1", "0", sSearchString);
if sFoundNodeIndex == "" then

tNodeData = {};


tNodeData['Text']=sSearchString;
tNodeData['Data']="";
tNodeData['ImageIndex']="1";
sParentIndex = Tree.GetChildCount("Tree1", "0") + 1;
Tree.InsertNode("Tree1", sParentIndex, tNodeData);
else
sParentIndex = sFoundNodeIndex;
end

tNodeData = {};


tNodeData['Text']=tPathParts.Filename;
tNodeData['Data']=sFullPath;
tNodeData['ImageIndex']="0";
Tree.InsertNode("Tree1", sParentIndex .. "." .. (Tree.GetChildCount("Tree1", sParentIndex) + 1), tNodeData);
end

return true;


end

 

File.Find(sPDFRootFolder, "*.pdf", true, false, nil, AddToTree);



PDF.LoadFile("PDF1", sFirstPDFToLoad); 

Tree1 obektga sichqoncha bilan ikkimarta bosib script ga quyidagi kodni joylashting.

if e_NodeIndex then


tNodeData = Tree.GetNode("Tree1", e_NodeIndex);
if tNodeData then 
if (tNodeData['Data'] ~= '') then
PDF.LoadFile("PDF1", tNodeData['Data']);
end
end
end
Download 145.68 Kb.

Do'stlaringiz bilan baham:
1   2




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2020
ma'muriyatiga murojaat qiling