Control a SWF from Flex file?

I have a flex application with a stack of view which has some of his children SWFLoaders.

For example, "page 2" the view stack is an interactive SWF of flash cs3. It loads and works perfectly, but how to stop and reset it to Flex, as when the user changes discovered battery views?

Fortunately, the SWF file is playing, but the user goes back to 'page 1' from VS, the SWF on the page 2 always plays its audio.

How can I control the SWF file?

I found an old post which enabled, with a simple change. In the interest of helping others who find this thread, here's what worked for me:

In my element 'page 2 ':

Import mx.controls.SWFLoader;

private var movie_clip:MovieClip;
private var myLoader:SWFLoader = new SWFLoader();

private function init (): void {}
myLoader.addEventListener (Event.INIT, loadHandler);
myLoader.load ("equipment.swf");
this.addChildAt(myLoader,0);
}

private void loadHandler(e:Event):void {}
movie_clip = e.target.content;
}

public function pp (): void {}
movie_clip.remotePause ();
}

]]>

And then, in the main application:





Tags: Flex

Similar Questions

  • How can I control a button from a swf file to another swf file?

    Hello

    I have a file main.swf . From this file I can access the file external.swf which is an external file.

    Now, how can I write code on my file main.swf to the button that is on my external.swf file?

    Activities.MainPanel.close_btn.addEventListener (MouseEvent.CLICK, btnClickClose);

    Activities.MainPanel.close_btn (This button is actually the external.swf file, but I want to write code on main.swf file to run it on external.swf) How can I control a single swf in another swf file button?

    Thank you.

    Some examples of code that you should be able to adapt to your needs.

    create a new instance of the loader object.

    var loader: Loader = new Loader();

    make the download request...

    var request: URLRequest = new URLRequest ("external.swf");

    Add a full event for the loader listener

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

    start the actual loading process...

    Loader.Load (request);

    Create a new empty movieClip instance, you place the movie loaded into this movieClip after loading

    var externalMovie:MovieClip;

    This function is called when the download is complete and the file is ready for use.

    function completeHandler(event:Event):void {}

    set the contents of the film to the new empty movieClip...

    externalMovie = MovieClip (event.target.content);

    Add this new film to the display list.

    addChild (externalMovie);

    }

    Now you can reference the film loaded with the name of the instance 'externalMovie '. So if, for example, you want to address a button in the film loaded, you can write something like that on the main timeline:

    externalMovie.addEventListener (MouseEvent.CLICK, btnClickClose);

    function btnClickClose(event:MouseEvent):void {}

    }

  • Import data from text file of control of the ring.

    Is it possible to import data to a text ring with labview control.

    I have several definitions of register in the ring controls, but manual entry would take a lot of time.

    Was wondering if there was more automatic way, I could read the values from a file.

    Thank you

    Jim

    Using the first method gives you the ability to extend such that each column specifies a control of the ring if you need fill the multiple rings.

    This example assumes that all of the three rings contain the same number of elements. If this isn't the case, you will need to create a Subvi, which removes the empty elements. [Edit - create a text file that contains a column for each ring, separated by a tab character.]

  • SWF in Flex - what is a data exchange?

    Hello it's me again,

    I'll solve most of my problems myself I really stuck in it.

    I have a *. FLA file that contains a function call. I want to integrate this file in my FLEX project that contains the function.

    Is it possible to make them work together? If not - I know not how it should work with the SWF file.

    What I try to do is to control the behavior of Flex components with my Flash (*.fla-> swf) file. So please just give me a tip I get depressed.

    Greetz Antoni

    Hi Antoni,

    It seems that you want to create a SWF using Flash Authoring and then load this SWF in a Flex 2 application and call functions in all of this border.

    You can only call a function in a loaded SWF file directly from an application Flex 2 containing if the swf you are loading using ActionScript 3. Currently, the Flash Authoring version that supports ActionScript 3 published SWFs is in beta:

    http://labs.Adobe.com/technologies/flash9as3preview/

    Thank you

    NJ
    Flex Builder team

  • How to access ColdFusion from FLEX session variables

    Hi all
    Is it possible to access Session variables in ColdFusion from Flex?
    I access ColdFusion CFCS in Flex using the Webservice queries. Running Flex SDK 3.2/Flex Builder3 / ColdFusion8

    Any help is appreciated!

    Pass variables (parameters) in your application Flex is to change the Flex Builder generated .html file that calls your application .swf in a .cfm file (just change the file extension). Then edit the file and search for the AC_FL_RunContent add a property for the Flash Variables like this: "flashVars", "MyName =#CGI. USER name #«,»
    In the Flex application, you can call myName = Application.application.parameters.myName;
    This can pass ColdFusion variables into Flex.
    Scott

  • VI Analyzer "a few screws and/or essays have been added or removed from your file system because you have saved changed this configuration file."

    When I run VI analyzer and open our standard configuration file, the message "some screws and/or essays have been added or removed from your file since changed record system this file of configuration." appears. By clicking OK, choose something to analyze and move to the VI Analyzer - select the Tests, the selection of testing control dialog box is completely empty and the Analyze button is grayed out.

    I'm runing LabVIEW 2013 on Windows 7, VI Analyzer worked before and I tried repairing and uninstalling the LabVIEW program (then reinstalling) already. If I do not select a config file or try to reset all the test configurations, control of the Tests remains empty.

    Is it possible to restore the tests or difficulty just the VI Analyzer toolkit?

    The only thing I remember to change since I ran last parser is that I installed the tiara.

    Most likely someone accidentally moved the test record THROUGH by accident

    VIA installs like a Toolbox and would not repair with just a LabVIEW installation

    You could re - install Media Developer Suite if you have that in the opposite case:

    Or the other

    Change > getting started window or

    Tools > find a LabVIEW Addons

    will launch the search VIPM tool

    Search for VI Analyzer

    Download and install

  • where can I find answers / help for Microsoft Outlook Express 6. A batch of 4 months of emails hepatitis has disappeared from my file SENT. THX

    Cannot find where to look for help on Outlook Express (OE 6). ???  A lot of emails suddenly disappeared from my file of SENT MESSAGES, and I need them.

    Help of OE is at: XP Networking & Online , but I can help.
    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-networking?page=1&tab=all
     
    View | Current view. Show all Messages is verified? If this is the case, then you have to do.
     
     
    Two reasons the most common for what you describe is disruption of the compacting process, (never touch anything until it's finished), or bloated folders. More about that below.
     
    Why OE insists on compacting folders when I close it? :
    http://www.insideoe.com/FAQs/why.htm#compact
     
    Why mail disappears:
    http://www.insideoe.com/problems/bugs.htm#mailgone
     
    Recovery methods:
     
    If you are running XP/SP3, then you should have a backup of your dbx files in the Recycle Bin (or possibly the message store), copied as bak files.
     
    To restore a folder bak on the message store folder, first find the location of the message store.
     
    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.
     
    In Windows XP, the .dbx files are by default marked as hidden. To view these files in the Solution Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder options | View.
     
    Close OE and in Windows Explorer, click on the dbx to the file missing or empty file, then drag it to the desktop. It can be deleted later once you have successfully restored the bak file. Minimize the message store.
     
    Open OE and, if the folder is missing, create a folder with the * exact * same name as the bak file you want to restore but without the .bak. For example: If the file is Saved.bak, the new folder should be named saved. Open the new folder, and then close OE. If the folder is there, but just empty, continue to the next step.
     
    First of all, check if there is a bak file already in the message. If there is, and you have removed the dbx file, go ahead and rename it in dbx.
     
    If it is not already in the message, open the trash and do a right-click on the file bak for the folder in question and click on restore. Open the message store up and replace the .bak by .dbx file extension. Close the message store and open OE. Messages must be in the folder.
     
    If messages are restored successfully, you can go ahead and delete the old dbx file that you moved to the desktop.
     
    If you have not then bak copies of your dbx files in the Recycle Bin:
     
    DBXpress run in extract disc Mode is the best chance to recover messages:
    http://www.oehelp.com/DBXpress/default.aspx
     
    And see:

    http://www.oehelp.com/OETips.aspx#4
     
     
     
    A general warning to help avoid this in the future:
     
    Do not archive mail in default OE folders. They finally are damaged. Create your own folders defined by the user for mail storage and move your mail to them. Empty the deleted items folder regularly. Keep user created folders under 300 MB, and also empty as is possible to default folders.
     
    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:

    http://www.oehelp.com/OETips.aspx#3 
     
    And backup often.
     
    Outlook Express Quick Backup (OEQB Freeware)
    http://www.oehelp.com/OEBackup/default.aspx  
  • Hi windows mail will open only 1 email from each file, i.e. Inbox, junk e-mail, sent, all folders, emails are always in the folders when I check properties I checked Show all messages

    Hi windows mail open only 1 email from each file, i.e. Inbox, junk, sent mail, all of these files. summer's fine for 3 years. Show msgs is checked.i can see in the properties of the Inbox I have 70 messages they are there but only 1 will open I see msgs in orange webmail, they say no problem for this purpose. I can also see them in users email location.worried man help

    Assuming that it is an email account POP3, go to the message store and see if the messages are really there.  They must be located under the directories for the folder names under the main directory of local folders in the message store.  The store is located under the Users\ [username] \AppData\Local\Microsoft\Windows Mail\ directory and is hidden, so first go to control panel | Folder options | View and uncheck Hide extensions of known file types (so you can distinguish the eml files which are messages) and check the option to show the hidden files and folders.  Then you can see if the messages are in fact always there or missing.  See here for background: www.oehelp.com/backup.aspx#wm and also here for what may have caused it: www.oehelp.com/OETips.aspx#3 as Bruce stated, if the messages are still on the server, you can set up your account again and then download them again.

    Steve

  • BB10 - Audio/video in HTML5 - reading file from the file system

    Hello.

    I tried to read a file from the file system on the BB10 Dev Alpha, using the HTML5 video + HTML5 Audio implementation, but it seems to not work for me with the following source code:

    var audio = document.createElement('audio');
    audio.src="/accounts/1000/shared/music/testfile.wav";
    audio.controls = true;
    
    var video = document.createElement('video');
    video.src="/accounts/1000/shared/videos/testfile.avi";
    video.controls = true;
    

    Referring to the HTML5 Audio API documentation and Video of HTML5 , I used the example presented here source code, but I still get the following error message:

    Anyone now how to get it working or if it is not yet implemented in the BB10 WebWorks API/framework?

    Well, I believe that what could be the problem.  In order to access to the / shared the location of the folder, your application should allow the permission to do so.  This can be done by adding the following to your config.xml file:

    
        access_shared
    
    

    Next, you need to whitelist the way file:/// by adding an element to access.  I remember that's how its done:

    
    

    Note You can whitelist all areas using the following:

    
    

    Hope that helps.

  • How can I move back the rman convert a file from the file system to the ASM?

    I have no idea on the pluging - in files of data which were landed as follows:

    SQL > alter tablespace P_CDDH_DSPGD_V1_2011 read-only;

    SQL > alter tablespace P_IDX_CDDH_DSPGD_V1_2011 read-only;

    SQL > exec dbms_tts.transport_set_check('P_CDDH_DSPGD_V1_2011,P_IDX_CDDH_DSPGD_V1_2011',true);

    SQL > select * from transport_set_violations;

    UNIX > expdp dumpfile ttsfy1.dmp directory = trans_dir transport_tablespaces = P_CDDH_DSPGD_V1_2011, P_IDX_CDDH_DSPGD_V1_2011 = tossadm@pmscdhf1

    RMAN > convert the tablespace P_CDDH_DSPGD_V1_2011, P_IDX_CDDH_DSPGD_V1_2011 format = ' / appl/oem/backup/temp/%I_%s_%t_extbspace.dbf';

    Conversion from the source at October 3, 13

    using the control file of the target instead of recovery catalog database

    allocated channel: ORA_DISK_1

    channel ORA_DISK_1: SID = instance = 116 pmscdhf11 = DISK device type

    channel ORA_DISK_1: from data file conversion

    Enter a number of file datafile = name = + PMSCDHF1/p_cddh_dspgd_v1_2011_01.dbf 00079

    convert datafile=/appl/oem/backup/temp/3536350174_2820_827849001_extbspace.dbf

    channel ORA_DISK_1: datafile conversion complete, duration: 00:02:15

    channel ORA_DISK_1: from data file conversion

    Enter a number of file datafile = 00080 name = + PMSCDHF1/p_idx_cddh_dspgd_v1_2011_02.dbf

    convert datafile=/appl/oem/backup/temp/3536350174_2821_827849136_extbspace.dbf

    channel ORA_DISK_1: datafile conversion complete, duration: 00:01:45

    Finished conversion to the source to 3 October 13

    From control file Autobackup 3 October 13

    total, handle = / DBMS/oracle/r1110/db_01/dbs/c-3536350174-20131003-02 comment = NONE

    Control file Autobackup ended on 3 October 13

    SQL > drop tablespace P_CDDH_DSPGD_V1_2011 including the content;

    SQL > drop tablespace P_IDX_CDDH_DSPGD_V1_2011 including the content;

    Subsequently, how can I move the backup files to ' / appl/oem/backup/temp/3536350174_2820_827849001_extbspace.dbf ', ' / appl/oem/backup/temp/3536350174_2821_827849136_extbspace.dbf ' back to the Group ASM + PMSCDHF1?

    Or dbms_file_transfer

  • the .swf and .html files does not work while the .fla file works great

    Hi I'm new to actionscript, and I have a question. The fla file works perfectly and runs the timer function and reads the xml file to create an RSS feed, but when I publish and choose HTML wrapper and then choose 14 Flash swf and html file load the photos and the text field but isn't something else please help.

    Thanks in advance.

    import flash.net.URLLoader;

    import flash.net.URLRequest;

    import flash.events.Event;

    import flash.text.TextField;

    import flash.text. *;

    import flash.utils.Timer;

    import flash.events.TimerEvent;

    var RSSLoader:URLLoader = new URLLoader();

    var RSSURL:URLRequest = new URLRequest ("http://sports.yahoo.com/soccer//rss.xml");

    RSSLoader.addEventListener (Event.COMPLETE, RSSLoaded);

    RSSLoader.load (RSSURL);

    var RSSXML:XML = new XML();

    RSSXML.ignoreWhitespace = true;

    var title: TextField;

    var desc:TextField;

    var allText:TextField;

    title = new TextField();

    allText = new TextField();

    var i: int;

    function RSSLoaded(e:Event):void {}

    trace ("xml load file here");

    RSSXML = XML (RSSLoader.data);

    for {(var selectedItems:String in RSSXML.channel.item)

    title. Text = (RSSXML.channel.item [selectedItems] .title + "/");

    title.wordWrap = true;

    tfLog.text += title.text;

    tfLog.wordWrap = true;

    trace (title. (Text);

    }

    }

    var t:Timer = new Timer (200);

    t.addEventListener)

    TimerEvent.TIMER,

    function(EV:TimerEvent): void

    {

    tfLog.text tfLog.text.substr = (1) + tfLog.text.charAt (0);

    }

    );

    t.Start ();

    var picTimer:Timer = new Timer (2000);

    picTimer.start ();

    picTimer.addEventListener (TimerEvent.TIMER, timehandler);

    function timehandler(event:TimerEvent):void {}

    setChildIndex (getChildAt (7), 0);

    }

    A way around that is to have a PHP file on your server that reads the XML feed and your swf reads the data from the PHP file rather than directly from the external domain.

  • RMAN backup using control as repository via networker file

    Hi guys,.

    I use the control as the rman repository file. Currently I have this backup running at 20:00 every night:

    backup format full filesperset 4 ' / Data_%d_%U/' (database);
    SQL 'alter system switch logfile;
    SQL 'alter system archive log current';
    overlap archivelog all;
    backup format '% s_ %%t p_ arch_' archivelog all;
    delete archivelog all completed before ' sysdate-3'; "

    And the log backup archive running from 07:00, 11:00, 16:00.


    Have a few queries:

    1. understand that with the above, backup control files will also be included as RMAN automatically includes the control file and the SPFILE in backups of data file 1.
    So in all cases when my control file is accidentally deleted from the server, I always can I restore from the backup right?
    I think I need set the db first as a control the file id is my deposit. If the control is absent, it can identify the control file for restore by setting db IDs?
    2. my automatic backup of control is set to off. What is the difference between the control file backup taken by autobackup compared to 1?
    understand controlfile autobackup is good because it will automatically backup if there is no change in the db (as new file created, etc.). Any other difference?
    3.
    Plateforme BACKUP CURRENT CONTROLFILE
    ❐ a control within a file backup by using the CONTROLFILE CURRENT INCLUDE of the BACKUP command
    What is the difference with this backup from controlfile backup to point 1 and 2?

    4. Finally, if my control + bow + datafiles, redo file is deleted by mistake at 18:00. I've restored the control taken to yesterday 20:00 file. The control file consisting only of 20:00 and before backup information, how to restore the rest of the newspapers arch taken by 07:00, 11:00, 16:00?



    Thank you

    Since you talk about networker, I presume that you are copying backups from disk to tape as a separate order of networker. Do not forget to include the controlfile record as well during the copy on tape!

    1. Yes, you can restore the controlfile and spfile from the backup. But you will need to manually determine what backup piece contains the backup controlfile and spfile. (In the scenario where you assume the controlfile is lost, you cannot issue a BACKUP LIST to identify the backuppieces, so you will have files from search logs to identify the backuppiece!)

    2. a controlfile autobackup will be created in db_recovery_file_dest using OMF. If you do not have it defined, the controlfile autobackup is epxected to go in $ORACLE_HOME/dbs - although the location of the actual target can be dependent on version and platform.

    3. a backup BACKUP CONTROLFILE creates a separate backupset and backuppiece for the controlfile. In OMF, it goes in the backup directory, not in the AutoSave directory.

    4. without a repository, if your archivelog backups are on the disc, you can catalog THEM (i.e. run 'CATALOGUE START WITH /disklocation' command) in the controlfile you restorted to the backup from 20:00. You cannot catalog backuppeices tape is advicable to use a repository when you back up directly to tape.

    Hemant K Collette

  • Control loaded swf on the main timeline

    Hello

    I'm working on loading external swf files for ios. I am able to load swf files and assembled visible or invisible in different settings. I have trouble controlling the swf files loaded on the main timeline. Specifically, I would like to have a button on the main timeline, that when you click on will move a swf loaded to frame 1.

    Here is a code that loads a swf file:

    var myLoader1:Loader;

    var loaderContext1:LoaderContext = new LoaderContext (false null, ApplicationDomain.currentDomain),

    if(myLoader1 == null)

    {

    myLoader1 = new Loader();

    addChild (myLoader1);

    }

    myLoader1.load (new URLRequest("folder/file1.swf"), loaderContext1);

    myLoader1.visible = true;

    backbutton.addEventListener (MouseEvent.MOUSE_DOWN, backbutton1);

    function backbutton1(myEvent:MouseEvent):void {? myLoader1.gotoAndStop (1) ;}}  (this line does not work)

    (Once I load file1.swf, in the file1.swf I click a next button to move on to different periods.) My question is: hHow do I code the "backbutton" on the main timeline so that it causes the file1.swf to go to frame 1?)

    Thank you for your help.

    After loading is complete (and assuming that you load an as3 swf), you can use:

    MovieClip (myLoader1.content) .gotoAndStop (1);

  • Flash as2 cross subject to access the SWF from another server domain

    I have question cross-domain, how do I access the .swf from another swf file without using System.Security.allowDomain() in the swf file, which we are called.

    I use 2 domains and I have 2 files swf is a.com (a.swf) and another is of bcom (b.swf) I want to access the file the a.swf b.swf frames, if I use the system.Security.allowDomain() in b.swf file I can access executives. But without using this way I can access the file from another domain.

    Because I have a risk to change the file b.swf so I vant to go without changing the file b.swf is any other wey to access frames of the file the file a.swf b.swf. Please someone help me solve this problem.

    use a local executable (such as php) to load the b.swf and send it back to a.swf.  for example:

    loadSWF.php:

    <>

    $fh = fopen ("www.b.com/b.swf", "r");

    Header ("Content-type: application/x-shockwave-flash");

    fpassthru ($FH);

    ?>

    a.fla:

    var target_mc:MovieClip=this.createEmptyMovieClip("target_mc",this.getNextHighestDepth());

    target_mc.loadMovie ("loadSWF.php");

  • Discovers a .swf from a Mac

    Hello community,

    This seems to be a simple question for me but I can't seem to find an answer in the forums...

    If I use a Mac, how can I view a .swf file? Is a required plug-in?

    Here's the situation... we create the training of new recruits PRIOR to the first day at the office. Some of these new recruits will use Mac at home.

    This training will be stored on our CMS that allows no HTML, however, she allows. SWF files.

    If a new employee is trying to access the .swf from a Mac, it cannot be displayed.

    What (the community) suggestions do you have for this scenario?

    BTW-we use Cap 5.5.

    Thank you in advance,

    Susan

    SWF requires Adobe Flash Player plugin which is not supported by Apple devices. So, you can either convert your SWF output in mp4 (many tools available on the net for it) or post your file as output mp4.

    Here is a short video showing publish them feature of Captivate 5.5 mp4.

    http://www.YouTube.com/watch?v=mDb-qo1lUGw

Maybe you are looking for

  • Why records both V2 and V3 in Mail 8.2

    I have two extremely large subfolders in my mail folder - V2 and V3 for a total of ±35GB. They seem to imitate the other that they have practically the same subfolders. Is - this true or false? They can / should be combined? I have rebuilt letters an

  • My Skype crashed

    When I start my Skype is that it is frozen, then it crashes

  • I'm looking for a fan for laptops Toshiba control utility

    Hello I'm looking for a utility to control the fan for computers laptop toshiba (like i8kfangui for example). someone help...

  • AutoFill on Satellite phone

    My laptop auto fills all the boxes that requires any entry with the entry several times of number 1. When I try to log on to my laptop, the password box automatically fills the password with 1 and keeps repeating. This also happens with Web pages, e-

  • Press the scrolling in HP 14 - d106TX does not

    Hello I have a HP 14-d106TX laptop and I installed sp64985 - Alps TouchPad driver for the touchpad drivers. I use windows touch getstures 8.1 and everything seems to work fine except the scrolling. Please help me solve this problem Thank you