开发者

Ruby server and Flash client

I want a Flash file to load external movies. Later, I want to add tags to the XML document to control the movies. I have a policy server file "to open a port for Flash client. I also have a file to load, but I don't have a Flash client built to receive the file.

Ultimately, I can control Flash from a Ruby server and talk to it with an XML socket, but how? Here's the methods I'm using in Flash. See doc开发者_运维技巧ument

Flash Methods "where do I go from here"

import flash.net.;

it flash.display.Loader;

import flash.events.;

import flash.system.Security;

Any suggestions for Ruby XML server appreciated

require 'socket'

puts "xml to Flash..."

server = TCPServer.new("localhost", 8989)

seq_no = 0

loop do

socket = server.accept

while socket.gets.chop.length > 0

end

socket.puts “?xml version="1.0" encoding="utf-8"?”

socket.puts “”

socket.puts “”

socket.puts “1.swf”

socket.puts “”

socket.puts “”

socket.close

end


i think you are confusing something, think of flash the same way like you would think of javascript and ajax. you can't actually tell flash what to do, but flash can ask your server what do to next. it also doesn't matter what server side language you are using, it almost always ends up printing out xml, json or html.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