Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 메일왕창보내는법
- express for node.js
- Eclipse
- docker
- php
- 스킨 스쿠버
- 디즈니씨
- 명사 분석기
- 나의 프로젝트
- flex3
- 주식이야기
- 명사 뽑아내기
- 명사 추출기
- iBatis
- 나의 취미
- php thumbnail
- nodejs express
- Lift
- ror실행
- Cross
- 베트남어
- ejb
- Node.js
- C/C++
- node.js web framework
- rss
- 도커
- scala
- ajax
- 책이야기
Archives
- Today
- Total
nkdk의 세상
서버측에서 SWF 프로그램에게 파라미터를 전달하는 예 본문
SWF파일을 포함하는 HTML파일을 열고 다음과 같이 flashVars로 시작하는 한 줄을 삽입한다.
Accessing the flashVars properties
모든 파라미터의 값에 접근하는 예
<?xml version="1.0"?>
<!-- wrapper/IterateOverApplicationParameters.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()">
<mx:Script><![CDATA[
private function init():void {
for (var i:String in Application.application.parameters) {
ta1.text += i + ":" + Application.application.parameters[i] + "\n";
}
}
]]></mx:Script>
<mx:TextArea id="ta1" width="300" height="200"/>
</mx:Application>
출처: http://micropilot.tistory.com/entry/SWF-Parameters-in-HTML
AC_FL_RunContent(
"src", "TestApp",
"flashVars", "myName=Danger&myHometown=Los%20Angeles",
"width", "100%",
"height", "100%",
"align", "middle",
"id", "TestApp",
"quality", "high",
"name", "TestApp",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
"src", "TestApp",
"flashVars", "myName=Danger&myHometown=Los%20Angeles",
"width", "100%",
"height", "100%",
"align", "middle",
"id", "TestApp",
"quality", "high",
"name", "TestApp",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
Accessing the flashVars properties
<?xml version="1.0"?>
<!-- wrapper/ApplicationParameters.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initVars()">
<mx:Script><![CDATA[
// Declare bindable properties in Application scope.
[Bindable]
public var myName:String;
[Bindable]
public var myHometown:String;
// Assign values to new properties.
private function initVars():void {
myName = Application.application.parameters.myName;
myHometown = Application.application.parameters.myHometown;
}
]]></mx:Script>
<mx:VBox>
<mx:HBox>
<mx:Label text="Name: "/>
<mx:Label text="{myName}" fontWeight="bold"/>
</mx:HBox>
<mx:HBox>
<mx:Label text="Hometown: "/>
<mx:Label text="{myHometown}" fontWeight="bold"/>
</mx:HBox>
</mx:VBox>
</mx:Application>
<!-- wrapper/ApplicationParameters.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initVars()">
<mx:Script><![CDATA[
// Declare bindable properties in Application scope.
[Bindable]
public var myName:String;
[Bindable]
public var myHometown:String;
// Assign values to new properties.
private function initVars():void {
myName = Application.application.parameters.myName;
myHometown = Application.application.parameters.myHometown;
}
]]></mx:Script>
<mx:VBox>
<mx:HBox>
<mx:Label text="Name: "/>
<mx:Label text="{myName}" fontWeight="bold"/>
</mx:HBox>
<mx:HBox>
<mx:Label text="Hometown: "/>
<mx:Label text="{myHometown}" fontWeight="bold"/>
</mx:HBox>
</mx:VBox>
</mx:Application>
모든 파라미터의 값에 접근하는 예
<?xml version="1.0"?>
<!-- wrapper/IterateOverApplicationParameters.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()">
<mx:Script><![CDATA[
private function init():void {
for (var i:String in Application.application.parameters) {
ta1.text += i + ":" + Application.application.parameters[i] + "\n";
}
}
]]></mx:Script>
<mx:TextArea id="ta1" width="300" height="200"/>
</mx:Application>
출처: http://micropilot.tistory.com/entry/SWF-Parameters-in-HTML