Обсуждение Радио в игре с интерфейсом

Статус
В этой теме нельзя размещать новые ответы.
Регистрация
30 Сен 2014
Сообщения
194
Репутация
177
Спасибо
19
Монет
0
есть добровольцы на пересборку Радио WARGAMING.FM автор которого является yaotzinv? Установил себе этот мод

В нём вроде всё ясно. Легко поменял волны радио на свои и клавиши громкости звука, но вот не могу допетрить... ВОЗМОЖНО ЛИ СДЕЛАТЬ ЭТОТ МОД ТАК, ЧТОБ ВОЛНЫ РАДИОСТАНЦИЙ МЕНЯТЬ В ИГРЕ ГОРЯЧИМИ КЛАВАМИ?
или же есть уже более новая сборка мода и более лучше, чем эта?
P.S.:этот мод однако один из лучших, что нашёл на просторах интернета
 
а ты тумблером меняй
или залазь в скрипт флешки и там меняй

и ищи в скрипте флешки Botton,я там видел как можно перебросить с тумблера на кнопку.

package scaleform.clik.controls
{
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import scaleform.clik.constants.*;
import scaleform.clik.core.*;
import scaleform.clik.events.*;
import scaleform.clik.ui.*;
import scaleform.clik.utils.*;
import scaleform.gfx.*;

public class Button extends UIComponent
{

public function Button()
{
this._stateMap = {
"up":["up"],
"over":["over"],
"down":["down"],
"release":["release","over"],
"out":["out","up"],
"disabled":["disabled"],
"selecting":["selecting","over"],
"toggle":["toggle","up"],
"kb_selecting":["kb_selecting","up"],
"kb_release":["kb_release","out","up"],
"kb_down":["kb_down","down"]
};
this.statesDefault = Vector.<String>([""]);
this.statesSelected = Vector.<String>(["selected_",""]);
super();
buttonMode = true;
}

public function set autoSize(arg1:String) : void
{
if(arg1 == this._autoSize)
{
return;
}
this._autoSize = arg1;
invalidateData();
}

public function get focusIndicator() : MovieClip
{
return this._focusIndicator;
}

public function set focusIndicator(arg1:MovieClip) : void
{
this._focusIndicatorLabelHash = null;
this._focusIndicator = arg1;
this._focusIndicatorLabelHash = UIComponent.generateLabelHash(this._focusIndicator);
}

override public function handleInput(arg1:InputEvent) : void
{
if(arg1.isDefaultPrevented())
{
return;
}
var loc1:* = arg1.details;
var loc2:* = loc1.controllerIndex;
var loc3:* = loc1.navEquivalent;
switch(loc3)
{
case NavigationCode.ENTER:
if(loc1.value != InputValue.KEY_DOWN)
{
if(loc1.value == InputValue.KEY_UP)
{
if(this._pressedByKeyboard)
{
this.handleRelease(loc2);
arg1.handled = true;
}
}
}
else
{
this.handlePress(loc2);
arg1.handled = true;
}
break;
}
}

public function clearRepeatInterval() : void
{
if(this._repeatTimer)
{
this._repeatTimer.stop();
this._repeatTimer.reset();
this._repeatTimer.removeEventListener(TimerEvent.TIMER_COMPLETE,this.beginRepeat);
this._repeatTimer.removeEventListener(TimerEvent.TIMER,this.handleRepeat);
this._repeatTimer = null;
}
}

override public function toString() : String
{
return "[CLIK Button " + name + "]";
}

override protected function configUI() : void
{
var loc1:* = undefined;
if(!this.constraintsDisabled)
{
constraints.addElement("textField",this.textField,Constraints.ALL);
}
super.configUI();
tabEnabled = (_focusable) && (this.enabled) && (tabEnabled);
tabChildren = loc1 = false;
mouseChildren = loc1;
addEventListener(MouseEvent.ROLL_OVER,this.handleMouseRollOver,false,0,true);
addEventListener(MouseEvent.ROLL_OUT,this.handleMouseRollOut,false,0,true);
addEventListener(MouseEvent.MOUSE_DOWN,this.handleMousePress,false,0,true);
addEventListener(MouseEvent.CLICK,this.handleMouseRelease,false,0,true);
addEventListener(MouseEvent.DOUBLE_CLICK,this.handleMouseRelease,false,0,true);
addEventListener(InputEvent.INPUT,this.handleInput,false,0,true);
if(!(this._focusIndicator == null) && !_focused && this._focusIndicator.totalFrames == 1)
{
this.focusIndicator.visible = false;
}
}

override protected function draw() : void
{
if(isInvalid(InvalidationType.STATE))
{
if(this._newFrame)
{
gotoAndPlay(this._newFrame);
if(_baseDisposed)
{
return;
}
this._newFrame = null;
}
if((this.focusIndicator) && (this._newFocusIndicatorFrame))
{
this.focusIndicator.gotoAndPlay(this._newFocusIndicatorFrame);
this._newFocusIndicatorFrame = null;
}
this.updateAfterStateChange();
dispatchEvent(new ComponentEvent(ComponentEvent.STATE_CHANGE));
invalidate(InvalidationType.DATA,InvalidationType.SIZE);
}
if(isInvalid(InvalidationType.DATA))
{
this.updateText();
if(this.autoSize != TextFieldAutoSize.NONE)
{
invalidateSize();
}
}
if(isInvalid(InvalidationType.SIZE))
{
if(!this.preventAutosizing)
{
this.alignForAutoSize();
setActualSize(_width,_height);
}
if(!this.constraintsDisabled)
{
if(constraints)
{
constraints.update(_width,_height);
}
}
}
}

protected function addToAutoGroup(arg1:Event) : void
{
if(parent == null)
{
this.group = null;
return;
}
var loc1:* = ButtonGroup.getGroup(this._groupName,parent);
if(loc1 == this.group)
{
return;
}
this.group = loc1;
}

public function get owner() : UIComponent
{
return this._owner;
}

protected function checkOwnerFocused() : Boolean
{
var loc2:* = null;
var loc1:* = false;
if(this.owner != null)
{
loc1 = !(this._owner.focused == 0);
if(loc1 == 0)
{
loc2 = this._owner.focusTarget;
if(loc2 != null)
{
loc1 = !(loc2 == 0);
}
}
}
return loc1;
}

protected function calculateWidth() : Number
{
var loc2:* = null;
var loc1:* = actualWidth;
if(!this.constraintsDisabled)
{
loc2 = constraints.getElement("textField");
loc1 = Math.ceil(this.textField.textWidth + loc2.left + loc2.right + 5);
}
return loc1;
}

protected function alignForAutoSize() : void
{
var loc5:* = undefined;
var loc1:* = NaN;
var loc3:* = NaN;
var loc4:* = NaN;
if(!initialized || this._autoSize == TextFieldAutoSize.NONE || this.textField == null)
{
return;
}
loc1 = _width;
_width = loc5 = this.calculateWidth();
var loc2:* = loc5;
loc5 = this._autoSize;
switch(loc5)
{
case TextFieldAutoSize.RIGHT:
loc3 = x + loc1;
x = loc3 - loc2;
break;
case TextFieldAutoSize.CENTER:
loc4 = x + loc1 * 0.5;
x = loc4 - loc2 * 0.5;
break;
}
}

protected function updateText() : void
{
if(!(this._label == null) && !(this.textField == null))
{
this.textField.text = this._label;
}
}

override protected function changeFocus() : void
{
var loc1:* = null;
if(!this.enabled)
{
return;
}
if(this._focusIndicator != null)
{
if(this._focusIndicator.totalframes != 1)
{
loc1 = "state" + _focused;
if(this._focusIndicatorLabelHash[loc1])
{
this._newFocusIndicatorFrame = "state" + _focused;
}
else
{
this._newFocusIndicatorFrame = (_focused) || (_displayFocus)?"show":"hide";
}
invalidateState();
}
else
{
this._focusIndicator.visible = _focused > 0;
}
if((this._pressedByKeyboard) && !_focused)
{
this.setState("kb_release");
this._pressedByKeyboard = false;
}
}
else
{
this.setState((_focused) || (_displayFocus)?"over":"out");
if((this._pressedByKeyboard) && !_focused)
{
this._pressedByKeyboard = false;
}
}
}

protected function handleMouseRollOver(arg1:MouseEvent) : void
{
var loc1:* = arg1 as MouseEventEx;
var loc2:* = loc1 != null?loc1.mouseIdx:0;
if(arg1.buttonDown)
{
dispatchEvent(new ButtonEvent(ButtonEvent.DRAG_OVER));
if(!this.enabled)
{
return;
}
if((this.lockDragStateChange) && (Boolean(this._mouseDown << loc2 & 1)))
{
return;
}
if((_focused) || (_displayFocus))
{
this.setState(this.focusIndicator != null?"kb_down":"down");
}
else
{
this.setState("over");
}
}
else
{
if(!this.enabled)
{
return;
}
if((_focused) || (_displayFocus))
{
if(this._focusIndicator != null)
{
this.setState("over");
}
}
else
{
this.setState("over");
}
}
}

protected function handleMouseRollOut(arg1:MouseEvent) : void
{
var loc1:* = arg1 as MouseEventEx;
var loc2:* = loc1 != null?loc1.mouseIdx:0;
if(arg1.buttonDown)
{
dispatchEvent(new ButtonEvent(ButtonEvent.DRAG_OUT));
if(Boolean(this._mouseDown & 1 << loc2))
{
if(stage != null)
{
stage.addEventListener(MouseEvent.MOUSE_UP,this.handleReleaseOutside,false,0,true);
}
}
if((this.lockDragStateChange) || !this.enabled)
{
return;
}
if((_focused) || (_displayFocus))
{
this.setState(this._focusIndicator != null?"kb_release":"release");
}
else
{
this.setState("out");
}
}
else
{
if(!this.enabled)
{
return;
}
if((_focused) || (_displayFocus))
{
if(this._focusIndicator != null)
{
this.setState("out");
}
}
else
{
this.setState("out");
}
}
}

protected function handleMousePress(arg1:MouseEvent) : void
{
var loc3:* = undefined;
var loc4:* = null;
var loc1:* = arg1 as MouseEventEx;
var loc2:* = loc1 != null?loc1.mouseIdx:0;
if((loc3 = loc1 != null?loc1.buttonIdx:0) != 0)
{
return;
}
this._mouseDown = this._mouseDown | 1 << loc2;
if(this.enabled)
{
this.setState("down");
if((this.autoRepeat) && this._repeatTimer == null)
{
this._autoRepeatEvent = new ButtonEvent(ButtonEvent.CLICK,true,false,loc2,loc3,false,true);
this._repeatTimer = new Timer(this.repeatDelay,1);
this._repeatTimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.beginRepeat,false,0,true);
this._repeatTimer.start();
}
loc4 = new ButtonEvent(ButtonEvent.PRESS,true,false,loc2,loc3,false,false);
dispatchEvent(loc4);
}
}

protected function handleMouseRelease(arg1:MouseEvent) : void
{
var loc3:* = undefined;
var loc4:* = null;
this._autoRepeatEvent = null;
if(!this.enabled)
{
return;
}
var loc1:* = arg1 as MouseEventEx;
var loc2:* = loc1 != null?loc1.mouseIdx:0;
if((loc3 = loc1 != null?loc1.buttonIdx:0) != 0)
{
return;
}
this._mouseDown = this._mouseDown ^ 1 << loc2;
if(this._mouseDown == 0 && (this._repeatTimer))
{
this._repeatTimer.stop();
this._repeatTimer.reset();
this._repeatTimer.removeEventListener(TimerEvent.TIMER_COMPLETE,this.beginRepeat);
this._repeatTimer.removeEventListener(TimerEvent.TIMER,this.handleRepeat);
this._repeatTimer = null;
}
this.setState("release");
if(_baseDisposed)
{
return;
}
this.handleClick(loc2);
if(!this._isRepeating)
{
loc4 = new ButtonEvent(ButtonEvent.CLICK,true,false,loc2,loc3,false,false);
dispatchEvent(loc4);
}
this._isRepeating = false;
}

protected function handleReleaseOutside(arg1:MouseEvent) : void
{
var loc3:* = undefined;
this._autoRepeatEvent = null;
if(contains(arg1.target as DisplayObject))
{
return;
}
var loc1:* = arg1 as MouseEventEx;
var loc2:* = loc1 != null?loc1.mouseIdx:0;
if((loc3 = loc1 != null?loc1.buttonIdx:0) != 0)
{
return;
}
if(stage)
{
stage.removeEventListener(MouseEvent.MOUSE_UP,this.handleReleaseOutside,false);
}
this._mouseDown = this._mouseDown ^ 1 << loc2;
dispatchEvent(new ButtonEvent(ButtonEvent.RELEASE_OUTSIDE));
if(!this.enabled)
{
return;
}
if(this.lockDragStateChange)
{
if((_focused) || (_displayFocus))
{
this.setState(this.focusIndicator != null?"kb_release":"release");
}
else
{
this.setState("kb_release");
}
}
}

protected function handleRelease(arg1:uint = 0) : void
{
var loc1:* = null;
if(!this.enabled)
{
return;
}
this.setState(this.focusIndicator != null?"kb_release":"release");
if(this._repeatTimer)
{
this._repeatTimer.stop();
this._repeatTimer.reset();
this._repeatTimer.removeEventListener(TimerEvent.TIMER_COMPLETE,this.beginRepeat);
this._repeatTimer.removeEventListener(TimerEvent.TIMER,this.handleRepeat);
this._repeatTimer = null;
}
this.handleClick(arg1);
this._pressedByKeyboard = false;
if(!this._isRepeating)
{
loc1 = new ButtonEvent(ButtonEvent.CLICK,true,false,arg1,0,true,false);
dispatchEvent(loc1);
}
this._isRepeating = false;
}

protected function handleClick(arg1:uint = 0) : void
{
if((this.toggle) && (!this.selected || (this.allowDeselect)))
{
this.selected = !this.selected;
}
}

protected function beginRepeat(arg1:TimerEvent) : void
{
this._repeatTimer.delay = this.repeatInterval;
this._repeatTimer.repeatCount = 0;
this._repeatTimer.removeEventListener(TimerEvent.TIMER_COMPLETE,this.beginRepeat);
this._repeatTimer.addEventListener(TimerEvent.TIMER,this.handleRepeat,false,0,true);
this._repeatTimer.reset();
this._repeatTimer.start();
}

protected function handleRepeat(arg1:TimerEvent) : void
{
if(this._mouseDown == 0 && !this._pressedByKeyboard)
{
this._repeatTimer.stop();
this._repeatTimer.reset();
this._repeatTimer.removeEventListener(TimerEvent.TIMER_COMPLETE,this.beginRepeat);
this._repeatTimer.removeEventListener(TimerEvent.TIMER,this.handleRepeat);
this._repeatTimer = null;
}
if(this._autoRepeatEvent)
{
this._isRepeating = true;
dispatchEvent(this._autoRepeatEvent);
}
}

protected function setState(arg1:String) : void
{
var loc5:* = null;
var loc6:* = 0;
var loc7:* = 0;
var loc8:* = null;
this._state = arg1;
var loc1:* = this.getStatePrefixes();
var loc2:* = this._stateMap[arg1];
if(loc2 == null || loc2.length == 0)
{
return;
}
var loc3:* = loc1.length;
var loc4:* = 0;
while(loc4 < loc3)
{
loc5 = loc1[loc4];
loc6 = loc2.length;
loc7 = 0;
while(loc7 < loc6)
{
loc8 = loc5 + loc2[loc7];
if(_labelHash[loc8])
{
this._newFrame = loc8;
invalidateState();
return;
}
loc7++;
}
loc4++;
}
}

protected function getStatePrefixes() : §Vector.<String>§
{
return this._selected?this.statesSelected:this.statesDefault;
}

protected function updateAfterStateChange() : void
{
if(!initialized)
{
return;
}
if(!(constraints == null) && !this.constraintsDisabled && !(this.textField == null))
{
constraints.updateElement("textField",this.textField);
}
}

override protected function onDispose() : void
{
var loc1:* = null;
this.clearRepeatInterval();
removeEventListener(Event.ADDED,this.addToAutoGroup,false);
removeEventListener(Event.REMOVED,this.addToAutoGroup,false);
removeEventListener(MouseEvent.ROLL_OVER,this.handleMouseRollOver,false);
removeEventListener(MouseEvent.ROLL_OUT,this.handleMouseRollOut,false);
removeEventListener(MouseEvent.MOUSE_DOWN,this.handleMousePress,false);
removeEventListener(MouseEvent.CLICK,this.handleMouseRelease,false);
removeEventListener(MouseEvent.DOUBLE_CLICK,this.handleMouseRelease,false);
removeEventListener(InputEvent.INPUT,this.handleInput,false);
this._owner = null;
this.textField = null;
this.defaultTextFormat = null;
this._focusIndicator = null;
if(this._group)
{
this._group = null;
}
this.statesDefault = null;
this.statesSelected = null;
var loc2:* = 0;
var loc3:* = this._stateMap;
for(loc1 in loc3)
{
delete this._stateMap[loc1];
true;
}
this._stateMap = null;
this._data = null;
super.onDispose();
}

override protected function preInitialize() : void
{
if(!this.constraintsDisabled)
{
constraints = new Constraints(this,ConstrainMode.COUNTER_SCALE);
}
}

override protected function initialize() : void
{
super.initialize();
tabEnabled = true;
}

public function get data() : Object
{
return this._data;
}

public function set data(arg1:Object) : void
{
this._data = arg1;
}

public function get autoRepeat() : Boolean
{
return this._autoRepeat;
}

public function set autoRepeat(arg1:Boolean) : void
{
this._autoRepeat = arg1;
}

override public function get enabled() : Boolean
{
return super.enabled;
}

override public function set enabled(arg1:Boolean) : void
{
var loc1:* = null;
super.enabled = arg1;
mouseChildren = false;
if(super.enabled)
{
loc1 = this._focusIndicator == null && ((_displayFocus) || (_focused))?"over":"up";
}
else
{
loc1 = "disabled";
}
this.setState(loc1);
}

override public function get focusable() : Boolean
{
return _focusable;
}

override public function set focusable(arg1:Boolean) : void
{
super.focusable = arg1;
}

public function get toggle() : Boolean
{
return this._toggle;
}

public function set toggle(arg1:Boolean) : void
{
this._toggle = arg1;
}

protected function handlePress(arg1:uint = 0) : void
{
if(!this.enabled)
{
return;
}
this._pressedByKeyboard = true;
this.setState(this._focusIndicator != null?"kb_down":"down");
if((this.autoRepeat) && this._repeatTimer == null)
{
this._autoRepeatEvent = new ButtonEvent(ButtonEvent.CLICK,true,false,arg1,0,true,true);
this._repeatTimer = new Timer(this.repeatDelay,1);
this._repeatTimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.beginRepeat,false,0,true);
this._repeatTimer.start();
}
var loc1:* = new ButtonEvent(ButtonEvent.PRESS,true,false,arg1,0,true,false);
dispatchEvent(loc1);
}

