SkepticalFox 1,445 #410694 Posted November 6, 2017 В 05.11.2017 в 14:47, alphasave1 сказал: I want to display Scroll Bar in DropDownMenu. Quote Share this post Link to post Short link Share on other sites
alphasave1 4 #410695 Posted November 6, 2017 1 minute ago, SkepticalFox said: I met a bug like the one above. Quote Share this post Link to post Short link Share on other sites
alphasave1 4 #410884 Posted November 8, 2017 How do I get the value selected by DropdownMenu? Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #410916 Posted November 8, 2017 8 часов назад, alphasave1 сказал: How do I get the value selected by DropdownMenu? Use selectedIndex and dataProvider Quote Share this post Link to post Short link Share on other sites
alphasave1 4 #410919 Posted November 8, 2017 7 minutes ago, SkepticalFox said: Use selectedIndex and dataProvider Is it a correct usage? var _loc_ = this.ddMenu.dataProvider[this.ddMenu.selectedIndex]; Quote Share this post Link to post Short link Share on other sites
18ko 0 #413602 Posted December 1, 2017 А где есть гайд для чайников, по Awesomium? Возникает вопрос, где должен быть код и как его компилировать. Quote Share this post Link to post Short link Share on other sites
BeJIuKuu_TaHKoBbIu_BouH 4 #433457 Posted June 14, 2018 (edited) <del> Edited June 15, 2018 by BeJIuKuu_TaHKoBbIu_BouH Quote Share this post Link to post Short link Share on other sites
lorkan666 0 #446422 Posted December 6, 2018 Hello, First of all sorry for english but i am using google.translator for this page. I dont know Flash and AS3 to good but im programming in few other languages. In net.wg.gui.lobby.battleResults.BattleResult.as there are two components named "tabs_mc" and "view_mc" by default setted to null. public class BattleResults extends BattleResultsMeta implements IBattleResultsMeta { public var tabs_mc:ButtonBarEx = null; public var view_mc:ViewStack = null; But i dont see any code for creation this components. Can anyone tell me how and where are theye created? My goal is to create Tab panel and ViewStack like in battleResult window. Greetings Quote Share this post Link to post Short link Share on other sites
GPCracker 2,088 #446425 Posted December 6, 2018 44 minutes ago, lorkan666 said: But i dont see any code for creation this components. They are created in Adobe Flash. This class is used as an element class (not directly usually, but through inheritance with an additional class in root namespace compiled in flash file with element itself) and is a descendant of MovieClip or Sprite trough a long chain of inheritance. Quote Share this post Link to post Short link Share on other sites
lorkan666 0 #446426 Posted December 6, 2018 Thank you for quick reply, very clear answer. One more thing, are names "tabs_mc" and "view_mc" have any role in Adobe Flash program? Im trying to understand how "linkage" works and i quess this names are exactly this? Also, is any way to instatiate them via AS3 code like other controls in this Topic? I believe im trying understand how to make own skin for controls to prevent loading all SWFs. Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #446428 Posted December 6, 2018 @lorkan666 look at the battleResults.swf with JPEXS Free Flash Decompiler. Quote Share this post Link to post Short link Share on other sites
lorkan666 0 #446429 Posted December 6, 2018 I got JPEXS but how i see i just dont know how to use it. Thank You its exactly what was i need. Quote Share this post Link to post Short link Share on other sites
GPCracker 2,088 #446460 Posted December 7, 2018 13 hours ago, lorkan666 said: One more thing, are names "tabs_mc" and "view_mc" have any role in Adobe Flash program? Of course they are. Definition of these attributes for a class instance is nothing else than making a placeholder for real sub-objects created in Adobe Flash. Sub-objects (named children) in Adobe Flash have their names that match var names in class definition. These variables (attributes) are always public. They (sub-objects) are also inaccessible by their names without these declarations, so in most cases variables (attributes) are declared, but leaved undefined or preset to null. Most public attributes that preset to null are named children or DAAPI entities. DAAPI is the Direct Access API, it is used for linking Python and ActionScript, more information could be found here (examples are outdated, but structural information is still actual). 13 hours ago, lorkan666 said: Also, is any way to instatiate them via AS3 code like other controls in this Topic? Objects created in Adobe Flash is already instantiated as a single copy. The only way to get a copy is to make a copy... but I don`t know if it is possible at all (without copying object in Adobe Flash). 13 hours ago, lorkan666 said: I believe im trying understand how to make own skin for controls to prevent loading all SWFs. If you want to replace something you gotta replace it directly, that means you have to edit an existing flash file. To add something in most cases it is enough to add an external flash document with the injection code. ActionScript (unlike Python) is not monkey-patch-friendly, so it is really hard to replace any object in run-time, sometimes possible of course but done a real tricky way hard to understand even for advanced ActionScript coders. Quote Share this post Link to post Short link Share on other sites
Ekspoint 2,122 #447854 Posted December 30, 2018 а как повесить иконку на кнопку как тут http://prntscr.com/m1a754 Quote Share this post Link to post Short link Share on other sites
Saxep 0 #481964 Posted May 5, 2020 Приветствую всех. @SkepticalFoxТы не мог бы слегка освежить и дополнить информацию из этого поста для начинающих, как я? Библиотеки каким-то чудом были найдены на битбакете, но при пошаговом повторении возникла проблема. Буду рад, если кто подскажет в чем проблема Main.as package { import flash.display.Sprite; import flash.events.Event; public class Main extends Sprite { private var tw : TestWindow public function Main() { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); // entry point tw = new TestWindow(); } } } TestWindow.as package { import net.wg.infrastructure.base.AbstractWindowView; import net.wg.gui.components.controls.SoundButton; import flash.text.*; public class TestWindow extends AbstractWindowView { private var soundButtonOk : SoundButton; private var soundButtonCancel : SoundButton; private var textFieldTest : TextField; public function TestWindow() { super(); } override protected function onPopulate() : void { super.onPopulate(); width = 600; height = 400; window.title = "Test Window"; textFieldTest = new TextField(); textFieldTest.width = 590; textFieldTest.height = 360; textFieldTest.x = 5; textFieldTest.y = 0; textFieldTest.multiline = true; textFieldTest.selectable = false; textFieldTest.defaultTextFormat = new TextFormat("$FieldFont", 10, 0xFFFFFF); textFieldTest.text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."; addChild(textFieldTest); soundButtonOk = addChild(App.utils.classFactory.getComponent("ButtonNormal", SoundButton, { width: 100, height: 25, x: 195, y: 365, label: "Ok" })) as SoundButton; soundButtonCancel = addChild(App.utils.classFactory.getComponent("ButtonNormal", SoundButton, { width: 100, height: 25, x: 305, y: 365, label: "Cancel" })) as SoundButton; } } } Смущает однако, что после компиляции .swf с моим классом пустой, и собственно, при запуске я кнопочек не вижу. Может кто дать наводку? Quote Share this post Link to post Short link Share on other sites
Ekspoint 2,122 #481965 Posted May 5, 2020 7 минут назад, Saxep сказал: Приветствую всех. @SkepticalFoxТы не мог бы слегка освежить и дополнить информацию из этого поста для начинающих, как я? Библиотеки каким-то чудом были найдены на битбакете, но при пошаговом повторении возникла проблема. Буду рад, если кто подскажет в чем проблема Main.as package { import flash.display.Sprite; import flash.events.Event; public class Main extends Sprite { private var tw : TestWindow public function Main() { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); // entry point tw = new TestWindow(); } } } TestWindow.as package { import net.wg.infrastructure.base.AbstractWindowView; import net.wg.gui.components.controls.SoundButton; import flash.text.*; public class TestWindow extends AbstractWindowView { private var soundButtonOk : SoundButton; private var soundButtonCancel : SoundButton; private var textFieldTest : TextField; public function TestWindow() { super(); } override protected function onPopulate() : void { super.onPopulate(); width = 600; height = 400; window.title = "Test Window"; textFieldTest = new TextField(); textFieldTest.width = 590; textFieldTest.height = 360; textFieldTest.x = 5; textFieldTest.y = 0; textFieldTest.multiline = true; textFieldTest.selectable = false; textFieldTest.defaultTextFormat = new TextFormat("$FieldFont", 10, 0xFFFFFF); textFieldTest.text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."; addChild(textFieldTest); soundButtonOk = addChild(App.utils.classFactory.getComponent("ButtonNormal", SoundButton, { width: 100, height: 25, x: 195, y: 365, label: "Ok" })) as SoundButton; soundButtonCancel = addChild(App.utils.classFactory.getComponent("ButtonNormal", SoundButton, { width: 100, height: 25, x: 305, y: 365, label: "Cancel" })) as SoundButton; } } } Смущает однако, что после компиляции .swf с моим классом пустой, и собственно, при запуске я кнопочек не вижу. Может кто дать наводку? Питон часть мимо пропуслили видимо Quote Share this post Link to post Short link Share on other sites
Saxep 0 #481967 Posted May 5, 2020 (edited) Тема с питоном как-то не очевидна мне. 1. Я не понял нужно ли его скомпилировать? 2. Где взять библиотеки? 3. Куда надобно его разместить? 4. FlashDevelop не дает возможности увидеть форму (отрисованные кнопки хотя бы)? я полагал, что питон отвечает за непосредственную обработку кода, вызванного хендлерами .as. Это не так? Edited May 5, 2020 by Saxep Quote Share this post Link to post Short link Share on other sites
yinx2002 0 #513952 Posted January 10, 2022 I have done what previous example of adding form button checkbox with tooltip to the game hangar. They really work , to me , a novice modder , this is a very exciting step. So thanks to all person shared the code in previous post. or I now want to show a custom pannel in which I can add backgroud image , text or so , how could I? I've dig a lot of python flash works in the game scripts.pkg but still can not figure it out. Can anyboy help me? Quote Share this post Link to post Short link Share on other sites
SkepticalFox 1,445 #513954 Posted January 10, 2022 (edited) @yinx2002 IIRC you should use AbstractView instead of AbstractWindowView. There may be a problem with the focus of your component, here is described how to fix it: https://kr.cm/f/t/32840/c/337706/ (https://gitlab.com/xvm/xvm/-/blob/master/src/xfw_actionscript/xfw/com/xfw/XfwView.as) Edited January 10, 2022 by SkepticalFox Quote Share this post Link to post Short link Share on other sites
yinx2002 0 #513973 Posted January 10, 2022 @SkepticalFox Thank you very much for swiftly reply. I've tried to use AbstractView , but can not managed to use correct class on both python and actionscript side, the class name in python should be the same in the actionscript ? Is this the rule? I remember I could only find AbstractView in net.wg.* but could not find it in python code( only class with "meta" was found), and should I use ViewSettings or ComponentSettings ? Is the above link use XFW ? Quote Share this post Link to post Short link Share on other sites