|
功能描述:在Flex中嵌套框架,并且进行数值传递
1、编辑Flex框架组件iFrame.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="
http://www.adobe.com/2006/mxml"
resize="callLater(moveIFrame)" move="callLater(moveIFrame)">
<mx:Script>
<![CDATA[
import flash.external.ExternalInterface;
import flash.geom.Point; import flash.net.navigateToURL;
private var __source: String;
/**
* Move iframe through ExternalInterface. The location is determined using localToGlobal() * on a Point in the Canvas. **/ private function moveIFrame(): void {
var localPt:Point = new Point(0, 0);
var globalPt:Point = this.localToGlobal(localPt);
ExternalInterface.call("moveIFrame", globalPt.x, globalPt.y, this.width, this.height);
}
/**
* The source URL for the IFrame. When set, the URL is loaded through ExternalInterface. **/ public function set source(source: String): void { if (source) {
if (! ExternalInterface.available)
{ throw new Error("ExternalInterface is not available in this container. Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime are required."); } __source = source; ExternalInterface.call("loadIFrame", source); moveIFrame(); } }
public function get source(): String
{ return __source; }
/**
* Whether the IFrame is visible. **/ override public function set visible(visible: Boolean): void { super.visible=visible;
if (visible)
{ ExternalInterface.call("showIFrame"); } else { ExternalInterface.call("hideIFrame"); } }
]]>
</mx:Script>
</mx:Canvas>
2、放置到要使用框架的Flex中index.mxml,并写入引用哪个frame.html
<ui:IFrame id="iFrame" source="frame.html" visible="true" width="100%" height="300"/>
3、在引用框架的Flex生成页index.html里加入:
<1. wmode set to opaque
在调用swf的后面加上"wmode","opaque"
例如:"pluginspage", "
http://www.adobe.com/go/getflashplayer",
"wmode","opaque"
<2. the moveIFrame,hideIFrame,showIFrame,loadIFrame methods
<3. the 'myFrame' div
在</body>这前写入:
<div id="myFrame" style="position:absolute;background-color:transparent;border:0 px;visibility:hidden;"></div>
4、在Flex页面index.mxml输入的函数值,调用index.html中的'getEditorText'函数,并且写入到text1.text中
text1.text=ExternalInterface.call('getEditorText',param1,param2,param3,...)
getEditorText:函数名称
param:参数值
5、在生成页中取得框架中的函数
框架内的frame.html,放置在head之间:
function GetEditorText1(){
return getHTML(params);
index.html生成页的调用,设置在head之间:
function getEditorText(){
return document.getElementById("myIFrame").contentWindow.GetEditorText1(); }
后记:实际中在这里只是调用一个层放在对应位置而已,当我们在Flex中做申缩动作时,层也要跟着改变,我是如此处理的:
设置move或show事件,当move或show时则调用:iFrame.source = "frame.html"
参考:
|
相关推荐
无人机基本组成部件
无人机基本组成部件
IFrame嵌入Html
iframe.mxml http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*" >
RAG开源框架深度评测:从RAGFlow到Dify的实战选型指南
本文深度评测了主流RAG开源框架(RAGFlow、Dify、WeKnora)的核心能力与实战表现,提供企业级选型指南。重点对比了文档解析、检索性能和生产部署等关键指标,揭示RAGFlow在复杂文档处理、Dify在低代码开发、WeKnora在腾讯生态集成的差异化优势,并给出技术选型决策树与成本优化方案。
Flex中嵌入HTML页面
组件下载 3.1添加到libs目录下 需要下载第三方组件 flex-iframe.swc,并添加到flex_libs中 相关组件包:flex-iframe-1.5.1.swc 3.2简单使用示例 3.2.1 网页或HTML页面嵌入 方式一:直接使用标签 1. //jsp/html文件嵌入到flex中(需要把flexiframe.swc放在项目的flex_libs
值得苦练的100道Python经典练手题(全网最全,附详细答案,建议收藏)
这100道Python练习题涵盖了从基础语法到高级算法、从数据库操作到Web开发的各个方面,是备考数据库系统工程师的绝佳素材。建议按照章节顺序逐一练习,遇到难点可反复钻研,真正掌握每一道题背后的知识点。通过这些练习,不仅能提升Python编程能力,还能加深对数据库系统原理的理解,为考试和实际工作打下坚实基础。
新手必看:如何用T265和ROS实现无人机室内精准定位(附PX4参数配置)
本文详细介绍了如何使用Intel Realsense T265和ROS实现无人机室内精准定位,包括硬件准备、ROS数据流架构设计、PX4参数配置及系统验证。特别针对视觉SLAM技术在室内环境中的应用,提供了从零搭建到进阶优化的全流程解析,适合无人机开发新手快速上手。
在Flex中嵌入完整HTML页面
在Flex中嵌入完整HTML页面http://www.webjx.com 更新日期:2006-02-10 11:01 出处:eshangraoblog 作者:hy feiy有时候我们需要在Flex应用中嵌入HTML代码,根据嵌入HTML要求的不同有以下两种方法: 1、Flex文本组件(Label、Text、TextArea)的htmlText属性支持一些基本的HT
使用DrissionPage实现携程酒店信息智能爬取
本文介绍了一个基于DrissionPage技术的携程酒店信息爬虫系统,通过监听API数据包实现高效采集。系统可自动获取酒店名称、价格、评分、位置等15个维度的数据,支持多页滚动加载和智能去重。相比传统爬虫,该方法直接解析API返回的JSON数据,避免了复杂的HTML解析和加密参数分析,提高了开发效率和稳定性。文章详细阐述了13个关键实现步骤,并强调数据采集应严格遵守法律法规,仅用于技术学习和市场研究。该系统可为旅游决策、价格监测等提供数据支持,但需注意合理使用频率和隐私保护。
[zz]Flex组件IFrame中嵌入HTML页面的方法
转载自 shizuwu 最终编辑 shizuwu 功能描述:在Flex中嵌套框架,并且进行数值传递 1、编辑Flex框架组件iFrame.mxml <?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" re...
基于Simulink的固态变压器(SST)多级协同控制
本文介绍了基于Simulink的固态变压器(SST)多级协同控制方法。SST作为智能电网关键设备,其三级架构(AC-DC整流、DC-DC隔离、DC-AC逆变)存在级间耦合问题。文章提出纵向解耦与横向联动相结合的协同控制策略,详细推导了各级控制算法,并通过Simulink实现了10kV/400V级联型SST系统建模。仿真结果显示,在±20%电网波动和0-100%负载跳变下,系统能保持直流母线电压波动<2%。文章还提供了工程部署建议和代码生成方法,为SST的研发提供了实用指导。
MATLAB 图像滤波:高通、低通、带通和方向滤波器
在 MATLAB 中,我们可以使用不同类型的滤波器对图像进行处理,包括高通滤波器、低通滤波器、带通滤波器和方向滤波器。通过以上代码示例,我们介绍了 MATLAB 中使用高通滤波器、低通滤波器、带通滤波器和方向滤波器对图像进行滤波的方法。高斯滤波器可以实现带通滤波效果,通过调整滤波器的方差参数可以控制带通滤波器的频率范围。这里的平均滤波器是一种常见的低通滤波器,通过对图像周围的像素进行平均来实现平滑效果。Sobel 滤波器是一种常用的方向滤波器,用于检测图像中的水平和垂直边缘。函数将高通滤波器应用于图像。
html嵌入html页面方法,Flex组件IFrame中嵌入HTML页面的方法
具体的一个例子——使用IFrame这个框架的一个页面的代码如下:body { margin: 0px; overflow:hidden }classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#v...
基于深度学习的鸟类检测识别系统:YOLOv5 + YOLOv8 + YOLOv10 + UI界面 + 数据集
YOLOv5是当前目标检测领域非常流行的模型,具有良好的检测精度和实时推理速度。其网络结构相比前几代YOLO模型进行了优化,尤其是在检测精度和计算效率上有了显著提高。YOLOv5特点高效性:能够在较低的硬件环境下进行实时检测。易于部署和使用:YOLOv5提供了简单的API接口,方便开发者快速集成和使用。优异的精度:在多个数据集上测试,表现出色。本文详细介绍了基于YOLOv5、YOLOv8和YOLOv10的鸟类检测识别系统的设计与实现。
Flex中键入Html代码
有时候我们需要在Flex应用中嵌入HTML代码,根据嵌入HTML要求的不同有以下两种方法: 1、Flex文本组件(Label、Text、TextArea)的htmlText属性支持一些基本的HTML代码,例如: this is a html code ]]> 2、我们可以将Flex应用嵌入到HTML页面中,然后通过Flex2中
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
温度PID控制PLC程序
温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值
Flex嵌入HTML页面
这段时间一直在苦心研究Flex,今天突然想,我们平时都是把swf放到网页中,怎么才能把网页嵌入到Flex中呢?我查了一些资料,然后经过自己的不懈努力,终于搞定。 为了方便,写了个嵌入HTML页面的代理IFrame组件,该组件封装了所有需要的Flex端代码,后面只要通过标签调用就OK了。 IFrame.mxml文件如下: <?xmlversion="1.0"encoding...
jre9下载 jdk9
(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】
flex 嵌入html页面,flex页面中嵌入html页面
使用flex-iframe插件在gitHub上的地址如下可以这样引入这个插件xmlns:s="library://ns.adobe.com/flex/spark"xmlns:mx="library://ns.adobe.com/flex/mx"xmlns:ic="http://www.supermap.com/iclient/2010"xmlns:is="http://www.supermap.c...
精雕软件(JDpaint) 5.5 绿色版
精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版
flex嵌入到html和html嵌入到flex
flex嵌入到html: 用swfobject,下载的.js地址:http://www.adobe.com/devnet/activecontent/articles/devletter.html在你的 HTML 页面头部区嵌入这个脚本文件:在你的 HTML 中写一个用来放 Flash 的容器,比如,并随便给一个 id 比如 flashcontent。然后在里面放上你的替换内容。
在Flex中用Iframe嵌入HTML网页
有时候我们需要在Flex应用中嵌入HTML代码,根据嵌入HTML要求的不同有以下三种方法: 1、Flex文本组件(Label、Text、TextArea)的htmlText属性支持一些基本的HTML代码,例如: view plaincopy to clip...
flex嵌入html完整页面and嵌入其他项目swf文件
将 html 页面 或 jsp 页面嵌入 到flex 页面中 step1:下载 flex-iframe-1.5.1.swc http://code.google.com/p/flex-iframe/ step2:将此文件拷贝到flex项目的flex_libs文件夹下 step3:创建mxml文件 vboxiframe.mxml Java代码
Flex中嵌入网页(IFrame)
转自:http://alvinqq.javaeye.com/blog/539618 这段时间一直在苦心研究Flex,今天突然想,我们平时都是把swf放到网页中,怎么才能把网页嵌入到Flex中呢?我查了一些资料,然后经过自己的不懈努力,终于搞定。 为了方便,写了个嵌入HTML页面的代理IFrame组件,该组件封装了所有需要的Flex端代码,后面只要通过标签调用就OK了。 IFrame.mxm
在Flex (Flash)中嵌入HTML 代码或页面—Flex IFrame
在flex组件中嵌入html代码,可以利用flex iframe。这个在很多时候会用到的,有时候flex必须得这样做,如果你不这样做还真不行…… flex而且可以和html进行JavaScript交互操作,flex调用到html中的JavaScript方法以及获取调用后的返回值。 1、flex iframe下载地址:https://github.com/downloads/f...
[Flex] IFrame系列 —— 嵌入本地页面两种方式source和content(html页面和html代码)...
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="...
flex
有时候我们需要在Flex应用中嵌入HTML代码,根据嵌入HTML要求的不同有以下两种方法: 1、Flex文本组件(Label、Text、TextArea)的htmlText属性支持一些基本的HTML代码,例如: this is a html code ]]> 2、我们可以将Flex应用嵌入到HTML页面中,然后通过Flex2中的...
1万+




被折叠的 条评论
为什么被折叠?



