Thailand Flex and AIR developer

Enjoy it! Build it! and steal that snack!

ukrit himakoon

[ช่วยด้วย!!]การเรียก remote swf ข้าม domain

เกี่ยวกับ Flex/air นะครับ
สมมติว่าผมมี loader อยู่ตัวนึงบนเครื่องฝั่ง client
ผมต้องการจะเรียก ไฟล์ test.swf ซึ่งอยู่บน http://www.domain.com/test.swf
จะต้องทำอย่างไรบ้างครับ ติด error แบบนี้อะครับ

SecurityError: Error #3207: Application-sandbox content cannot access this feature.
at flash.system::Security$/allowDomain()
at AQToolBar/loadSwf()[C:\Flexautomation\FlexAut\src\AQToolBar.mxml:198]
at AQToolBar/__loadfile_click()[C:\Flexautomation\FlexAut\src\AQToolBar.mxml:22]

ช่วยด้วยยยยยยยยยยยยย

Share

Reply to This

Replies to This Discussion

ว่าแต่คุณ ukrit ใช้วิธีอะไรในการ load file .swf หรือครับ เป็น web service หรือ http service ครับ ถ้าเป็นไปได้ ผมแนะนำให้ใช้ blazeds หรือ weborb ในการ load ไฟล์ มาเลยดีกว่า

อันนี้เป็นความเห็นแบบกว้างๆ นะครับ เพราะถ้าใช้ทั้งสองตัวข้างต้น เขาจะใช้วิธีที่เรียกว่า proxy ครับ ทำให้สามารถ access ข้าม domain ได้

Reply to This

ครับผมคือว่า ผมจะใช้ swfloader (อีกแล้ว) ในการ load ข้าม domain ครับเห็นว่าจะต้องใช้ไฟล์ crossdomain.xml วางไว้ที่ host ด้วยแต่ยังทำไม่ได้เลยครับ คือจริงๆ ผมมีความจำเป็นที่จะต้อง load หน้า swf ที่อยู่บน server มาแสดง บนหน้า client ครับ เพราะ ไฟล์ที่จะดึงมาแสดงมันติดต่อกับ database ครับ

Reply to This

มันลำบากก็ตรงที่ ไม่ยอมให้แก้ไฟล์ .swf เนี่ยแหละ เฮ้อ

แต่ถ้ามี crossdomain.xml อยู๋นี่น่าจะไม่มีปัญหาอะไรนา คงต้องดูว่า site ที่ทางไฟล์ crossdomain.xml อนุญาติให้ access ได้นั้นมี site อะไรบ้าง แล้ว site ของคุณ ได้รับอนุญาติหรือเปล่า

Reply to This

RSS

Badge

Loading…

© 2009   Created by Greendog on Ning.   Create a Ning Network!

Badges  |  Report an Issue  |  Privacy  |  Terms of Service