悠索

少小离家老大回,乡音无改鬓毛衰。

计数器控件NumbericStepper

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

 

    <mx:Panel title="计数器控件示例" height="50%" width="50%"

...

SWF加载器控件SWFLoader

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

 

    <mx:Panel title="SWF加载器控件示例"  height="90%" width="90%"

...

音像控件VideoDisplay

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

   

...

选色器控件ColorPicker

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

    <mx:Script>

...

警告控件Alert

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Button id="btn" click="showAlert(event)" label="Alert"/>
...

常用的jquery小技巧

$(document).ready(function() {$("#orderedlist > li:last").addClass("blue");//first last取得第一个或者最后一个元素$("li").css("background","red").css("color

jQuery技巧总结

1、关于页面元素的引用

通过jquery的$()引用元素包括通过id、class、元素名以及元素的层级关系及dom或者xpath条件等方法,且返回的对象为jquery对象(集合对象),不能直接调用dom定义的方法。

 

2、jQuery对象与dom对象的转换

只有jquery对象才能使用jquery定义的方法。注意dom对象和jquery对象是有区别的,调用方法时要注意操作的是dom对象还是jquery对象。
普通的dom对象一般可以通过$()转换成jquery对象。
...

设置控件的labelFunction

默认情况下,在Flex 中基于List 的控件都是使用dataProvider 中的元素的label 属性来做显
示。在一些情况中,无论如何,dataProvideer 中都没有label 属性存在,这些情况就需要你
来设定连接dataProvider 中的多个字段来实现一个显示值。这个labelFunction 属性允许用户
定义自己的方法来呼叫dataProvider 中每个元素,然后对于每个元素返回显示值。如下范例,
ComboBox 的labelFunction 属性包含了一个getFullName 函数的引用,这个函数连接了
...

动态填充菜单

使用ActionScript 为MenuBar 控件的dataProvider 属性分配一个Collection 对象(例如
ArrayCollection 或者XMLListCollection)

 

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="initApp(event)">

...

为菜单类控件创建事件处理函数

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">

<mx:MenuBar labelField="@label" itemClick="handleMenuClick(event)">
...

分页:«456789101112131415161718»

Copyright (C) 2008-2010 0451sky.com Inc.,All Rights Reserved.