flex嵌入到html和html嵌入到flex
flex嵌入到html:
用swfobject,下载的.js地址:http://www.adobe.com/devnet/activecontent/articles/devletter.html
在你的 HTML 页面头部<head>区嵌入这个脚本文件:<script type="text/javascript" src="swfobject.js"></script>
在你的 HTML 中写一个用来放 Flash 的容器,比如<div>,并随便给一个 id 比如 flashcontent。然后在里面放上你的替换内容。
<div id="flashcontent">
这里放替换内容,用来在 Flash 无法显示时显示。
</div>
使用脚本替换这个内容:
<mce:script type="text/javascript"><!--
var so = new SWFObject("movie.swf", "mymovie", "200", "100", "7", "#336699");
//参数意思: 地址,Flash 的 id(不是容器的 id),宽,高,版本需求,背景颜色
//这是最基本的,如果你要高级的设置,就仔细翻翻说明吧。
so.write("flashcontent");
// --></mce:script>
这脚本可以写在 HTML 中也可以写在外部 .js 文件中。
html嵌入到flex
找到一个flex的iframe自定义类,比较好用,请访问http://code.google.com/p/flex-iframe/
首先从上面的网址下载iframe包
解压,找到IFrameDemo\src\IFrame.as
复制到你自己的src里
在需要用的mxml中加入xmlns:local="*"(local)
Xml代码
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()" xmlns:local="*">
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()" xmlns:local="*">
需要用的的地方
Xml代码
<local:IFrame id="iFrame" source="http://www.favzone.com" width="100%" height="100%" />
<local:IFrame id="iFrame" source="http://www.favzone.com" width="100%" height="100%" />
source就是需要引用的网页url了
相关文档:
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/09/04/adding-animations-and-effects-to-flex-tool-tips/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertic ......
1、as3ebaylib
http://code.google.com/p/as3ebaylib/
2、as3youtubelib
http://code.google.com/p/as3youtubelib/
3、as3flickrlib
http://code.google.com/p/as3flickrlib/
4、Yahoo ASTRA Flash Components
http://developer.yahoo.com/flash/astra-flash/
5、facebook-as3
http://code.google.com/p/faceboo ......
这个DEMO可以创建一个全新的树型结构,让我感到奇怪的是,虽然我用XML而不是XMLListCollection/ArrayCollection作为Tree的数据源,但对XML的更新依然会在Tree中反映出来——这似乎和Flex的文档有冲突,下面是引用Flex文档的一段内容:
Raw objects are often not sufficient if you have data that changes, bec ......
当输入 》时自动补全 当输入《/时自动补全
“=================================
" File: closetag.vim
" Summary: Functions and mappings to close open HTML/XML tags
" Uses: <C-_> -- close matching open tag
" Author: Steven Mueller <di ......
using System.Text.RegularExpressions; //引入的命名空间
以下为引用的内容:
//清除HTML函数
public static string NoHTML(string Htmlstring)
{
//删除脚本
Htmlstr ......