November 19, 2019, 02:38:34 AM
Welcome, Guest. Please login or register
News: Stay up to date with everything that's happening at http://twitter.digitalsignage.com

MediaSignage support forum



Author Topic: Flash SDK  (Read 4943 times)

egwyh04

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Flash SDK
« on: January 06, 2011, 07:35:39 PM »
Hi,

I have a flash application written in pure AS3 code (not created by Adobe Flash CS5 Studio), and i want to know how can my application use the Flash SDK.

I have written a small as3 program (the code is showed below), compile was success, but the Flash SDK does not work properly
(that means, after i uploaded my program to MediaSignage, the "Flash properties" do not show)

I know that MediaSignage CMS support pure as3 application to use the Flash SDK, can you give me more information on this?

This is very important to me coz my client (i'm a reseller of MediaSignage) is planning to integrate tons of his flash application with MediaSignage CMS, but his applications are written in pure as3 code, it is very hard for him to move his code to Adobe Flash CS5 Studio.

Thank!

=============== code ===============
package 
{
   import flash.display.MovieClip;

   public dynamic class Main3 extends MovieClip implements IChildPlayer
   {
      protected var m_framework:Object;
      protected var m_data:Object;
      
      public function Main3()
      {
         addChild(tf);
      }
      
      public function set framework(i_framework:Object):void
      {
         m_framework = i_framework;
      }
      
      public function get framework():Object
      {
         return m_framework;
      }
      
      public function set data(i_data:Object):void
      {
         m_data = i_data;
      }

      public function get data():Object
      {
         return m_data;
      }
      
      public function refresh():void 
      {
      }
      
      public function start():void 
      {
      }
      
      public override function stop():void 
      {
      }
      
      public function dispose():void 
      {
      }
      
      public function getPropertyDefinitions():XML
      {
         return   <Properties>
                  <Item key="logo" label="Logo mark & Title">
                     <Field key="file" type="resource"/>
                     <Field key="title" type="string" defaultValue="Here is title text."/>
                  </Item>
                  <Item key="footer" label="Footer">
                     <Field key="title" type="string" defaultValue="Here is footer text"/>
                  </Item>
                  <Item key="options" label="Options">
                     <Field key="delay" type="string" defaultValue="2"/>
                  </Item>
                  <ItemList key="entries" label="Entries"  count="14">
                     <Field key="entry" type="string" defaultValue="Here is entry text."/>
                     <Field key="extra" type="string" defaultValue="Here is extra information text for this entry."/>
                     <Field key="file" type="resource"/>
                  </ItemList>
               </Properties>;
      }
      
      public function onMetaData(info:Object):void
      {
      }
      
      public function onCuePoint(info:Object):void
      {
      }
      
      public function onXMPData(infoObject:Object):void
      {
      }
   }
}






admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 5005
  • Karma: +35/-8
    • View Profile
Re: Flash SDK
« Reply #1 on: January 06, 2011, 08:14:13 PM »
Did you see this:

Flash CS
http://mediasignage.com/html/signage_video.html?videoNumber=flashSDK

Flash Builder / Flex
http://mediasignage.com/html/signage_video.html?videoNumber=modules

It's best that you start with a working example, and start modifying the code since it will inherit from our IFramework classes.

Thank you for your interest in MediaSignage,

Eric - MediaSignage.com

egwyh04

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Flash SDK
« Reply #2 on: January 09, 2011, 06:17:12 PM »
Hi,

I have watched those tutorial before starting this thread.
The tutorial video does not show much information.

I have tried your working example, it works if i use Adobe Flash Studio.
But if i change your example to pure AS3 Code and compile it with other compiler, it does not work, i want to know why.
Coz my client does not want to use Adobe Flash Studio.

I want to know how MediaSignage embed flash application and how MediaSignage know if my flash application support Flash SDK.

Thanks.

admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 5005
  • Karma: +35/-8
    • View Profile
Re: Flash SDK
« Reply #3 on: January 10, 2011, 01:20:14 PM »
Sorry but I do not understand the question.
Are you saying you wish to develop swf using 3rd party Flash generator?

egwyh04

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Flash SDK
« Reply #4 on: January 11, 2011, 05:46:08 PM »
Yes, I want to use 3rd party Flash generator.

The Adobe Flash Studio (for example, CS5) provide GUI tools for user to edit the SWF (for example, you can draw a circle directly in SWF), the user may not have to write any code.

But some of my client use FlashDevelop to create SWF, FlashDevelop is a source code editor and provide no GUI tools for user to edit the SWF directly. In this case, user have to write all the code.

The SWF format created by Adobe Flash Studio is different from FlashDevelop. So the tutorial example does not work if i use it in FlashDevelop. The code have to be changed a little bit. 

I have modified the code several time but it fails to work.  I have no idea so i want to ask you for more information on how MediaSignage find out if my Flash Application supports the FlashSDK

Thanks.

admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 5005
  • Karma: +35/-8
    • View Profile
Re: Flash SDK
« Reply #5 on: January 11, 2011, 07:03:11 PM »
If you are using a 3rd party and it's not working, one work around it to embed the swf in a web site and use out HTML component to point to that web site... if all else fails that is ...

dtb

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Flash SDK
« Reply #6 on: February 24, 2011, 07:32:25 AM »
In order for this to work with a third party compiler (or at least flex_sdk) is to make a little as3 wrapper. It seems that the Media Signage program is looking for a variable or movieclip called 'player'. That is how it works in the provided FLA.

So, in your case:

package {
 import flash.display.MovieClip;
 import Main3;

 public class wrapper extends MovieClip {

  public var player:MovieClip;

  public function wrapper() {
   player = new Main3;
   addChild(player);
  }
 }
}

That works for me.

admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 5005
  • Karma: +35/-8
    • View Profile
Re: Flash SDK
« Reply #7 on: February 25, 2011, 07:52:47 AM »
thx dtb

 

Carbonate design by Bloc
variant: carbon
SMF 2.0.12 | SMF © 2016, Simple Machines