首页 > 其他分享 >flex按钮任意拖动

flex按钮任意拖动

时间:2023-03-05 10:05:33浏览次数:35  
标签:function flex srcArr 拖动 void SrcLs 按钮 true event


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#D99191">
<mx:Array id="coffeeArray">
</mx:Array>
<mx:Script>
<![CDATA[
// 按钮控件任意拖动
private function startMove(event:Event):void{
Sprite(event.target).startDrag();
}
private function stopMove(event:Event):void{
Sprite(event.target).stopDrag();
}
internal function InitLs():void
{
var srcArr:Array = new Array();
srcArr.push("China Soft");
srcArr.unshift("BOCO");
srcArr.unshift("PCCW");
SrcLs.dataProvider = srcArr;
var desArr:Array = new Array("PM", "PL", "SE");
DesLs.dataProvider=desArr;


}

// 控件拖拽效果
internal function MovLs():void
{
SrcLs.dragEnabled = true;
SrcLs.dropEnabled = true;
SrcLs.allowMultipleSelection = true;
DesLs.dragEnabled = true;//
DesLs.dropEnabled = true;
var testDebStr:String = new String("Drag Success");
}
]]>
</mx:Script>
<mx:List x="111" y="92" height="282" id="SrcLs" width="200"></mx:List>
<mx:List x="568" y="92" height="282" id="DesLs" width="200"></mx:List>
<mx:Button x="334" y="123" label="初始化" width="167" click="InitLs()"/>
<mx:Button x="334" y="193" label="拖拽效果" width="167" click="MovLs()"/>
<mx:Button x="334" y="282" label="可以拖动" width="167" id="MLable" mouseDown="startMove(event)" mouseUp="stopMove(event)"/>
</mx:Application>


flex按钮任意拖动_List

标签:function,flex,srcArr,拖动,void,SrcLs,按钮,true,event
From: https://blog.51cto.com/u_15990596/6101103

相关文章

  • flex控件拖拽效果
    <?xmlversion="1.0"encoding="utf-8"?><mx:Applicationxmlns:mx="http://www.adobe.com/2006/mxml"layout="absolute"backgroundColor="#D99191"><mx:Arrayid="coffee......
  • flex显示列表数据
    <?xmlversion="1.0"encoding="utf-8"?><mx:Applicationxmlns:mx="http://www.adobe.com/2006/mxml"layout="absolute"backgroundColor="#D99191"><mx:Arrayid="coffee......
  • flex点击弹出警告
    <?xmlversion="1.0"encoding="utf-8"?><mx:Applicationxmlns:mx="http://www.adobe.com/2006/mxml"layout="absolute"><mx:Script><![CDATA[importmx.controls.A......
  • flex计算器
    <?xmlversion="1.0"encoding="utf-8"?><mx:Applicationxmlns:mx="http://www.adobe.com/2006/mxml"layout="absolute"><mx:Script><![CDATA[//相加函数internal......
  • html 按钮
    1<html>2<head>3<metacharset="utf-8">4<title>Minecraft皮肤库</title>5<linkrel="stylesheet"href="bootstrap.min.css">6<scrigtsrc="jquery.min......
  • 按钮2
    <html><head><title>hikuf</title><metacharset="utf-8"><linkrel="stylesheet"href="bootstrap.min.css"><scriptsrc="jquery.min.js"></script><scriptsrc="b......
  • tailwindcss封装一个按钮
    templatetag<template><button:class="classes"><slot:iconSizeClasses="iconSizeClasses"/></button></template>scripttag<scriptsetup>......
  • [前端] html和原生js实现鼠标拖动和触摸拖动以及点击后跟随鼠标移动
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>悬浮窗拖动点击事件</title><style>div{width:100px;......
  • 多种按钮风格
    按钮风格1<divclass="button1"><span>立即下载</span></div><style>.button1{width:200px;height:46px;line-height:46px;background......
  • 《Ext JS 6.2实战》一书上传按钮的问题
    近日,有热心读者发邮件给我说上传按钮有bug,第一次打开上传按钮时,可以打开文件选择对话框,当打开第二个视图时,就不能打开文件选择对话框了。经研究,发现是创建​​plupload.Uplo......