何謂ActionScript的 Binding?

我看了三本書,都不太能瞭解 ActionScript的 Binding是什麼意思?

今晚在閱讀文件時,一個非常簡單的範例,就讓我豁然開朗
也來分享給大家。

在Adobe有一個很棒的入門文件,http://livedocs.adobe.com/flex/3/html/index.html

有人願意花時間把他翻譯一下(潤稿、修飾一下),應該就能出一本中文書了。

 

我看了三本書,都不太能瞭解 ActionScript的 Binding是什麼意思?

今晚在閱讀文件時,一個非常簡單的範例,就讓我豁然開朗

也來分享給大家。  請看 -- http://livedocs.adobe.com/flex/3/html/mxml_3.html#189339

 

---------------------------------------------------------------------------------------------------

引述原廠範例,資料如下:

Binding data between components

Flex provides simple syntax for binding the properties of components to each other. In the following example, the value inside the curly braces ({ }) binds the text property of a TextArea control to the text property of a TextInput control. When the application initializes, both controls display the text Hello.

When the user clicks the Button control, both controls display the text Goodbye.

<?xml version="1.0"?>
<!-- mxml/BindingExample.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Panel title="My Application" 
        paddingTop="10" 
        paddingBottom="10"
        paddingLeft="10" 
        paddingRight="10"
    >
        <mx:TextInput id="textinput1" text="Hello"/>
        <mx:TextArea id="textarea1" text="{textinput1.text}"/>

        <mx:Button label="Submit" click="textinput1.text='Goodbye';"/>
    </mx:Panel>
</mx:Application>

 

 

The executing SWF file for the previous example is shown below:

 

不用多說,您實際玩一次就知道。

先在上面的文字輸入方塊,輸入幾個字......注意看畫面,不用按下按鈕....

 

 

The following image shows the application rendered in a web browser window after the user clicks the Submit button:

Application rendered in a web browser window after the user clicks the Submit button

 

簡單的說, ActionScript的 Binding

就有點像AJAX(這是我個人猜測,不保證正確喔~)。

當您直接在A欄位輸入完成,對應的B欄位(有作Binding),資料會立刻轉移過去.......

 

[實作],永遠是瞭解 [真理]的最佳捷徑。

以前寫過一篇文章([給初學者的話] 與其想得太多,不如立刻動手作 ),還真的有道理

 

 

 

補充一下, .NET的DataBinding / 資料繫結/資料綁定,比較一下,有何異同?

 

 

 

 

 

 今日值班正妹:  烏克蘭名模,瑞莎

(這裡有一個網站,有很多照片 -- http://wiselyview.net/blog/read-1419.html

            

       

 

 

我將思想傳授他人, 他人之所得,亦無損於我之所有;

猶如一人以我的燭火點燭,光亮與他同在,我卻不因此身處黑暗。----Thomas Jefferson

線上課程教學,遠距教學 (Web Form 約 51hr)  https://dotblogs.com.tw/mis2000lab/2016/02/01/aspnet_online_learning_distance_education_VS2015

線上課程教學,遠距教學 (ASP.NET MVC 約 135hr)  https://dotblogs.com.tw/mis2000lab/2018/08/14/ASPnet_MVC_Online_Learning_MIS2000Lab

 

寫信給我,不要私訊 --  mis2000lab (at) yahoo.com.tw  或  school (at) mis2000lab.net

 (1) 第一天 ASP.NET MVC5 完整影片(5.5小時 / .NET 4.x版)免費試聽。影片 https://youtu.be/9spaHik87-A 

 (2) 第一天 ASP.NET Core MVC 完整影片(3小時 / .NET Core 6.0~8.0)免費試聽。影片 https://youtu.be/TSmwpT-Bx4I 

[學員感言] mis2000lab課程評價 - ASP.NET MVC , WebForm  。 https://mis2000lab.medium.com/%E5%AD%B8%E5%93%A1%E6%84%9F%E8%A8%80-mis2000lab%E8%AA%B2%E7%A8%8B%E8%A9%95%E5%83%B9-asp-net-mvc-webform-77903ce9680b  


ASP.NET遠距教學、線上課程(Web Form + MVC)。 第一天課程, "完整" 試聽。 

.........   facebook社團   https://www.facebook.com/mis2000lab   ......................

.........  YouTube (ASP.NET) 線上教學影片  https://www.youtube.com/channel/UC6IPPf6tvsNG8zX3u1LddvA/

 

Blog文章 "附的範例" 無法下載,請看 https://dotblogs.com.tw/mis2000lab/2016/03/14/2008_2015_mis2000lab_sample_download

請看我們的「售後服務」範圍(嚴格認定)。

...................................................................................................................................................... 

ASP.NET MVC  => .NET Core MVC 線上教學  ...... 第一天課程 完整內容 "免費"讓您評估 / 試聽

[遠距教學、教學影片] ASP.NET (Web Form) 課程 上線了!MIS2000Lab.主講   事先錄好的影片,並非上課側錄!   觀看時,有如「一對一」面對面講課