Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

AS3.0 and Screen Extension to a second screen

New Here ,
Jul 23, 2019 Jul 23, 2019

operatorscreen.jpg

Dear Friends

I need help for an outsourced project,

I have an application that runs on a PC and tis connected to a videowall,

what the developer has to do in order to have the operator console shown on the operator pc  while the extension (HDMI connection) shows only the end results without the operator selections

the developer does not know  how to do the screen extension , Any hints?

TOPICS
ActionScript
2.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 24, 2019 Jul 24, 2019

Thanks for the info.

What I can suggest to you is to use two native windows in your application and then run some if conditions to not show these controls in the second screen.

In this thread I show how to create a second window using the NativeWindow class.

Adobe AIR desktop native windows drag and drop

Here is the official docs for the NativeWindow class.

NativeWindow - Adobe ActionScript® 3 (AS3 ) API Reference

This class is only available for the Adobe/Herman AIR though.

I hope this helps.

Regards

...
Translate
Community Expert ,
Aug 15, 2019 Aug 15, 2019

Hi again.

According to this answer by the user from StackOverflow called VC.One:

FLV Component is sometimes glitchy with some re-plays (example: after some loops the video freezes, then plays normal after a few seconds). I think it depends on encoder settings when outputting the video file.

Then he suggests another approach:

You might prefer using the NetStream and Video API to handle video playback.

I've run a test here using his solution and it seems that works.

I've reorganized his approach like this:

AS3 code:

import flash.media.Video;

import flash.net.NetConnection;

import flash.net.NetStream;

import flash.events.NetStatusEvent;

var video:Video;

function start():void

{

    video = createVideo("assets/background.mp4", 0, stage.stageWidth, stage.stageHeight, processMetaData, videoStatusHandler).video;

}

function createVideo(path:String, index:uint, w:int, h:int, metaDataHandler:Function, statusHandler:Function, autoPlay:Boolean = true):Object

{

    var vid:Video;

    var nc:NetConnection;

    var ns:NetStream;

    var metaListener:Object;

   

    // setup Video object and related Net Stream/Connection objects

    vid = new Video();

    vid.width = w;

    vid.height = h;

    addChildAt(vid, index);

   

    nc = new NetConnection();

    nc.connect(null);

    ns = new NetStream(nc);

    vid.attachNetStream(ns);

   

    // metadata handler to correctly display video

    metaListener = new Object();

    metaListener = {onMetaData:metaDataHandler};

    ns.client = metaListener;

    ns.addEventListener(NetStatusEvent.NET_STATUS, statusHandler);

   

    // play video file

    if (autoPlay)

        ns.play(path);

   

    return {video:vid, netConnection:nc, netStream:ns, meta:metaListener};

}

function processMetaData(inData:Object):void

{

    //check metadata like width, height, duration etc.

    //trace("duration is: " + inData.duration);

}

function videoStatusHandler(e:NetStatusEvent):void

{

    if (e.info.code == "NetStream.Buffer.Empty") //buffer is empty when video ends...

    {

        // rewind and play again.

        e.currentTarget.seek(0);

        e.currentTarget.resume();

    }

}

start();

I've sent the files to your email.

Please let me know if it fixes the issue.

Regards,

JC

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 15, 2019 Aug 15, 2019

Ι ll check. Tks but did you let the video lppp till the end a few times to

see if it workimg?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 15, 2019 Aug 15, 2019

Yes. I certainly did.

It looped seamlessly.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 16, 2019 Aug 16, 2019

I gave it to my developer but after following your advice the flicker is

still, on, I am not sure how to fix my developer is not very cooperative

and the event starts next week.

Its a bit better in terms of flickering contract but the bug is still there,

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 16, 2019 Aug 16, 2019

here is what he returned but it seems they still flicker

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 18, 2019 Aug 18, 2019

https://youtu.be/kiQUPgYbXwE

Better less katency but still flickers

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 19, 2019 Aug 19, 2019

I'm sorry about this issue.

It really seems to be some bug with video playback.

What about placing a still image with the first or last frame of the background video behind the actual video? I think there's a good chance of hiding the white blinking from the users attention.

Also, there are two FLV components: FLVPlayback and FLVPlayback 2.5. Have you tried both? Is the result the same?

Alternatively, you should consider reporting this bug:

Feature Request/Bug Report Form

Regards,

JC

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 19, 2019 Aug 19, 2019

yes we tried both

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 23, 2024 Oct 23, 2024
LATEST

Hello, Is it only possible to run two full screen windows in AIR or is it possible to publish the AS3 in an .exe?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines