Blogs

Showing 0 results.

Forums

« Back to Digital Signs API Forum

Adding a Flash SWF to a Presentation in DMD to play pictures

Combination View Flat View Tree View
Threads [ Previous | Next ]
Any ideas on why I can't add a Flash/SWF file that plays pictures to a DMD presentation?
 
So you can get the 4310_Slideshow_Playlist from the ciscoet.com website.
I take that and play it directly on the 4310 and it works great.
FYI:  I opened mine in Flash and forced it to create the SWF as Flash Lite 3.1 /AS2
 
So I modified the code in this Flash object down around line 32
var lv:LoadVars = new LoadVars();                        //(1)
lv.load("http://www.xyz.com/flash/4310_Slideshow_Playlist/data.txt");
 
Again this Flash Lite 3.1 SWF plays fine if it is played directly on the DMP via DMPDM.
 
Now add the URL to the Media Asset library and point to the
http://www.xyz.com/flash/4310_Slideshow_Playlist/slideshow_playlist.swf
 
NOw add that to a Presentation in the DMD as a Media Asset
NOw play the presentation on the DMP
You see the background color and swf object appear but none of the pictures are playing?
 
Any ideas
Actionscript code list below for reference
Thanks
======================================================
import com.cisco.dms.MediaPlayer;                //(1)

var image_index:Number = 1;
var mIndex:Number;
var playlistMaxIndex = 1;
var prefix = "";
       

var mp:MediaPlayer = new MediaPlayer();            
mp.stopVideo();
var playlistIndex:Number = 2;           

var videoStarted:Boolean = false;       
mp.setColorKey(0x01, 0x00, 0x01, 0);
myBox.backgroundColor = 0x010001;

var listeneremoticonbject = new Object();                //(6)
listener.videoStatus = function(msg:String)
{
    if(msg == "START") {
            videoStarted = true;
    } else if (msg == "STOP") {
           if(videoStarted)           
            playNext();
           videoStarted = false;
    } else
        mp.logInfo("Failure...");
};
mp.addListener(listener);


var lv:LoadVars = new LoadVars();                        //(1)
lv.load("http://www.rockingchairsoftware.com/flash/4310_Slideshow_Playlist/data.txt");


lv.onLoad = function(success:Boolean)emoticonoid{                    //(2)
    if(success == true){
        mIndex =parseInt(this.maxImagesIndex);
       
        playlistMaxIndex = parseInt(this.maxPlaylistIndex);
        prefix = this.demoUrl;
        initPlaylist();
        initImage();
    }
};


function initPlaylist(){
    mp.playVideoToObject(prefix + lv["audio1"], false, myBox);
    mp.subscribe();
}

function playNext()emoticonoid {                    //(5)
    if ( playlistIndex > playlistMaxIndex) {
        playlistIndex = 1;
    }
    mp.playVideoToObject(prefix + lv["audio" + playlistIndex++], false, myBox);
};



function initImage(){                                //(3)
    _root.imageHolder._xscale = 100;
    _root.imageHolder._yscale = 100;
    _root.imageHolder._alpha = 100;
    _root.imageHolder._x = _root.mask_mc._x;
    _root.imageHolder._y = _root.mask_mc._y;
    _root.imageHolder.loadMovie(lv["image1"]);                //(4)
    setTimeout(decreaseAlpha, 1500);                    //(5)
}

function loadImage()emoticonoid{
   
    if(_root.imageHolder._alpha <= 0){
        image_index++;
        if(image_index > mIndex){
            image_index = 1;}
   
        _root.imageHolder.loadMovie(lv["image" + image_index]); //(6)
        _root.imageHolder._alpha = 100;   
        setTimeout(decreaseAlpha, 1500);                //(7)
    } else {
         decreaseAlpha();
    }
}

function decreaseAlpha( )emoticonoid{
    _root.imageHolder._alpha -= 1;                        //(8)
    setTimeout(loadImage, 10);                        //(9)
}

 
 
 

Found at least a work around.
DO NOT use the Media icon or if you are getting weird results try instead to use the Playlist All Media Types.

Also found another weird thing if you add a SWF file via the Media icon the type of SWF I was adding was an Image rotator.
And once I did this the DMD screen immediately zoomed in or magnified see screenshot


Cheers

Collateral


No files available