Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Will 7 · Jan 30, 2011 at 12:53 PM · javascriptserverflashkongregate

Kongregate Shared Content API

I am trying to access the Kongregate shared content API but this is only available to Flash AS3. So would it be possible to host the game elsewhere alongside a tiny flash window (1x1px) and then have them communicate via server side Javascript (I have only used Unityscript before). Does anyone think this would be possible without too much trouble? Thanks in advance, Will.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Bunny83 · Jan 30, 2011 at 02:43 PM

Well, i don't know anything about Kongregate but it should be possible, like you mentioned: run a small flash window and communicate via "client side javascript". You never have javascript or flash serversided. Flash is only executed on the client inside the browser (you will need the flashplayer like you need the Unity webplayer for Unity.

In Flash AS3 use the "ExternalInterface" to call a javascript function inside your webpage and offer the webpage a "channel" back into flash. The Unity docs have an great article about Unity webplayer and brownser communication.

That should be all you need.

So communication will be like:
Flash-->webpage-->unity
and
unity-->webpage-->flash

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Will 7 · Jan 30, 2011 at 03:08 PM 0
Share

Cheers for the link, I'll have a look into it. Do you think you can pass several long arrays through?

avatar image Bunny83 · Jan 30, 2011 at 09:46 PM 0
Share

It should be possible but i haven't tried it yet. Since the unity to javascript call is evaluated through a string that represents javascript code and is executed inside the browser, you can setup even a long string in a loop by adding each element of an array to the string and form a JScript like array deffinition.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

JavaScript --> Unity Flash Build 2 Answers

Help with Kongregate API? 0 Answers

Unity WebGL Problem 0 Answers

how to use the listen port in this case? 0 Answers

Browser-based JavasScript to Flash communication 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges