positioning of external flv files on stage?

HY, I'm loading 3 files flv so that the first file is read once and the other two loop later. Now I'm interested is it possible to position the FLVs on the stage for some contact information when they start playing (so for example that the first flv plays as a default in the Center, the second flv file plays a little right and the third a bit left cheek). This is the code I use:

import fl.video.VideoEvent;

var clips:Array=["1index.flv","2sat.flv","3spavam.flv"];
var index:int = 0;

/* gledamsat would be what I think you are wanting to name the instance of the FLVPlayback on the stage... */
gledamsat.addEventListener(VideoEvent.COMPLETE,goNext);

function goNext(e:VideoEvent):void {
        index++;
        if(index > clips.length-1){
           index = 1;
        }
        gledamsat.source = clips[index];
}

function init():void{
   gledamsat.source = clips[0];
}

init();

Now, I tried these lines to place the flv files, but it does not work:

if (2sat.loaded == true) {
2sat._x = 400;
}
if (3spavam.loaded == true) {
3spavam._x = 100;
}

Can anyone help? Placeable flv files loading?

I got that from your new to AS3. There was a where you supposed to have the starting position for FLVPlayback

So be...

try to use next...

var original_position = gledamsat.x;

function goNext(e:VideoEvent):void
{

index ++;
clips [index] = gledamsat.source;

if(index == 0)
{
gledamsat.x = original_position;
}
another if (index == 1)
{
gledamsat.x = original_position + 10;
}
another if (index == 2)
{
gledamsat.x = original_position - 10;
}

If (index == (clips.length - 1))
{
index = (-1);
}

}

Tags: Adobe Animate

Similar Questions

  • Please Help - END external FLV file

    Hello

    I'm now using this code to check if I believe in a movie but I wonderd if a movie is stopped because the buffer is not fully charged will be also called "NetStream.Play.Stop" or only if you at the end of a movie?

    Already thanks for the response.
    Greetings.

    Spaantje

    You can check the NetStream.bytesLoaded vs NetStream.bytesTotal equal to see if it's a stop buffer or the end of the video.

  • Is it possible post a link to outside FLV files using a button?

    I have a project with a two pages with the buttons to access the 30 + technical videos (FLV files). When I publish it (as a .exe) and click on the buttons, there is no answer. I swear it worked in the past. The action of buttons is to open a URL or file, the URL specifies the external FLV file and the FLV files is stored in the same folder as the .exe project... If it works?

    Is there a better way to do it?

    I have test incorporating the FLV files in the project, and it works (using forward mentioned buttons to access the appropriate video page), however, it increases the size of the project beyond what is desirable .exe...

    Thank you

    Jack L

    Captivate 7

    Windows 7 x 32

    Jack:

    I'm sure that the FLV file is not supported by any type of player as a standalone video. I could never get a FLV to work unless it was embedded. The only video formats link unpacking worked constantly for me were .swf and .mp4.

    Justenuf

  • How to unload the external .swf file when pass the other section?

    Hello

    The following code provided by Mr. kglad works very well to load an external .swf file on stage. Now, when I click on Contact (button), the file external .swf to disappear completely. How to encode on contact (button) to get by.

    Gallery.addEventListener (MouseEvent.CLICK, GalleryClick);

    function GalleryClick(e:Event):void {}

    If (currentClip! = Gallery_mc) {}

    currentClip.visible = false;

    Gallery_mc. Visible = true;

    currentClip = Gallery_mc ;}

    var loader: Loader = new Loader();

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, ClipLoaded);

    Loader.Load (new URLRequest ("Gallery.swf"));

    function ClipLoaded(e:Event):void {}

    Gallery_mc. AddChild (Loader);

    Loader.x = 0;

    Loader.y = 120;

    Loader.Width = 1000;

    Loader.Height = 700

    }}

    I tried the following code for Contact_btn unload the Gallery.swf file that launches an error message: 1120: access of undefined property loader.

    Contact.addEventListener (MouseEvent.CLICK, ContactClick);

    function ContactClick(e:Event):void {}

    If (currentClip! = Cotnact_mc) {}

    currentClip.visible = false;

    Cotnact_mc. Visible = true;

    currentClip = Cotnact_mc;

    Gallery_mc.removeChild (loader);}}

    unloadAndStop() is supported by flash player 10 or higher (fp 10 +).

    p.s. Please check the useful/correct, if there is.

  • import FLV files results in a black screen when he's on stage

    import FLV files results in a black screen when he's on stage. Why is this happening? I have a swf file, then using swf video converter convert. I then import the video and when it is put on the stage she translates into a black screen that had no pictures. This happens even when I play the swf file.

    The converted file works fine when I open it with a Media Player for this indicates clearly that the flash is having a problem.

    The SWF-> Video converter is very certainly at fault for your problems. That's why I think you should either use ActionScript to import the SWF file to play or import once in a new document and export it as a video directly from flash. I used FLV for a long time and I've seen a lot of questions. This is no easy task to convert a SWF to a video. I think it makes more sense to let Adobe do the work, it was designed to do.

  • Play externally. FLV files

    I'm pretty new Flash and working with MX 2004 with Flash 2. I tried several methods to play an external. FLV file. Some ideas for this forum and others of the Flash help system. Either I don't understand their and/or I'm not their implementation properly, but nothing has worked. I read of a FLVPlayback component and my system has a component in the component window MediaPlayback. I also saw yards of actionscript to read these files. Can someone give me a basic/simple method, with example code or button-to-push if necessary, to have one. SWF play an external. FLV via my MX 2004 system? Thank you

    This will help you

    http://www.communitymx.com/content/article.cfm?cid=7574e

  • How to bind an object on the stage of an external class file?

    I have a dynamic textfield called neighName on my Flash stage. I also have a movieclip that I call a region on my stage. When I mouseover in the region, I want a Word to display a small popup * and * I want to text to display in my textfield. I have an external .as file for the management of the region. I can do the code 'see' my area, but I can't seem to see my textfield, even if no error is thrown. Help, anyone?

    My bad - I put the textfield.visible to false. Apparently, I need more coffee.

  • Several loaded FLV files

    Ok

    In my main script, I have a few buttons. When you click on a button you are diverted to the an image tag in the main timeline.

    When the timeline stops to say frame 2 that a flv is loaded into a clip of blank film on the main stage.  If you click on the button 2, same thing. In total I have so about four FLV this room when a button is pressed. If I go to by clicking my buttons to test the sweetness of my flv, after that about three clicks of navigation between my flvs frames/load my film main set becomes slower.

    Each FLV is about 5 MB.

    The following code gets start when I click on my button and taking me to this image. My question is, if I jump between FLV with each click of a button is the FLV file that always plays first play and causing the main movie together to slow down? Is there a better way to handle this? What I need to unload the film play when I click? I'm trying to see if there is a better way to have a smooth streaming of my flv. The flv file which becomes able to simply start looping when it's done and servers background 'mobile '.

    is there something else can I implement in my code that will keep my smooth game flv load? Thank you

    This is the code in the main timeline, which is responsible for my external swf that will load the FLV file

    var myLoader:Loader = new Loader();
    addChild (myLoader);
    var url: URLRequest = new URLRequest ("theexternal.swf");
    myLoader.load (url);

    This is the code that is in the external SWF file that will launch the FLV file.

    Fl.video import. *;

    function onFLVComplete(event:VideoEvent):void {}
    Event.Target.Play ();
    }

    swl.addEventListener (VideoEvent.COMPLETE, onFLVComplete);

    After some trial and error, I have the winning code and the solution. My action script resided inside the physical video I created that was charge my external swf. I decided to try to work around it and put the code on the main timeline of the main SWF and it worked! Thank you for assiting me everyone.

    var myrequest2:URLRequest = new URLRequest ("external.swf")

    var myloader2:Loader = new Loader();
    myloader2. Load (myrequest2);
    stage.addChild (myloader2);
    myloader.unloadAndStop ();

  • How can I stop WMP to import .flv files?

    Original title: How can I stop WMP to import .flv files?  Windows media player is important all my .flv files, but when I try to play Windows Media Player currupts and stops working.

    I deleted the video files .flv twice, but Windows Media Player import again.

    Hi Ellen,

    1. have you plugged an external storage device which Windows Media Player attempts to import? Where exactly that Windows Media Player, try to import files .flv?

    2. you have any third-party media players installed on the computer?

    Windows Media Player cannot play the FLV files. You will need a third party FLV player to play these files, or you will need to install the latest pack of codecs on your computer. If the installation of plugins did not help, then try searching on the Internet for the codec pack.

    Check this link for more information:
    http://Windows.Microsoft.com/en-us/Windows7/codecs-frequently-asked-questions

    Note: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Hope this information helps.

  • addition of html in the box edge animate the text of the external js file

    I have a text field in the anime that I want to update with a score of edge. The function that allows you to click and update the partition is in an enternal file so I'll try to figure out how to get my div animated dashboard replaced by jquery in the external file. That's what I have so far in the external js, but it is not reading the field to animate the text of edge correctly:

    external .js file:

    AdobeEdge.coinCounter += 250; It called the coinCounter variable introduced in edgeActions.js and the initial value of 0 updates
    Alert (AdobeEdge.coinCounter); This shows that it works and updated correctly

    var comp = AdobeEdge.getComposition ("EDGE-172492634");

    var point = comp.getStage ();

    stage.sym.$("gameText").html (AdobeEdge.coinCounter); It's when things go wrong. I want this updated value in the text box named 'gameText' which is in the composition of edgeAnimate

    stage.sym.$("gameText").html ("NewText"); There is no indication in the text box 'gameText. " something must be wrong how am I referencing outside edgeActions in the external .js file

    Did someone mind helping me to refer to the text box 'gameText"correctly so I can enter my new value? Thank you!!

    Hello

    You must remove "sym.": internship. $("gameText").

  • created variable on click in edgeActions.js but want to reference in the external js file


    Hi, I created a variable on click in edgeActions.js but want to reference in the external js file. This is where I am so far:

    In my edgeActions.js I have variable st on compositionReady and then use it when I click the icon: questionMarkR1. It works fine... the problem is that I don't know how to reference the variable in my external js file. This first code works of the edgeActions.js:

    Symbol.bindElementAction (compId, NomSymbole, 'document', 'compositionReady', function (sym, e) {})


    sym.setVariable ("questionAsked", false); sets the initial value

    });

    Symbol.bindElementAction (compId, NomSymbole, "${_questionMarkR1} ', 'click', function (sym, e) {})

    var questionAsked = sym.getVariable ("questionAsked");

    Alert (questionAsked);

    If (questionAsked) / / if it is true
    {
    SYM. $("checkButton2") .removeClass ("hidden");
    SYM. $("popUp") .removeClass ("hidden");


    }
    of other fake //if
    {

    SYM. $("pic2a") .removeClass ("hidden");
    SYM. $("pic2b") .removeClass ("hidden");
    SYM. $("pic2c") .removeClass ("hidden");
    SYM. $("pic2d") .removeClass ("hidden");

    SYM. $("closeBox") .removeClass ("hidden");
    }

    });

    This next part does not work because I don't know how to properly reference the variable. That's what I've tried and it doesn't work:

    var questionAsked = sym.getComposition () .getStage () .getVariable ("questionAsked");


    Alert (questionAsked);

    Hello

    Animate edge exposes an API for external scripts, you will need to use in your case:

    For more information about the API to animate edge, see API JavaScript Adobe Edge animate CC

    Use the code below in your external js file:

    var comp = AdobeEdge.getComposition ("EDGE-606063631"); replace 'EDGE-606063631' by your model id, you can find in the .html file

    var point = comp.getStage ();

    var questionAsked = stage.getVariable ("questionAsked");

    Alert (questionAsked);

    HTH,

    Vivekuma

  • How do I caption an FLV file?

    Hi all

    I had a request to add subtitles in an FLV file (Yes, customers continue to use FLV, as well as DVDs and God knows what other Adobe said redundant - we ask you to update legacy supported Adobe, but please at least leave them in the latest versions so do not fill our disks with several CC versions to carry out basic tasks! / rant).

    Does anyone know of a good workflow to incorporate subtitles into an FLV file? I have access to the CC first releases. From my tests it does not resemble SOUL 7.0 will incorporate CC in an FLV file. I'm looking for a freeware called Magpie program that seemed promising, but I couldn't get past the splash screen for a reason any. Other tools, workflows, tips out there? I am trying to incorporate into the phase of transfer FLV, rather than at the stage of the reading.

    See you soon

    So after a lot of trial and error, I found a free application (Yes free, as opposed to $50 per month) that can run the oh-so-difficult task of pairing of a FLV file with a file of subtitles, Any Video Converter. Does not give me a lot of options but voila.

  • How to play external flv in swf

    Hi I'm provided me with the code

    Movie.Load("c:/movielocation.flv");

    Movie.Play (movielocation. (FLV);

    Sound fundamentally does not not video is in lourdes to play as embeded I don't really know what is my next step can someone help me with this issue?

    Please and thank you

    Pascale

    remove this code.

    Create a new directory and save an fla in this directory.  Add the flv file in this directory.

    Add an flvplayback component to your stage of fla, and in the properties panel, set its contentPath (as2) / source (as3) to be yourflvname.flv

    test.

  • How to prevent the sounds of the timeline in external swf files to play during the loading?

    I'm having a problem with the sounds of the external timeline in the swf files play while charging in a main swf file. Can someone help me?

    Here is a part of the main code of the swf. I hope I got enough.

    Thank you.

    import flash.events.MouseEvent;

    import flash.display.MovieClip;

    import flash.display.Loader;

    to import flash.events.ProgressEvent;

    import flash.events.Event;

    import flash.net.URLRequest;

    Import fl.events.SliderEvent;

    import flash.media.SoundTransform;

    preloader_mc.fill_mc. ScaleX = 0;

    var swfA:Array = ["part1.swf", "part2.swf"];

    var frameA:Array = [];

    var currentLoader:Loader;

    var swfTotalFrames:int;

    var tl:MovieClip =;

    var st:SoundTransform = new SoundTransform()

    var int index = 0;

    loadNextF();

    play_slider. Enabled = false;

    function loadNextF (): void {}

    TL ["loader_" + index] = new Loader();

    TL ["loader_" + index] .name = index.toString ();

    TL ["loader_" + index].contentLoaderInfo.addEventListener (ProgressEvent.Progress, progressF);

    TL ["loader_" + index].contentLoaderInfo.addEventListener (Event.Complete, completeF);

    TL ["loader_" + index] .load (new URLRequest (swfA [index]));

    }

    function progressF(e:ProgressEvent):void {}

    var fractionLoaded:Number = index/swfA.length+e.bytesLoaded/(e.bytesTotal*swfA.length);

    preloader_mc.fill_mc. ScaleX = fractionLoaded;

    preloader_mc. TF. Text = (100 * fractionLoaded) + "% Loaded";

    }

    function completeF(e:Event):void {}

    TL ["loader_" + index].contentLoaderInfo.removeEventListener (ProgressEvent.PROGRESS, progress F);

    TL ["loader_" + index].contentLoaderInfo.RemoveEventListener (Event.Complete, completeF);

    SoundMixer.stopAll ();

    var mc:MovieClip = MovieClip (tl ["loader_" + index] content);

    mc.gotoAndStop (1);

    frameA.push (mc.totalFrames);

    index ++;

    if(index<swfA.Length) {}

    loadNextF();

    } else {}

    / / full of all charges.  start playing.

    restart_mc.buttonMode = true;

    restart_mc.Alpha = 1;

    tl.addEventListener (Event.ENTER_FRAME, playUpdateF);

    tl.removeChild (preloader_mc);

    preloader_mc = null;

    play_slider.enabled = true;

    playpause_mc.Alpha = 1;

    currentLoader = tl ["loader_0"];

    tl.addChild (currentLoader);

    MovieClip (currentLoader.content) .play ();

    sliderParamsF();

    }

    }

    I have about 70 sounds in my two external SWF. What I need to stop all of them?

    //---

    more than likely, Yes. I guess it depends on how you have 70 put sounds up in your external swf file... I mean:

    you have 70 movieclips appointed on the external swf stage with a distinct sound in each of them? and each have a stop() action in the first picture?

    or

    you say your external swf to go to a certain image tag that plays a sound on the timeline to this label?

    or

    are your 70 sounds created dynamically with code and told. start()?

    //---

    Keep in mind, a swf loading will start to play even before it is fully charged. So instead of when it is fully charged, try stop the loaded swf with a listener for 'init', i.e. when the swf file loaded passes its first image:

    function loadNextF (): void {}

    TL ["loader_" + index] = new Loader();

    TL ["loader_" + index] .name = index.toString ();

    . contentLoaderInfo.addEventListener TL ["loader_" + index] (ProgressEvent. COURSES, progressF);

    TL ["loader_" + index].contentLoaderInfo.addEventListener (Event.COMPLETE, completeF);

    TL ["loader_" + index].contentLoaderInfo.addEventListener (Event.INIT, initF);

    TL ["loader_" + index] .load (new URLRequest (swfA [index]));

    }

    function initF(e:Event):void {}

    SoundMixer.stopAll ();

    var mc:MovieClip = MovieClip (tl ["loader_" + index] content);

    mc.gotoAndStop (1);

    }

  • Access the textField on the timeline of an external as file?

    Hello

    I have an external as file.

    I was wondering what I put in to update a textField I have pulled manually on the stage?

    what I would normally put in the timeline panel are:

    myField.text = 'Tester ';

    What would you put in an exteranl as a file, and what to include:

    import flash.display.MovieClip;

    import flash.display.Stage;

    .. .in the as files too?

    Thank you

    Shaun

    put the same thing if you 'include' as folder.  Otherwise, if your file is a class file, the answer depends on how you use your class file.

Maybe you are looking for