Linking PhotonCoreAS3.swc in Adobe Flash CS5.5

cachucan
edited January 2013 in Flash (deprecated)
Hi there,

I'm trying to work with Photon within the Adobe Flash CS5.5 environment. I am able to link the loadbalancing source files just fine, but importing and using PhotonCoreAS3.swc does not seem to work for me. I've added the SWC file to the Library path and set the Link type to Merged into code, however I cannot import anything photon related.

ex:
import de.exitgames.photon_as3.loadBalancing.model.vo.GameProperties; // linked fine
import photon.PhotonPeer; // not linking fine

"Definition photon:PhotonPeer could not be found."

Is there anything I'm missing here? Has anyone had success or some troubles?
I have done a lot of flash development but have never linked a library within the Adobe Flash interface before.

Thanks.

Comments

  • First off: I'm not a Flash expert either.

    If one imports fine and the other import fails, then most likely that name is not existing.
    Where did you find "import photon.PhotonPeer;"?

    You can look up what to import in the doc you downloaded with the SDK. Open:
    Photon-Flash_v3-0-1-0_SDK/docs/index.html

    PhotonCore -> The base class for the Photon communication.
  • Thank you for your quick reply, Tobias. I will try this when I get home to my workstation tonight. I was referencing a tutorial that utilized Photon/Flash via FlashDevelop: http://blog.sebaslab.com/first-actionsc ... ton-cloud/
  • Ah, that! I never tried it myself.
    Maybe the author can help you if it's just about the setup.

    By the way: we are working on a refactored and extended API for AS3, too. It will become more similar to what other libraries offer and better support the features we recently added to the Photon Cloud.
  • Hi! Thank you for your help. I was able to set up a flash project in Adobe Flash CS5.5 importing Photon network correctly.

    To get it to work correctly, I saved my FLA file as a: Flash CS5.5 Uncompressed Document (*.xfl).
    This created a directory for me to place the photon library into, clearly labeled LIBRARY inside my project folder. I also linked it to my project like in my post above. With these steps, Flash easily saw the library as de.exitgames.photon_as3.PhotonCore.
  • Super. Thanks for the update!