public function set owner(arg1:UIComponent) : void
{
this._owner = arg1;
}

public function get state() : String
{
return this._state;
}

public function get selected() : Boolean
{
return this._selected;
}

public function set selected(arg1:Boolean) : void
{
var loc1:* = false;
if(this._selected == arg1)
{
return;
}
this._selected = arg1;
if(this.enabled)
{
if(_focused)
{
if((this._pressedByKeyboard) && !(this._focusIndicator == null))
{
this.setState("kb_selecting");
}
else
{
this.setState("selecting");
}
}
else
{
this.setState("toggle");
}
if(this.owner)
{
loc1 = this._selected && !(this.owner == null) && this.checkOwnerFocused();
this.setState((loc1) && this._focusIndicator == null?"selecting":"toggle");
displayFocus = loc1;
}
}
else
{
this.setState("disabled");
}
validateNow();
dispatchEvent(new Event(Event.SELECT));
}

public function get group() : ButtonGroup
{
return this._group;
}

public function set group(arg1:ButtonGroup) : void
{
if(this._group != null)
{
this._group.removeButton(this);
}
this._group = arg1;
if(this._group != null)
{
this._group.addButton(this);
}
}

public function get groupName() : String
{
return this._groupName;
}

public function set groupName(arg1:String) : void
{
if((_inspector) && arg1 == "")
{
return;
}
if(this._groupName == arg1)
{
return;
}
if(arg1 == null)
{
removeEventListener(Event.ADDED,this.addToAutoGroup,false);
removeEventListener(Event.REMOVED,this.addToAutoGroup,false);
}
else
{
addEventListener(Event.ADDED,this.addToAutoGroup,false,0,true);
addEventListener(Event.REMOVED,this.addToAutoGroup,false,0,true);
}
this._groupName = arg1;
this.addToAutoGroup(null);
}

public function get label() : String
{
return this._label;
}

public function set label(arg1:String) : void
{
if(this._label == arg1)
{
return;
}
this._label = arg1;
invalidateData();
}

public function get autoSize() : String
{
return this._autoSize;
}

public var lockDragStateChange:Boolean = false;

public var repeatDelay:Number = 500;

public var repeatInterval:Number = 200;

public var constraintsDisabled:Boolean = false;

public var allowDeselect:Boolean = true;

public var preventAutosizing:Boolean = false;

protected var _toggle:Boolean = false;

protected var _label:String;

protected var _state:String;

protected var _groupName:String;

protected var _selected:Boolean = false;

protected var _data:Object;

protected var _autoRepeat:Boolean = false;

protected var _autoSize:String = "none";

protected var _pressedByKeyboard:Boolean = false;

protected var _isRepeating:Boolean = false;

protected var _owner:UIComponent = null;

protected var _stateMap:Object;

protected var _newFrame:String;

protected var _newFocusIndicatorFrame:String;

protected var _repeatTimer:Timer;

protected var _mouseDown:int = 0;

protected var _focusIndicatorLabelHash:Object;

protected var _autoRepeatEvent:ButtonEvent;

public var textField:TextField;

public var defaultTextFormat:TextFormat;

protected var _focusIndicator:MovieClip;

protected var _group:ButtonGroup;

protected var statesDefault:Vector.<String>;

protected var statesSelected:Vector.<String>;
}
}
 
Последнее редактирование:
BadBoy78,было бы всё так просто как и раньше... Буду честен, я не разбираюсь в скрипте. Но буду очень благодарен, если ты поможешь :) И не только я один, многие хотели бы переключать радио в бою, а не только в ангаре.
 
радио

собрал радио. Теперь там радио рекорд, радио Гоп-фм, даб радио, радио рекордРус, русХит. И звук теперь регулируется не кнопками F10-F11, а клавишами дополнительной клавы минус(-) и плюс(+) Единственная проблема, я не разбираюсь в скриптах, чтоб менять волны не с тумблера, а с кнопки.:sad-crying:
Помогите пожалуйста :please.gif:


в этой версии радио рекорд, гоп-фм, дабСтеп, RNB, и web-gothic
 
Последнее редактирование:
yaotzinv отказывается помагать в изменении скрипта. Есть кто-нибудь, кому интересна моя тема? Есть те кто разбирается в этом?
 
хотелось бы увидеть хоть один работающий мод. Ни где нету радио или ещё что-либо. Может кто-нибудь сделает? :)
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху