Unity Community


Page 8 of 10 FirstFirst ... 678910 LastLast
Results 141 to 160 of 182
  1. Unity



    Location
    Denmark
    Posts
    471
    fscommands are Flash api's only for the standalone player, so this will not work. Since the current version doesn't give you a reference of the stage in any way (this is fixed in the next build), you'll need to use unityshared.swc to embed unity and set fullscreen from the wrapper.


  2. Posts
    1

    Smile Fullscreen solution

    Quote Originally Posted by Nolex View Post
    I added:
    import flash.system.fscommand;
    and unity3d created this swf-file succesfully, but fullscreen doesn't work!

    I have been using;

    stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

    which seems to work ok, not sure if it's an AIR-specific thing though.


  3. Posts
    456
    stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
    works on web sites with the embed tag required, but it breaks if the web site doesnt have it, even if they have fullscreen allowed, it still breaks.

    Unity 3.5.1 doesnt grab the MovementX and MovementY for mouselock from flash yet tho. they said theyre working on it.


  4. Location
    Philadelphia, PA USA
    Posts
    7
    I've got our Unity movie loading into a Flash wrapper now (thanks for all the help and advice in this thread!), BUT only for certain content. Adding some models or animated characters gives us this error when the wrapper tries to load the Unity movie: "Class flash.display3D.textures::TextureBase could not be found."

    I saw the mention of the Flex 4.6 SDK earlier in this thread, but I'm not sure how this would apply to our project, which is not Flex but Flash-only (built in Flash Professional CS5.5). Has anyone else run into this problem and/or found a workaround?

    Many thanks—I'm stumped!
    Last edited by starkos; 05-01-2012 at 09:57 AM. Reason: grammar


  5. Location
    Philadelphia, PA USA
    Posts
    7
    I knew as soon as I posted I would figure it out—I had Hardware Acceleration set to "Level 2 - GPU" instead of "Level 1 - Direct" in the Publishing settings of Flash. I had modified it in the wrapper HTML and thought that would do it, but apparently not.


  6. Posts
    11
    Hi,

    I'm an average Flash programmer and as of lask week I'm new to Unity and C# in general.
    I'm investigating the usage of unity into normal flash production work, because lets face it, unity is a tad handy for 3d development.
    So my workflow idea is to have a flash project and have unity as sort of a 3d repository.


    I've got Flash Builder 4, flex sdk 4.5, I've used Flare3D before so I got my flash project set up and can very quickly swap out the example swf file for my own with out a problem.




    My big issue is, pulling the example c# code into another unity file without the FlashHelper coming up as a compile error even without the script being attached to any object.
    As I stated I'm new to unity and C# and so far I have been doing my unity examples in javascript, and just been messing around building a simple room with lightmapping and triggers (respawn and my future ambition play a movie file).

    I guess there is no JS code example to connect to flash for inexperiences unity noob such as myself?
    if not I'll grind through the example files given a few pages back.



    A question to the unity team.
    Dynamic textures?
    I understand the movie-to-text may not work -even if flash does already natively support flash movie's rotated round in 3D space.
    But with mobile platforms needing a fade to black, and being able to import in the unity.swf file into a flash project it's my intention to call up a flash movie overlay, so all platforms would theoretically run the same way.
    So I'm currently on the "call a flash function" from unity.

    However my prior experience with Flare3D had me doing spritesheets (or Texture atlases as you guys call it) in flash.

    I tried testing and failing at UV animations via the flash export.


    Is this on the back-burner or is this a high-priority, because there are a number of 2D animators within the flash branch who's skill set could be easily transfered over to Unity(3rd party plugins) for GUI's etc etc, if we could get texture atlases to work within Flash export.
    We could build damn near everything in unity, otherwise we have to start building around a flash solution for web deployment.
    and then re-creating the whole gui in unity...again...if the customer wants to go to mobile.

  7. Unity



    Location
    Denmark
    Posts
    471
    Quote Originally Posted by Boff View Post
    Hi,

    My big issue is, pulling the example c# code into another unity file without the FlashHelper coming up as a compile error even without the script being attached to any object.
    As I stated I'm new to unity and C# and so far I have been doing my unity examples in javascript, and just been messing around building a simple room with lightmapping and triggers (respawn and my future ambition play a movie file).
    This thread is a bit older and started with a previous version of the Flash preview; now we have a different API, which is more flexible. Please check it out here.

    http://unity3d.com/support/documenta...ionScript.html

    This thread contains an example of marshalling a bitmapdata into unity;
    http://forum.unity3d.com/threads/128...tures-from-web.


  8. Posts
    11
    Thanks Ralph for your speedy reply,

    well back to reading, learning and testing - sadly those are easy - it is the understanding what I am reading/learning which is the hard part. Lots to take in at one time with trying to get to grips with unity AND a flash bridge. The hard bit is trying to sift through and categorise everything in it's relative importance and relevance - I will get there though


  9. Posts
    11
    I've been attempting to play around with this new method of actionscript code within unity.

    I've got my trace and my actionscript compiling, and even managed to call an wrongly named function
    ActionScript.Statement("FlashProxy.trigger({0})",v );
    when infact i had Trigger in my actionscript.
    The demo worked within unity, and died on the export, giving me a wealth of error messages within the unity console.

    But that method is to be used when you have actionscript that needs to be called within the unity project, right?

    but if I have an flash GUI overlay, with film etc etc?
    Then I need to have the original the swc solution (although it's old and invalidates the FlashHelper function right with the current 3.5.1f version of unity?)
    and that's the one I am having difficulty with.
    When importing the resulting unity.swf and swc into my flash Builder project, the original code example works, All the log(s) reported in nicely to Flash builder's console, but throws up an error on my custom code, as I try to call to a function in my flash builders main.as from my custom .as file in unity.
    I'm getting the classic , TypeError: Error #1009: Cannot access a property or method of a null object reference.
    to be honest, ever since AS3 came out, I've been meaning to physically harm the adobe developer who dismissed the idea of not reporting the property or method you attempted to access.

    I think I am being a little slow in all of this.
    Last edited by Boff; 05-04-2012 at 03:34 AM.


  10. Posts
    11
    monday morning and I crushed my issue.

    It was with unity and my in-experience with it.

    startup script needs to be on a gameobject on the scene. Job done. A little embarrassing


  11. Posts
    6
    Hi all! I am new to Unity coding and have hit a wall regarding passing an object from a custom flash shell to a loaded unity swf. The object is passed ok to my javascript, but I am having issues trying to access the key/values within it.

    any help would be gratefully received!


  12. Posts
    11
    @previoucmouse

    your idea is to export unity to flash, and then pull in the resulting swc + swf file to your flash project?


    All the FlashHelper commands are old as Ralph explain to me, (he needs to do a tidy up of that first post if you ask me )
    and has been replaced by the Actionscript API
    http://unity3d.com/support/documenta...q=ActionScript

    The new version of Unity 3.5 allows actionscript to be compiled with your unityfolders.
    Allowing you to call native flash functions when the files are exported.

    Cannon has sorted this out on page 6 (can't get the forum to link there directly to his post with a file in)

    Quote Originally Posted by cannon View Post
    Here.
    This sample contains:

    - demo of how to call functions from Unity to Flash and from Flash to Unity using the 3.5f1 API
    - shows a reference to the Stage being passed from the preloader to the Unity swf
    - a sample of how to use the new [NotRenamed] and [NotConverted] attributes
    - a sample FlashDevelop project suitable for loading Unity-compiled Flash swfs
    - (NEW) a sample FlashDevelop Air workspace

    Run index.html; this runs the initial FlashDevelop project that loads the compiled Unity.swf.

    The messages on the left are displayed by Unity, the messages on the right are displayed by Flash.

    However if you want to load up the resulting swf file into an existing project and call "function" in your normal stage -
    Cannon Actionscript is a flashproxy - a bridge if you will, which I've been using.

    Ralph's orginal example of what functions are exposed with unityContent is still valid, so both his example and Cannons call this function in the flash project you just loaded your unity.swf into.

    [actionscript project code ] _unity_loader.unityContent.sendMessage("Startup", "SetHost", {host:this});
    sends a message to the unity.swf to establish a conneciton

    [unity FlashProxy.cs] receives the SetHost command and calls the internally compiled AS file
    [unity FlashProxy.as] to set where the stage is.
    From here I've been putting functions in the FlashProxy.as script to called a similar function on the stage.

    hope this helps.

    where the stage is, so you can call functions on the stage (i.e. your flash project).
    Last edited by Boff; 05-11-2012 at 04:03 AM.


  13. Posts
    6
    Thanks for the reply Boff - will have a go at it today after I get a ton of other projects out the way!


  14. Location
    Brighton/London
    Posts
    43

    Updated Custom Preloader Example

    Hi guys,

    I've updated Ralph's initial example so that it should now work correctly. It simply required the FlashHelper code to be replaced with calls to the ActionScript API (as Boff correctly mentioned).

    I've bundled everything you need into one .zip file. You'll find 3 folders in there:
    • AS3-PreloaderSrc - The ActionScript source, loading image and UnityShared.swc required to build the custom Flash preloader.
    • AS3Communication - The Unity project which will be built to a SWF and loaded by the preloader.
    • BuiltExample - A folder containing the built SWFs. To see the demo running, open SimplePreloader.html.


    FlashPreloaderExample.zip


    As with other Flash export examples, this updated demo works in the current Unity build but will be subject to change as the feature is worked on.

    Cheers,
    Cat


  15. Location
    Melbourne, Australia
    Posts
    64

    License message appearing at the bottom of the screen?

    This is working well for me, except that I'm getting the following message at the bottom of the screen:

    Content uses capabilities that require a license. Visit adobe.com/go/fpl.

    The address redirects to: http://www.adobe.com/devnet/flashpla...-features.html

    There it speaks of something adobe is going to do on August 1, 2012, except that it's not yet that date at the time of writing this.

    UPDATE
    The message only appears when using the debug version of the flash player. Doesn't appear in standard flash player. So that's okay.

    Carl
    Last edited by carllooper; 05-14-2012 at 09:54 PM.


  16. Posts
    2
    Thanks, Cat! I have setup my own preloader project following this example but I run into an error when the content loader complete event fires. The unityContent property of the UnityContentLoader object is null.

    private function onUnityContentLoaderComplete(event:Event):void
    {
    addChild(_unityContentLoader);
    _unityContentLoader.unityContent.setContentHost(th is); // Fails here due to null unityContent
    }

    I tried using AS3Communication.swf as my content to load instead of my swf and I get the same message. What am I missing?

    Using Flex 4.6 sdk

    Thanks,
    bread


  17. Posts
    2
    More investigation shows that I only have a null unityContent error when the content swf I'm loading is served up from my local server. If I use AS3Communication.swf or my swf in the local project, they work fine. Is there a security restriction and a workaround?


  18. Posts
    6
    Hi Cannon, for some reason I can't extract the archive you linked to as it seems to be damaged

    thanks!


  19. Posts
    665
    That's odd. Might've broken during the past forum maintenance. Direct uploads on the Unity forum also seem to be broken. I've attached the project sans built swfs here.


  20. Posts
    2
    Hi, can some one tell me how I should build my fla to use this? Perhaps it's because I'm tired but I can't quite seem to get my head around it.

Page 8 of 10 FirstFirst ... 678910 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •