<-- IE錯誤修正 --> Flash Media Server 加上 JSON 功能 - RiS社群 | FileMaker 中小企業應用



快速發表主題
返回   RiS社群 | FileMaker 中小企業應用 > Adobe (奧多比) > Flash > Adobe Media Server

Adobe Media Server Flash Media Server 影音串流全線產品改名為Adobe Media Server,簡稱AMS並且從第5版開始。目標要在所有裝置上可以安全地用DRM技術播放影音串流。(自2012/10/8發表)
Adobe Media Server簡介
Adobe Media Server最新試用下載


FileMaker 教學 FileMaker 14 教學課程 FileMaker 教學
FileMaker 課程(僅接受公司/單位或1對1專屬教學

輕鬆學會FileMaker
帶你認識FileMaker

FileMaker俱樂部 加入FileMaker獲取官方資訊 FileMaker俱樂部
FileMaker俱樂部

回覆
 
LinkBack 主題工具 顯示模式
  #1 (permalink)  
舊 2010-04-02
qop qop 目前離線
進階會員
 
註冊日期: 2007-10-18
住址: 台灣/台北
文章: 118
微笑 Flash Media Server 加上 JSON 功能

1) 到 http://www.json.org/ 找 ActionScript 1 的版本
2) 修改其中 JSON.error 的部份, 存成 JSON.asc
3) 將檔案放到 /scriptlib 或 application目錄
4) 在 main.asc 裡用「load( "JSON.asc" );」

修改後的 code:
/*
Copyright (c) 2005 JSON.org

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The Software shall be used for Good, not Evil.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

/*
Ported to Actionscript May 2005 by Trannie Carter ,
wwww.designvox.com

Ported to Actionscript 1 May 2006 by Malte Ubl ,
http://joose-js.blogspot.com

2006-11-18: Fixed assumption that an empty string evaluates to false in boolean
context that is wrong in Flash 8 an later.

2007-04-08: Fixed bad behavior with switch statements when publishing to Flash 6 from Flash MX.
Report and Patch by Dan Wich


Updated 2007-04-08

USAGE:
var o = JSON.parse(jsonStr);
var s = JSON.stringify(obj);

// If there is an error, the method calls _root.debug("Error message...")
// Override JSON.error for the desired behaviour

*/

JSON = new Object();
// shinder.lin modified 2009-12-24
JSON.error = function(msg) {
JSON.error_occured = true;
trace(msg);
}

JSON.stringify = function (arg) {
var c, i, l, s = '', v;
JSON.error_occured = false;

switch (typeof arg) {
case 'object':
if (arg) {
if (arg instanceof Array) {
for (i = 0; i < arg.length; ++i) {
v = JSON.stringify(arg[i]);
if (s != '') {
s += ',';
}
s += v;
}
return '[' + s + ']';
} else if (typeof arg.toString != 'undefined') {
for (i in arg) {
v = arg[i];
if (typeof v != 'undefined' && typeof v != 'function') {
v = JSON.stringify(v);
if (s != '') {
s += ',';
}
s += JSON.stringify(i) + ':' + v;
}
}
return '{' + s + '}';
}
}
return 'null';
case 'number':
return isFinite(arg) ? String(arg) : 'null';
case 'string':
l = arg.length;
s = '"';
for (i = 0; i < l; i += 1) {
c = arg.charAt(i);
if (c >= ' ') {
if (c == '\\' || c == '"') {
s += '\\';
}
s += c;
} else {
switch (c) {
case '\b':
s += '\\b';
break;
case '\f':
s += '\\f';
break;
case '\n':
s += '\\n';
break;
case '\r':
s += '\\r';
break;
case '\t':
s += '\\t';
break;
default:
c = c.charCodeAt();
s += '\\u00' + Math.floor(c / 16).toString(16) +
(c % 16).toString(16);
}
}
}
return s + '"';
case 'boolean':
return String(arg);
default:
return 'null';
}
}



JSON.parse = function (text) {
var at = 0;
var ch = ' ';
JSON.error_occured = false;


function error(m) {
JSON.error("JSONError: "+m)
}

function next() {
ch = text.charAt(at);
at += 1;
return ch;
}

function white() {
while (!JSON.error_occured && ch != null) {
if (ch

回覆時引用此篇文章
回覆

主題工具
顯示模式

發表文章規則
不允許您發表新主題
不允許您發表文章
不允許您上傳附件
不允許您編輯自已的文章

開啟 BB 代碼
關閉 HTML 程式碼
Trackbacks are 關閉
Pingbacks are 關閉
Refbacks are 開啟



所有時間均為 +8。現在的時間是 08:34 PM
Powered by vBulletin® 版本 3.7.2
版權所有 ©2000 - 2019,Jelsoft Enterprises Ltd.
Advertisement System V2.6 By   Branden
RiS 社群 ( 感謝正洋資訊顧問有限公司技術指導 ) - 使用3.7.2永久合法版權。
Ad Management by RedTyger



Content Relevant URLs by vBSEO 3.6.0 PL2