- [原创]鼠绘技巧
- [原创]TextFormat类的问题
- 关于延迟的实现(讨论)
- [原创]with语句指向自身的小办法
- [原创]闲扯一些Flash小技巧
- [原创]全局变量让你告别繁琐的路径
- Depth小提示
- [原创]superBreak插件制作完成+心得更新
- [原创]JSFL中比较有用的几个方法
- [原创]mcloader的简单用法
- [原创]with语句的一系列实验
- [原创+整理]进一步了解Flash坐标机制[更新]
- [原创]Flash第三方软件与Flash的完美结合
- [原创经验]谈MC的instanceName
- [原创]论过渡技术 (smoothExchangeSkills)
- [技术]原创-完美的loading-完美到底[基础]
- [原创]Flash投票系统(Updated@0309)
- 让人心烦的安全性
- External Interface API 学习笔记
- Thoughts without Flash (作品)
- [原创]广州行记 - II(项目篇)+后记
- [提示]一个细节 1+1 = 11 ~~ ??
- [Blog接力]Flash8最让我喜爱的5个特性
- [原创]白云Banner
- [荣幸+分享]v2005被推荐到ChinaUI了|此外带来一首好歌
- FlashRIA-应用 涂鸦贺卡
- [Update]双层XML导航栏,Fla源文件,HTML演示文件打包
- [转载]prototype属性和ASSetPropFlags琐碎
- 文本获取焦点 Selection vs FocusManager
- 近期使用 curveTo 一些问题,一些想法
- 近日忙于它事,抽空做一Flash供MGer一乐
- 有幸以评委身份出席计算机协会Flash比赛
- 看到N久以前自己的Flash作品有感
- 思考一个问题·FlashAS效率的问题
- [原创]bitmap in Flash != perfect
- 很久以前根据静态jpg做的一个动画
- [原创翻译]Flash的代码优化
- [原创]两个Flash特效
- [转载]Flash不能直接操纵线程真不爽
- [引用+原创]如何做好一个多人配合的flash项目
- [原创]按钮精密逻辑控制[须配合tween类]
- [转载]flash中可以使用的HTML标签[有用]
- [原创]Flash中动态HTML文本显示中文的问题
- 整理一篇非常好的文章。
- 原创经验-坐标非整数时的像素化
- 考虑翻译几个经典的Flash英文文章
- 评国内Flash门户站点的发展
- 本站首页测试,有时间的朋友请帮帮我,谢谢
- Flash中档次开发常见问题[陆续补充,欢迎跟帖]
- [原创]国内的Flash牛人
- [讨论/疑惑]一个困惑了我很久的mask问题(已经解决)
- 用FlashCS3开发透明的AIR(Apollo)应用
- gotoAndLearn.com的Flash视频教程全套下载公布
- 创建基于Flash技术弹性布局的Web应用程序
- 同一屋檐下的较量与共存 - WPF vs/and Flash
- FlashEngine for SVG
- 猜心术 ~ 忒神了……还是我头晕了
- [酷站]一个不用点鼠标就可以浏览的网站
- 状态机-简单、重要、高可应用性的思想
- 记录被各大网站收藏的原创文章
- 由Flash中的异步、同步联想到setInterval的一些用法。
- 理性思考Flash与Ajax相关问题[原创]
- 推荐-复杂富文本开源项目@OSFLASH.org
- 背叛时间轴·突破IDE
- [技术]原创-完美的loading-完美到底[减负]
- [技术]原创-完美的loading-完美到底[利器]
- 积累:SDK/API等相关知识
- 项目进行中的一点体会[原创]
- Flash做的操作系统
- 到武汉之后的一点交待
- [酷站+原创瞎掰]全世界最长的网站+awDIY-RIA
- [原创]论网络道德 II
- 两篇呼吁保留Fireworks的文章[原创翻译]
- 双周小结(附送一些信息)
- 安全性……安全性
- 10月随笔
- [原创]给白云的MG版做的进站
- Google大预言(flash版)
- [讨论]Flash8中的强选取 vs Flash7中的弱选取
- [分享]Flash右键下载绿色插件
- [转载]Flash杀手!微软Sparkle即将露面(2文)
- 广州行记 - I
- FlashEarth|吐血推荐
- MX2k4的bug问题[zz from xfykzz's blog]
- [原创]凡是编程的朋友都可考虑调整一下
- [原创]Webservice使用实例2则 - 各地天气预报|各国货币转换
- setInterval vs onEnterFrame!!
- 什么是dpi?[积累]
- 看到Zas的新Player的一点畅想
- 安装了MM Flashplayer8beta
- 课设基本done
- 01的师兄走好!
- 图标设计 for TC团队
- 一年前……
- [荣幸]被FlashK加入收藏了,荣幸
- [原创]made for BYHHBlog
- [原]胡言乱语
- [原创翻译]如何保护swf文件不被反编译软件破解?
- [原创翻译]一篇评判MM被Adobe收购的很有争议的文章
- [原创]物理像素·逻辑像素图解
- [原创]JSFL-BreakApart-请高手批评
- [原创扯淡]中庸·思考
- 计算机·人生·扯淡
- [原创]粒子特效(两种不同的实现)
- 药 · 随便扯淡
- [原创]饮水思源
- [收集]QQ的一些变态技术,呵呵经典啊!
- 尊重你的trace()
- [原创]牛人
- actionscripting vs. “real” programming
- 偶遇Color类
- 代码的艺术
- Flash在XML加载方面还是感觉挺迟钝的啊!
- 关于首页的flash的问题
- [原创]三月的雪,送走我的似水流年。
- [收集整理]Macromedia认证 详情
- zz怎样做一个优秀的软件模型设计者
- [原创]Alexa高校访问排名
- 继续关注 Flash的效率性,稳定性
- 困扰在一个细节问题中
- 今天blog出了很奇怪的问题
- 到处行走,却离不开网络[幻想]
- 要热爱新的技术
- [原创·积累]-娇贵的遮罩
- 看看人家是怎么“闪”的
- 鄙人鄙站
- 再会仙剑
- sex - 偶们谈“性”色不变~
- 交友+视频交友
- 流量稳步上涨的总结与分享
- 提高Blog初期访问量的5个必备因素
Flash中如何用asp、XML读取Blog中的信息。
我自己的成果,由于我也是刚刚接触这部分的技术,高手多多批评,新人多多学习:)
注释用英文写的,总觉着代码里头加点中文有点别扭。:)呵呵
最终效果可以见 http://www.awflasher.com的2005版
第一部分:负责设置按钮事件,大家可以讨论、切磋一下逻辑事件的设置,事件的(伪)重载等等
aw注:所谓“(伪)重载”是我自己构造的一个概念,其实就是在某一个事件发生后,重定义另一个出发事件。
// Let the Timeline stop
#include "mc_tween2.as"
// use the Tween Prototype , special thanks to www.moock.org
textBlog.onRollOver = function() {
this.tagb.tag.colorTo(0xffffff, 0.5, "linear");
//use colorTo of "tween Prototype" to define the Buttons Events_Style;
};
textBlog.onRollOut = flashBlog.onRollOut=function () {
this.tagb.tag.colorTo(null, 0.5);
// use colorTo of "tween Prototype" to define the Buttons Events_Style;
};
textBlog.onRelease = function() {
//---HINT-------Here is the begin
onRelease ---------////////////////
//test If the UIFranme_MC exists
//trace(UIFrame_MC);
if (UIFrame_MC != undefined) {
UIFrame_MC.buttom_Bar.gotoAndPlay(1);
//If the Buttom_bar does exist , and we the user is visiting the "textBlog" , let it out
}
choice = true;
//the Boolen typed-var 'choice' stands for the user are visiting the "textBlog"(True) or "flashBlog"(False)
this._parent.flashBlog.tagb.tag.colorTo(null, 0.5);
this.onRollOut = this.onReleaseOutside=function () {
this.tagb.tag.colorTo(0xffffff, 0.5, "linear");
// when onRelease(d) , the button should not be fade/disable.
};
this._parent.flashBlog.onRollOut = this._parent.flashBlog.onReleaseOutside=function () {
this.tagb.tag.colorTo(null, 0.5);
};
this.tween(["_x", "_y", "_xscale", "_yscale"], [60, 300, 60, 60], 1);
//make the button move to its own place
this._parent.flashBlog.tween(["_x", "_y", "_xscale", "_yscale"], [100, 440, 50, 50], 1);
//make the other button move to its own place
this._parent.gotoAndStop("textBlog");
//---HINT-------Here is the end of onRelease ---------////////////////
};
//Here is the action for the 2nd button ^_^
flashBlog.onRollOver = function() {
this.tagb.tag.colorTo(0xffffff, 0.5, "linear");
};
flashBlog.onRollOut = flashBlog.onReleaseOutside=function () {
this.tagb.tag.colorTo(null, 0.5);
};
flashBlog.onRelease = function() {
//test If the UIFranme_MC exists
//trace(UIFrame_MC);
if (UIFrame_MC != undefined) {
UIFrame_MC.buttom_Bar.gotoAndPlay("startHide");
//If the Buttom_bar does exist , and we the user is visiting the "flashBlog" , kill it(for it is for the "textBlog"
}
choice = false;
//the Boolen typed-var 'choice' stands for the user are visiting the "textBlog"(True) or "flashBlog"(False)
this._parent.textBlog.tagb.tag.colorTo(null, 0.5);
this.onRollOut = this.onReleaseOutside=function () {
this.tagb.tag.colorTo(0xffffff, 0.5, "linear");
};
this._parent.textBlog.onRollOut = this._parent.textBlog.onReleaseOutside=function () {
this.tagb.tag.colorTo(null, 0.5);
};
this.tween(["_x", "_y", "_xscale", "_yscale"], [60, 300, 60, 60], 1);
//make the button move to its own place
this._parent.textBlog.tween(["_x", "_y", "_xscale", "_yscale"], [100, 440, 50, 50], 1);
//make the other button move to its own place
this._parent.gotoAndStop("flashBlog");
};[/quote]第二部分:这一部分负责调度XML,我刻意加入了一个缓冲loading效果
// Make the timeline stop
loader.onLoad = function() {
this._width = 0;
};
loader._width = 0;
//preset the loader-bar to 0(for we didn't start loading XML yet ^_^)
per = "0%";
//per is the hint-text
hintText.text = "Connecting...";
//Now we are gonna connect the XML source
linkArray = new Array();
titleArray = new Array();
catelogArray = new Array();
pubDateArray = new Array();
//We are using the four arrays to store the XML data
myXml = new XML();
myXml.ignoreWhite = true;
myXml.load("http://www.awflasher.com/blog/awrss.asp");
//get our XML now
this.createEmptyMovieClip("tracer", 888);
//the temp-MC is used to trace the loading-presentage
tracer.onEnterFrame = function() {
picGL = 100*myXml.getBytesLoaded()/myXml.getBytesTotal();
//use an onEnterFrame to check the precentage
};
myXml.onLoad = function(success) {
if (success) {
loader.onEnterFrame = function() {
//-----Here begin our detecting (of progress)-------
//
this._width += (this._parent.picGL-this._width)/2;
// make a smooth loading to let the user know something^.^
per = this._width+"%";
var logA:Boolean = (this._parent.picGL == 100);
//if Loaded, logA is true
if (logA && this._width>99) {
// only By detecting the width of loading-bar is not enough , we need to detect the "logA"
per = "100%";
this._width = 100;
//make them ok
hintText.text = "Loaded";
delete tracer.onEnterFrame;
delete this.onEnterFrame;
//delete the 2 onEnterFrames in order to cancel the memories they applied.
} else {
hintText.text = "Receiving data";
}
//-----Here end our detecting (of progress)-------
};
loadXml();
//now , parse our XML
} else {
hintText.text = "Connecting...";
// if not ready , still connecting :(
}
};
getBlogItem = new Array();
getLink = new Array();
getTitle = new Array();
getCatelog = new Array();
getPubDate = new Array();
function loadXml() {
for (var itemID = 0; itemID<10; itemID++) {
// This is my-modified-RSS-tree, not the usual RSS//
// Now we are getting the information into the arrays//
getBlogItem[itemID] = myXml.childNodes[0].childNodes[itemID];
getLink[itemID] = getBlogItem[itemID].childNodes[0].childNodes[0];
getTitle[itemID] = getBlogItem[itemID].childNodes[1].childNodes[0];
getCatelog[itemID] = getBlogItem[itemID].childNodes[2].childNodes[0];
getPubDate[itemID] = getBlogItem[itemID].childNodes[3].childNodes[0];
var BCnm = "BlowCate_txt"+itemID;
var BTnm = "BlowTitle_txt"+itemID;
var BPnm = "BlowPT_txt"+itemID;
var LKnm = "BlowPT_mc"+itemID;
this.textBlog_mc[BCnm].text = getCatelog[itemID];
this.textBlog_mc[BTnm].text = getTitle[itemID];
this.textBlog_mc[BPnm].text = getPubDate[itemID];
this[LKnm].awct.awlk = this.getLink[itemID];
this[LKnm].awct.onRelease = function() {
getURL(this.awlk, "_blank");
aaab.text = this.awlk;
// set the link
};
}
}



分享到做啥


我来学习。还是中文好,看e文有点晕,不过正在强迫自己不晕。大概看了一下,不过还是不明白逻辑事件指的是?
主要就是按钮的一些响应,xml的响应.等等
没仔细看, 这个错了吧,onload好象是加载完了才触发
myXml.onLoad = function(success) {
if (success) {
loader.onEnterFrame = function() {
//-----Here begin our detecting (of progress)-------
//
this._width += (this._parent.picGL-this._width)/2;
// make a smooth loading to let the user know something^.^
per = this._width+"%";
var logA:Boolean = (this._parent.picGL == 100);
//if Loaded, logA is true
if (logA && this._width>99) {
// only By detecting the width of loading-bar is not enough , we need to detect the "logA"
per = "100%";
容我下午去办公室看看。。。。
关于xml的加载 我的确不熟悉,多谢n兄弟提醒,哈哈!!