/** Font Notes : notes, cannot have embedded and non embedded fonts in 1 field. if using a stylesheet and an embedded font, the font-family:NAME must equal the actual name of the font, not the linkage class. if using textformat create a new instance of the linkage class: var font:LINKAGE = new LINKAGE(); tf.font = font.fontName; */ package { import com.greensock.*; import com.greensock.easing.*; import com.greensock.TweenMax; //import ru.Zell.zRuler; import com.hybrid.ui.ToolTip; import flash.display.*; import flash.events.*; import flash.utils.*; import flash.text.*; import flash.utils.Timer; import flash.events.TimerEvent; import flash.system.*; import flash.net.URLLoader; import flash.net.URLRequest; import flash.events.IOErrorEvent; import flash.net.FileReference; import flash.net.FileFilter; public class lab_z_main extends MovieClip { private var pageHeigth:Number=760; private var nextToGo:Number; private var contentx:Number; private var currentPage:Number=1; private var totalPages:Number=27; private var _reusableTip = new ToolTip(); // ПЕРЕМЕННЫЕ private var var_Wpl:Number; /* private var _timer:Timer; private var _reusableTip:ToolTip; private var _sheet:StyleSheet = new StyleSheet(); */ public function lab_z_main() { _reusableTip.hook=true; _reusableTip.cornerRadius=12; _reusableTip.tipWidth=200; _reusableTip.align="right"; _reusableTip.border=0xEEEEEE; _reusableTip.borderSize=2; this.init(); } public function init():void { var pogr:Number=40; content.bg.height=25500; nextToGo = content.y; content.page1.y=pogr; content.page2.y=pageHeigth+pogr; content.page3.y=2*pageHeigth+pogr; content.page4.y=3*pageHeigth+pogr; content.page5.y=4*pageHeigth+pogr; content.page6.y=5*pageHeigth+pogr; content.page7.y=6*pageHeigth+pogr; content.page8.y=7*pageHeigth+pogr; content.page9.y=8*pageHeigth+pogr; content.page10.y=9*pageHeigth+pogr/2; content.page11.y=10*pageHeigth+pogr; content.page12.y=11*pageHeigth+pogr; content.page13.y=12*pageHeigth+pogr; content.page14.y=13*pageHeigth+pogr; content.page15.y=14*pageHeigth+pogr; content.page16.y=15*pageHeigth+pogr; content.page17.y=16*pageHeigth+pogr; content.page18.y=17*pageHeigth+pogr; content.page19.y=18*pageHeigth+pogr; content.page20.y=19*pageHeigth+pogr; content.page21.y=20*pageHeigth+pogr; content.page22.y=21*pageHeigth+pogr; content.page23.y=22*pageHeigth+pogr; content.page24.y=23*pageHeigth+pogr; content.page25.y=24*pageHeigth+pogr; content.page26.y=25*pageHeigth+pogr; content.page27.y=26*pageHeigth+pogr; content.page1.x=34; content.page2.x=34; content.page3.x=34; content.page4.x=34; content.page5.x=34; content.page6.x=34; content.page7.x=34; content.page8.x=34; content.page9.x=34; content.page10.x=34; content.page11.x=34; content.page12.x=34; content.page13.x=34; content.page14.x=34; content.page15.x=34; content.page16.x=34; content.page17.x=34; content.page18.x=34; content.page19.x=34; content.page20.x=34; content.page21.x=34; content.page22.x=34; content.page23.x=34; content.page24.x=34; content.page25.x=34; content.page26.x=34; content.page27.x=34; content.page1.walktrough=true; content.page2.walktrough=true; content.page3.walktrough=true; content.page4.walktrough=true; content.page5.walktrough=true; content.page6.walktrough=true; content.page7.walktrough=true; content.page8.walktrough=true; content.page9.walktrough=true; content.page10.walktrough=true; content.page11.walktrough=true; content.page12.walktrough=true; content.page13.walktrough=true; content.page14.walktrough=true; content.page15.walktrough=true; content.page16.walktrough=true; content.page17.walktrough=true; content.page18.walktrough=true; content.page19.walktrough=true; content.page20.walktrough=true; content.page21.walktrough=true; content.page22.walktrough=true; content.page23.walktrough=true; content.page24.walktrough=true; content.page25.walktrough=true; content.page26.walktrough=true; content.page27.walktrough=true; content.page5.getChildByName("inp1").varr.addEventListener(Event.CHANGE, calculate5); content.page5.getChildByName("inp2").varr.addEventListener(Event.CHANGE, calculate5); content.page5.getChildByName("inp3").varr.addEventListener(Event.CHANGE, calculate5); content.page11.getChildByName("inp1").varr.addEventListener(Event.CHANGE, calculate11_1); content.page11.getChildByName("inp2").varr.addEventListener(Event.CHANGE, calculate11_1); content.page11.getChildByName("inp3").varr.addEventListener(Event.CHANGE, calculate11_1); content.page11.getChildByName("inp4").varr.addEventListener(Event.CHANGE, calculate11_1); content.page11.getChildByName("inp5").varr.addEventListener(Event.CHANGE, calculate11_1); content.page11.getChildByName("inp6").varr.addEventListener(Event.CHANGE, calculate11_1); content.page11.getChildByName("inp7").varr.addEventListener(Event.CHANGE, calculate11_1); content.page11.getChildByName("inp8").varr.addEventListener(Event.CHANGE, calculate11_1); content.page11.getChildByName("inp9").varr.addEventListener(Event.CHANGE, calculate11_1); content.page11.getChildByName("inp10").varr.addEventListener(Event.CHANGE, calculate11_1); content.page11.getChildByName("inp11").varr.addEventListener(Event.CHANGE, calculate11_2); content.page11.getChildByName("inp12").varr.addEventListener(Event.CHANGE, calculate11_2); content.page11.getChildByName("inp21").varr.addEventListener(Event.CHANGE, calculate11_3); content.page12.getChildByName("inp1").varr.addEventListener(Event.CHANGE, calculate12); content.page12.getChildByName("inp2").varr.addEventListener(Event.CHANGE, calculate12); content.page13.getChildByName("inp11").varr.addEventListener(Event.CHANGE, calculate13_1); content.page13.getChildByName("inp12").varr.addEventListener(Event.CHANGE, calculate13_1); content.page13.getChildByName("inp13").varr.addEventListener(Event.CHANGE, calculate13_1); content.page13.getChildByName("inp14").varr.addEventListener(Event.CHANGE, calculate13_1); content.page13.getChildByName("inp21").varr.addEventListener(Event.CHANGE, calculate13_2); content.page13.getChildByName("inp22").varr.addEventListener(Event.CHANGE, calculate13_2); content.page13.getChildByName("inp23").varr.addEventListener(Event.CHANGE, calculate13_2); content.page13.getChildByName("inp24").varr.addEventListener(Event.CHANGE, calculate13_2); content.page13.getChildByName("inp25").varr.addEventListener(Event.CHANGE, calculate13_2); // PAGE 14 content.page14.getChildByName("inp11").varr.addEventListener(Event.CHANGE, calculate14_1); content.page14.getChildByName("inp12").varr.addEventListener(Event.CHANGE, calculate14_1); content.page14.getChildByName("inp13").varr.addEventListener(Event.CHANGE, calculate14_1); content.page14.getChildByName("inp14").varr.addEventListener(Event.CHANGE, calculate14_1); content.page14.getChildByName("inp21").varr.addEventListener(Event.CHANGE, calculate14_2); content.page14.getChildByName("inp22").varr.addEventListener(Event.CHANGE, calculate14_2); content.page14.getChildByName("inp31").varr.addEventListener(Event.CHANGE, calculate14_3); content.page14.getChildByName("inp32").varr.addEventListener(Event.CHANGE, calculate14_3); content.page14.getChildByName("inp41").varr.addEventListener(Event.CHANGE, calculate14_4); content.page14.getChildByName("inp42").varr.addEventListener(Event.CHANGE, calculate14_4); content.page14.getChildByName("inp43").varr.addEventListener(Event.CHANGE, calculate14_4); content.page14.getChildByName("inp44").varr.addEventListener(Event.CHANGE, calculate14_4); content.page22.getChildByName("inp11").varr.addEventListener(Event.CHANGE, calculate22_1); content.page22.getChildByName("inp12").varr.addEventListener(Event.CHANGE, calculate22_1); content.page22.getChildByName("inp13").varr.addEventListener(Event.CHANGE, calculate22_1); content.page22.getChildByName("inp14").varr.addEventListener(Event.CHANGE, calculate22_1); content.page22.getChildByName("inp15").varr.addEventListener(Event.CHANGE, calculate22_1); content.page22.getChildByName("inp21").varr.addEventListener(Event.CHANGE, calculate22_2); content.page22.getChildByName("inp22").varr.addEventListener(Event.CHANGE, calculate22_2); content.page23.getChildByName("inp11").varr.addEventListener(Event.CHANGE, calculate23_1); content.page23.getChildByName("inp12").varr.addEventListener(Event.CHANGE, calculate23_1); content.page23.getChildByName("inp13").varr.addEventListener(Event.CHANGE, calculate23_1); content.page23.getChildByName("inp14").varr.addEventListener(Event.CHANGE, calculate23_1); content.page23.getChildByName("inp15").varr.addEventListener(Event.CHANGE, calculate23_1); content.page23.getChildByName("inp21").varr.addEventListener(Event.CHANGE, calculate23_2); content.page23.getChildByName("inp22").varr.addEventListener(Event.CHANGE, calculate23_2); content.page24.getChildByName("inp11").varr.addEventListener(Event.CHANGE, calculate24_1); content.page24.getChildByName("inp21").varr.addEventListener(Event.CHANGE, calculate24_2); content.page24.getChildByName("inp22").varr.addEventListener(Event.CHANGE, calculate24_2); content.page24.getChildByName("inp31").varr.addEventListener(Event.CHANGE, calculate24_3); content.page24.getChildByName("inp32").varr.addEventListener(Event.CHANGE, calculate24_3); content.page24.getChildByName("inp41").varr.addEventListener(Event.CHANGE, calculate24_4); content.page24.getChildByName("inp42").varr.addEventListener(Event.CHANGE, calculate24_4); content.page24.getChildByName("inp43").varr.addEventListener(Event.CHANGE, calculate24_4); content.page25.getChildByName("inp11").varr.addEventListener(Event.CHANGE, calculate25_1); content.page25.getChildByName("inp12").varr.addEventListener(Event.CHANGE, calculate25_1); content.page25.getChildByName("inp21").varr.addEventListener(Event.CHANGE, calculate25_2); content.page25.getChildByName("inp22").varr.addEventListener(Event.CHANGE, calculate25_2); content.page26.getChildByName("inp11").varr.addEventListener(Event.CHANGE, calculate26_1); content.page26.getChildByName("inp12").varr.addEventListener(Event.CHANGE, calculate26_1); content.page26.getChildByName("inp21").varr.addEventListener(Event.CHANGE, calculate26_2); content.page26.getChildByName("inp22").varr.addEventListener(Event.CHANGE, calculate26_2); content.page26.getChildByName("inp23").varr.addEventListener(Event.CHANGE, calculate26_2); content.page26.getChildByName("inp24").varr.addEventListener(Event.CHANGE, calculate26_2); content.page26.getChildByName("inp25").varr.addEventListener(Event.CHANGE, calculate26_2); content.page26.getChildByName("inp26").varr.addEventListener(Event.CHANGE, calculate26_2); content.page26.getChildByName("inp27").varr.addEventListener(Event.CHANGE, calculate26_2); content.page26.getChildByName("inp28").varr.addEventListener(Event.CHANGE, calculate26_2); content.page26.getChildByName("inp29").varr.addEventListener(Event.CHANGE, calculate26_2); content.page26.getChildByName("inp291").varr.addEventListener(Event.CHANGE, calculate26_2); content.page26.getChildByName("inp292").varr.addEventListener(Event.CHANGE, calculate26_2); content.page26.getChildByName("inp293").varr.addEventListener(Event.CHANGE, calculate26_2); content.page26.getChildByName("inp31").varr.addEventListener(Event.CHANGE, calculate26_3); content.page26.getChildByName("inp32").varr.addEventListener(Event.CHANGE, calculate26_3); content.page26.getChildByName("inp33").varr.addEventListener(Event.CHANGE, calculate26_3); content.page27.getChildByName("b_save").addEventListener(MouseEvent.MOUSE_DOWN, saveOt4et); arr.dwn.addEventListener(MouseEvent.MOUSE_DOWN, this.contentDown); arr.dwn.addEventListener(MouseEvent.MOUSE_OVER, this.contentDownIsTool); arr.upp.addEventListener(MouseEvent.MOUSE_DOWN, this.contentUp); var loadit = new Loader(); loadit.load(new URLRequest("konFor.swf")); loadit.name="konFor"; content.page4.addChild(loadit); loadit.x=-20; var loadit4= new Loader(); loadit4.load(new URLRequest("lab_z1_p4_win.swf")); content.page4.addChild(loadit4); loadit4.x=275; loadit4.y=115; calculate4(); var loadit3 = new Loader(); loadit3.load(new URLRequest("armatura_press.swf")); content.page5.addChild(loadit3); loadit3.y=100; // content.page4.ispit.ras.addEventListener(MouseEvent.MOUSE_DOWN, p4loadCon); var konFor10 = new Loader(); konFor10.load(new URLRequest("konFor2.swf")); konFor10.name="konFor"; content.page10.addChild(konFor10); konFor10.x=-20; // content.page4.ispit.visible=false; var loadit2 = new Loader(); loadit2.load(new URLRequest("press.swf")); content.page20.addChild(loadit2); loadit2.mask=content.page20.mask2; loadit2.x=150; loadit2.y=150; content.page20.mask2.x=150; content.page20.mask2.y=150; } function calculate1(e:Event):void { trace(this); // headingTextField.text = inputTextField.text; } function calculate4():void { content.page27.getChildByName("var11").varr.text=41; content.page27.getChildByName("var12").varr.text=31; content.page27.getChildByName("var13").varr.text=32; } function calculate5(e:Event):void { trace(e.target.parent.name); var va1:Number=content.page5.getChildByName("inp1").varr.text; var va2:Number=content.page5.getChildByName("inp2").varr.text; var va3:Number=content.page5.getChildByName("inp3").varr.text; var vaRes:Number = (va1 + va2 + va3) /3; vaRes=round(vaRes,2); content.page5.getChildByName("inp4").varr.text=vaRes; if (vaRes==358.33) { content.page5.walktrough=true; } content.page13.getChildByName("con1").varr.text=vaRes; content.page27.getChildByName("inp21").varr.text=va1; content.page27.getChildByName("inp22").varr.text=va2; content.page27.getChildByName("inp23").varr.text=va3; } function calculate11_1(e:Event):void { var va1:Number=content.page11.getChildByName("inp1").varr.text; var va2:Number=content.page11.getChildByName("inp2").varr.text; var va3:Number=content.page11.getChildByName("inp3").varr.text; var va4:Number=content.page11.getChildByName("inp4").varr.text; var va5:Number=content.page11.getChildByName("inp5").varr.text; var va6:Number=content.page11.getChildByName("inp6").varr.text; var va7:Number=content.page11.getChildByName("inp7").varr.text; var va8:Number=content.page11.getChildByName("inp8").varr.text; var va9:Number=content.page11.getChildByName("inp9").varr.text; var va10:Number=content.page11.getChildByName("inp10").varr.text; var vaRes:Number = ((va1 + va2^3) /12) + va3*va4*(va5 - va6/2)^2+ va7*va8*(va9-va10)^2; vaRes=round(vaRes,2); content.page11.getChildByName("res1").varr.text=vaRes; } function calculate11_2(e:Event):void { var va1:Number=content.page11.getChildByName("inp11").varr.text; var va2:Number=content.page11.getChildByName("inp12").varr.text; var vaRes:Number = va1/va2; vaRes=round(vaRes,2); content.page11.getChildByName("res2").varr.text=vaRes; /* if (va4==358.33) { content.page5.walktrough=true; } trace(va4); //trace(Event.target); // headingTextField.text = inputTextField.text; */ } function calculate11_3(e:Event):void { var va1:Number=content.page11.getChildByName("inp21").varr.text; var vaRes:Number = 1.75*va1; vaRes=round(vaRes,2); var_Wpl = vaRes; content.page11.getChildByName("res3").varr.text=vaRes; content.page12.getChildByName("res11").varr.text=vaRes; var resTmp = round(vaRes/1000,2); content.page12.getChildByName("res12").varr.text=resTmp; content.page12.getChildByName("res21").varr.text=2,17; content.page12.getChildByName("res22").varr.text=21,7; } function calculate12(e:Event):void { var va1:Number=content.page12.getChildByName("inp1").varr.text; var va2:Number=content.page12.getChildByName("inp2").varr.text; var vaRes:Number = va1*va2; vaRes=round(vaRes,2); content.page12.getChildByName("res31").varr.text=vaRes; var resTmp = round(vaRes/100,2); content.page12.getChildByName("res32").varr.text=resTmp; content.page14.getChildByName("con4").varr.text=resTmp; content.page27.getChildByName("var31").varr.text=resTmp; } function calculate13_1(e:Event):void { var _path:* = content.page13; var va1:Number=_path.getChildByName("inp11").varr.text; var va2:Number=_path.getChildByName("inp12").varr.text; var va3:Number=_path.getChildByName("inp13").varr.text; var va4:Number=_path.getChildByName("inp14").varr.text; var vaRes:Number = (va1*va2)/(va3*va4); vaRes=round(vaRes,2); _path.getChildByName("res1").varr.text=vaRes; } function calculate13_2(e:Event):void { var _path:* = content.page13; var va1:Number=_path.getChildByName("inp21").varr.text; var va2:Number=_path.getChildByName("inp22").varr.text; var va3:Number=_path.getChildByName("inp23").varr.text; var va4:Number=_path.getChildByName("inp24").varr.text; var va5:Number=_path.getChildByName("inp25").varr.text; var vaRes:Number = (va1*va2*va3)*(va4-(va5/2)); vaRes=round(vaRes,2); _path.getChildByName("res2").varr.text=vaRes; content.page14.getChildByName("con5").varr.text=vaRes; content.page27.getChildByName("var61").varr.text=vaRes; } function calculate14_1(e:Event):void { var _path:* = content.page14; var va1:Number=_path.getChildByName("inp11").varr.text; var va2:Number=_path.getChildByName("inp12").varr.text; var va3:Number=_path.getChildByName("inp13").varr.text; var va4:Number=_path.getChildByName("inp14").varr.text; var vaRes:Number = va1*va2*va3*va4; vaRes=round(vaRes,2); _path.getChildByName("res1").varr.text=vaRes; } function calculate14_2(e:Event):void { var _path:* = content.page14; var va1:Number=_path.getChildByName("inp21").varr.text; var va2:Number=_path.getChildByName("inp22").varr.text; var vaRes:Number = (va1/2)*(va2/4); vaRes=round(vaRes,2); _path.getChildByName("res2").varr.text=vaRes; } function calculate14_3(e:Event):void { var _path:* = content.page14; var va1:Number=_path.getChildByName("inp31").varr.text; var va2:Number=_path.getChildByName("inp32").varr.text; var vaRes:Number = (va1/2)*(va2/4); vaRes=round(vaRes,2); _path.getChildByName("res3").varr.text=vaRes; } function calculate14_4(e:Event):void { var _path:* = content.page14; var va1:Number=_path.getChildByName("inp41").varr.text; var va2:Number=_path.getChildByName("inp42").varr.text; var va3:Number=_path.getChildByName("inp43").varr.text; var va4:Number=_path.getChildByName("inp44").varr.text; var vaRes:Number = ((2*3)/va1)*(va2-va3-va4); vaRes=round(vaRes,2); _path.getChildByName("res4").varr.text=vaRes; } function calculate22_1(e:Event):void { var _path:* = content.page22; var va1:Number=_path.getChildByName("inp11").varr.text; var va2:Number=_path.getChildByName("inp12").varr.text; var va3:Number=_path.getChildByName("inp13").varr.text; var va4:Number=_path.getChildByName("inp14").varr.text; var va5:Number=_path.getChildByName("inp15").varr.text; var vaRes:Number = (va1+0.5*va2)*va3/3+va4*va5/8; vaRes=round(vaRes,2); _path.getChildByName("res1").varr.text=vaRes; content.page27.getChildByName("var41").varr.text=vaRes; } function calculate22_2(e:Event):void { var _path:* = content.page22; var va1:Number=_path.getChildByName("inp21").varr.text; var va2:Number=_path.getChildByName("inp22").varr.text; var va3:Number=_path.getChildByName("inp23").varr.text; var vaRes:Number = (va1-va2)/va3; vaRes=round(vaRes,2); _path.getChildByName("res2").varr.text=vaRes; content.page27.getChildByName("var51").varr.text=vaRes; } function calculate23_1(e:Event):void { var _path:* = content.page23; var va1:Number=_path.getChildByName("inp11").varr.text; var va2:Number=_path.getChildByName("inp12").varr.text; var va3:Number=_path.getChildByName("inp13").varr.text; var va4:Number=_path.getChildByName("inp14").varr.text; var va5:Number=_path.getChildByName("inp15").varr.text; var vaRes:Number = (va1+0.5*va2)*va3/3+va4*va5/8; vaRes=round(vaRes,2); _path.getChildByName("res1").varr.text=vaRes; content.page27.getChildByName("var71").varr.text=vaRes; } // величина отклонения в % function calculate23_2(e:Event):void { var _path:* = content.page23; var va1:Number=_path.getChildByName("inp21").varr.text; var va2:Number=_path.getChildByName("inp22").varr.text; var va3:Number=_path.getChildByName("inp23").varr.text; var vaRes:Number = (va1-va2)/va3; vaRes=round(vaRes,2); _path.getChildByName("res2").varr.text=vaRes; content.page27.getChildByName("var81").varr.text=vaRes; } function calculate24_1(e:Event):void { var _path:* = content.page24; var va1:Number=_path.getChildByName("inp11").varr.text; var vaRes:Number = 0.85*va1; vaRes=round(vaRes,2); _path.getChildByName("res1").varr.text=vaRes; } function calculate24_2(e:Event):void { var _path:* = content.page24; var va1:Number=_path.getChildByName("inp21").varr.text; var va2:Number=_path.getChildByName("inp22").varr.text; var vaRes:Number = va1*va2; vaRes=round(vaRes,2); _path.getChildByName("res2").varr.text=vaRes; } function calculate24_3(e:Event):void { var _path:* = content.page24; var va1:Number=_path.getChildByName("inp31").varr.text; var va2:Number=_path.getChildByName("inp32").varr.text; var vaRes:Number = va1/va2; vaRes=round(vaRes,2); _path.getChildByName("res3").varr.text=vaRes; } //  прогиб до образования трещин function calculate24_4(e:Event):void { var _path:* = content.page24; var va1:Number=_path.getChildByName("inp41").varr.text; var va2:Number=_path.getChildByName("inp42").varr.text; var va3:Number=_path.getChildByName("inp43").varr.text; var vaRes:Number = va1*va2^2*va3; vaRes=round(vaRes,2); _path.getChildByName("res4").varr.text=vaRes; content.page27.getChildByName("var91").varr.text=vaRes; } function calculate25_1(e:Event):void { var _path:* = content.page25; var va1:Number=_path.getChildByName("inp11").varr.text; var va2:Number=_path.getChildByName("inp12").varr.text; var vaRes:Number = 1-0.8*(va1/va2); vaRes=round(vaRes,2); _path.getChildByName("res1").varr.text=vaRes; } function calculate25_2(e:Event):void { var _path:* = content.page25; var va1:Number=_path.getChildByName("inp21").varr.text; var va2:Number=_path.getChildByName("inp22").varr.text; var vaRes:Number = va1/va2; vaRes=round(vaRes,2); _path.getChildByName("res2").varr.text=vaRes; } function calculate26_1(e:Event):void { var _path:* = content.page26; var va1:Number=_path.getChildByName("inp11").varr.text; var va2:Number=_path.getChildByName("inp12").varr.text; var vaRes:Number = va1-(va2/2); vaRes=round(vaRes,2); _path.getChildByName("res1").varr.text=vaRes; } function calculate26_2(e:Event):void { var _path:* = content.page26; var va1:Number=_path.getChildByName("inp21").varr.text; var va2:Number=_path.getChildByName("inp22").varr.text; var va3:Number=_path.getChildByName("inp23").varr.text; var va4:Number=_path.getChildByName("inp24").varr.text; var va5:Number=_path.getChildByName("inp25").varr.text; var va6:Number=_path.getChildByName("inp26").varr.text; var va7:Number=_path.getChildByName("inp27").varr.text; var va8:Number=_path.getChildByName("inp28").varr.text; var va9:Number=_path.getChildByName("inp29").varr.text; var va91:Number=_path.getChildByName("inp291").varr.text; var va92:Number=_path.getChildByName("inp292").varr.text; var va93:Number=_path.getChildByName("inp293").varr.text; var vaRes:Number = (va1/(va2*va3))*((va4/(va6*va7))+(va5/(va8*va9*va91*va92*va93))); vaRes=round(vaRes,2); _path.getChildByName("res2").varr.text=vaRes; } function calculate26_3(e:Event):void { var _path:* = content.page26; var va1:Number=_path.getChildByName("inp31").varr.text; var va2:Number=_path.getChildByName("inp32").varr.text; var va3:Number=_path.getChildByName("inp33").varr.text; var vaRes:Number = va1*va2^2*va3; vaRes=round(vaRes,2); _path.getChildByName("res3").varr.text=vaRes; content.page27.getChildByName("var101").varr.text=vaRes; } public static function round(value:Number, exactness:int = 0):Number {//value - число для округления; exactness - точность округления; var round:* =value.toFixed(exactness);//Округляем return round; } /* function p4loadCon(evt:MouseEvent):void {// конструктор формул для страницы 4 } */ private function contentDownIsTool(evt:MouseEvent):void{ var isTooltipDisp:Boolean = false; var pageLink:Object=content.getChildByName("page"+currentPage); /* if (currentPage==4) { pageLink.walktrough=Object(pageLink.getChildByName("konFor").content).walktrough; } */ if (currentPage==10) { pageLink.walktrough=Object(pageLink.getChildByName("konFor").content).walktrough; } if (! pageLink.walktrough) { isTooltipDisp = true; } if(isTooltipDisp){ _reusableTip.show( evt.target, "", "Вы не выполнили задание на этой странице" ); } } private function contentDown(evt:MouseEvent) { if (currentPage==totalPages) { return; } var pageLink:Object=content.getChildByName("page"+currentPage); if (currentPage==4) { pageLink.walktrough=Object(pageLink.getChildByName("konFor").content).walktrough; } if (! pageLink.walktrough) { return; } nextToGo=nextToGo-pageHeigth; TweenMax.to(this.content, 0.5, {y:nextToGo, ease:Expo.easeOut}); currentPage++; trace(currentPage); } private function contentUp(evt:MouseEvent):void { if (currentPage==1) { return; } var pageLink:Object=content.getChildByName("page"+currentPage); if (! pageLink.walktrough) { //return } nextToGo+=pageHeigth; TweenMax.to(this.content, 0.5, {y:nextToGo, ease:Expo.easeOut}); currentPage--; trace(currentPage); } function saveOt4et(evt:MouseEvent) { var str:String="Студент "+content.page27.fio1.text+" Факультета "+content.page27.fak.text+" Группы "+content.page27.nom.text+" ; \n Преподаватель: "+content.page27.fio2.text+" Дата: "+content.page27.dat.text; str+="\n 1. Кубиковая прочность бетона: R1 = "+content.page27.var11.varr.text+" Н/мм2; R2 = "+content.page27.var12.varr.text+" Н/мм2; R3 = "+content.page27.var13.varr.text+" Н/мм2"; str+="\n 2. Сопротивление растяжению арматуры: σy1 = "+content.page27.var21.varr.text+" Н/мм2; σy2 = "+content.page27.var22.varr.text+" Н/мм2; σy3 = "+content.page27.var23.varr.text+" Н/мм2"; str+="\n 3. Теоретический момент трещинообразования: Mcrc,cal = "+content.page27.var31.varr.text+" кгс∙см"; str+="\n 4. Опытный момент трещинообразования: Mcrc,exp = "+content.page27.var41.varr.text+" кгс∙см"; str+="\n 5. Величина отклонения в %: (Mcrc,cal - Mcrc,exp)/Mcrc,cal ∙ 100% = "+content.page27.var51.varr.text+" %"; str+="\n 6. Теоретический разрушающий момент: Mul,cal = "+content.page27.var61.varr.text+" кгс∙см"; str+="\n 7. Опытный разрушающий момент: Mul,exp = "+content.page27.var71.varr.text+" кгс∙см"; str+="\n 8. Величина отклонения в %: (Mul,cal - Mul,exp)/Mul,cal ∙ 100% = "+content.page27.var81.varr.text+" %"; str+="\n 9. Прогиб до образования трещин: f = "+content.page27.var91.varr.text+" мм"; str+="\n 10. Прогиб при разрушении: f = "+content.page27.var101.varr.text+" мм"; var ba:ByteArray = new ByteArray(); ba.writeUTFBytes(str); var fr:FileReference = new FileReference(); fr.save(ba, "Отчёт ЖБК 1.txt"); } } }