Load Multiple Dynamic Text Files in Different frames on Maintimeline

Hello!
I have managed to load an external text file in one place one the maintimeline. I would like to do the same thing on other frames. When I go to duplicate the same thing that I did on the first one I get a duplicate textReq request. Do I need to give the textReq a more specific name for each section? When I did this the movie wouldn't even recognize and of the code that was working before.
Can anyone help me with this code? Thanks in advance
I am attaching link so you can see sections I am talking about. Also you will notice that the swf file I loaded won't go away. That's another problem...ugh.
Here is link:
http://www.sandraschmitt.com/coclico/index100.html
Here is code on maintimeline:
stop();
import fl.transitions.*;
import fl.transitions.easing.*;
import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
import flash.events.ProgressEvent;
function startLoad() {
    var swfLoader:Loader = new Loader();
    var swfRequest:URLRequest = new URLRequest("endlessCoclico3.swf");
    swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
    swfLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
    swfLoader.load(swfRequest);
function onCompleteHandler(loadEvent:Event) {
    addChild(loadEvent.currentTarget.content);
function onProgressHandler(swfProgress:ProgressEvent) {
    var percent:Number = swfProgress.bytesLoaded/swfProgress.bytesTotal;
    trace(percent);
startLoad();
//handle events for buttons...
collections.addEventListener(MouseEvent.CLICK, clickSection);
raison.addEventListener(MouseEvent.CLICK, clickSection);
stores.addEventListener(MouseEvent.CLICK, clickSection);
news.addEventListener(MouseEvent.CLICK, clickSection);
contact.addEventListener(MouseEvent.CLICK, clickSection);
home.addEventListener(MouseEvent.CLICK, clickSection);
function clickSection(evtObj:MouseEvent) {
    //trace shows what's happening... in the output window
    trace("The "+evtObj.target.name+" button was clicked!");
    //go to the section clicked on...
    gotoAndStop(evtObj.target.name);
Here is code on actual frame where the dynamic text is working:
//Loaded exteranl text fields
var textLoader:URLLoader = new URLLoader();
var textReq:URLRequest = new URLRequest("text_philosophy.txt");
function textLoaded(event:Event):void {
    philosophy_txt.text = textLoader.data;
textLoader.load(textReq);
textLoader.addEventListener(Event.COMPLETE, textLoaded);

Textfields:  What I like to do, mainly for peace of mind, is to have a layer that I dedicate to actionscript that only has code in frame 1 but it extends the full length of the timeline so that this code is available to every frame on any other layer.  In this frame I put variables and functions that can get used/shared wherever they happen to be needed.  I usually create another separate layer for actions types of actionscript... stuff that happens at the local frame level, like stop();, or like assigning a variable a new value, etc... things local to being at that frame/location.  So with that in mind
In frame 1 on my shared-by-everyone layer, I'd probably declare the variable....
var textReq:URLRequest;
And when I get to a particular frame where I want to load a new textfield with data, I assign that var its value on the local actions layer...
textReq = new URLRequest("text_philosophy.txt");
along with the rest of the local execution regarding loading the file, etc...
SWF's:
Yeah, pretty much, and it becomes an object that has a home on the timeline, so if you move away from that frame the swf doesn't follow.

Similar Messages

  • How to load and unload more than one external swf files in different frames?

    I do not have much experience on Adobe Flash or Action Script 3, but I know the basics.
    I am Arabic language teacher, and I design an application to teach Arabic, I just would like to learn how to load and unload more than one external swf files in different frames.
    Thanks

    Look into using the Loader class to load the swf files.  If you want to have it happen in different frames then you can put the code into the different frames.

  • How to load multiple .wrl (VRML) files?

    Hi all,
    I need to load four components of a coffee table into the virtual universe, the four components are top, base, left leg and right leg. I use four parts not one whole single object because in this way when I change the size of this furniture, I can make the thickness of the edges fixed, which is a must. The four parts consist a table correctly in the design software TopSolid, but when I load the four .wrl ojbect files seperately in the application, they cannot compose a table correctly. I guess the reason is the four components have been resized and translated automatically in the VRML loader. I have reviewed the source code of the VRML loader and some related source code but not be able to find where the auto resize code is.
    I have used four Wavefront .obj files instead to do another technical demonstration, if I disable the ObjectFile.RESIZE flag, and just scale the four parts by myself using the same scale factor, I can get a perfect coffee table, with every part in correct location. But my supervisor insist on using VRML .wrl files in our project.
    I hope someone can give me some kind instructions or advises on how to do it in VRML97 loader (https://j3d-vrml97.dev.java.net/).
    Any help will be highly appreciated.

    Answered here : http://www.java.net/forum/topic/javadesktop/java-desktop-technologies/java-3d/trying-load-multiple-wrl-vrml-files-same

  • Play multiple sound files in different frames from library in flash

    My assessment task for college is to create a webpage of my work.  So far it runs brilliantly except for this.  I only need this to be working in like 2 days!  Help!
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at Carolyns_Media_Portfolio_Scene1_fla::MainTimeline/frame5()
    at flash.display::MovieClip/gotoAndStop()
    Trying to be able to play sound clips from the library with the option to play and stop the sound file. Each sound has its own frame, with stop and play buttons. I can run the first sound file perfectly being able to start and stop it but when trying to play the next sound it creates the above error on output. I have dead buttons as well on the second sound.
    The top buttons take you to each scene
    The script runs from frame 5.
    import flash.events.MouseEvent;
    **buTrivia.addEventListener(MouseEvent.CLICK,clickListener7);
    function clickListener7(event:MouseEvent):void {
    SoundMixer.stopAll()
    gotoAndStop("trivia");
    buToyRA.addEventListener(MouseEvent.CLICK,clickListener8);
    function clickListener8(event:MouseEvent):void {
    SoundMixer.stopAll()
    gotoAndStop("toyminatorRA");
    buCaroline.addEventListener(MouseEvent.CLICK,clickListener9);
    function clickListener9(event:MouseEvent):void {
    SoundMixer.stopAll()
    gotoAndStop("caroline");
    buServerDown.addEventListener(MouseEvent.CLICK,clickListener10);
    function clickListener10(event:MouseEvent):void {
    SoundMixer.stopAll()
    gotoAndStop("serverdown");
    This was the script I found and edited.  Only Trivia works
    stop();
    var triviaSound:trivia = new trivia()
    var triviaChannel:SoundChannel = new SoundChannel();
    buplay1.addEventListener(MouseEvent.CLICK, playSound1);
    buStop1.addEventListener(MouseEvent.CLICK, stopSound1)
    function playSound1(event:MouseEvent):void
    triviaSound.play();
    function stopSound1(event:MouseEvent):void
    SoundMixer.stopAll()
    gotoAndStop("trivia");
    /*buplay2.addEventListener(MouseEvent.CLICK, playSound2);
    bustop2.addEventListener(MouseEvent.CLICK, stopSound2)
    var toysSound:toys = new toys();
    var toysChannel:SoundChannel = new SoundChannel();
    function playSound2(event:MouseEvent):void
    toysSound.play();
    function stopSound2(event:MouseEvent):void
    SoundMixer.stopAll()
    gotoAndStop("toyminatorRA");
    Basically I want to play all the sounds, from the library, individually in different frames using the option to play and stop that sound.  I found the above script but only works for one sound.  I am new at scripting in flash so any help or even a better script option would be awesome.  Thank you

    The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....
    - is declared but not instantiated
    - doesn't have an instance name (or the instance name is mispelled)
    - does not exist in the frame where that code is trying to talk to it
    - is animated into place but is not assigned instance names in every keyframe for it
    - is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).
    If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

  • Movie refuses to load variables from text file

    Hi,
    I'm sure you can solve my newbie problem in less than 1
    minute...
    I'm pulling my hair out on a template I bought 2 days ago
    from templatemonster.com
    I am using Flash 8 Pro.
    All I want to do is change an existing textfield that is
    Static to Dynamic and load variables from a text file.
    The Action Script I use to do so comes directly from
    Macromedia documentation (see attached)
    It works fine when I create a brand new movie, but doesn't do
    anything when inserted into the template.
    It doesn't even complain about not finding the text file if I
    rename or delete it!
    Here are the FLA and text file:
    Edit : Link to source file removed
    The textfield I would like to change is in the txt2 symbol.
    Here is how I proceed:
    When I open HEADER.FLA, Flash tells me I'm missing a font,
    ok, so I click on Use Default, I'll deal with this later.
    I open up the Movie Explorer, go to Layer 30, go to Frame 75
    and click once on txt2
    I name the instance "myMovie_mc" and save (converts from
    Flash MX to Flash 8)
    I double-click on the Movie Clip, select the word
    "Automobile" on the Stage, change from Static to Dynamic and call
    that instance "myText_txt"
    Still in the Movie Clip, I create a new layer I call
    "actions", and in Frame 1 I copy the attached Action Script:
    This script works when I create a new flash file, but it does
    absolutely nothing in this template.
    I know I'm doing something wrong, but I wonder what?
    Many thanks to any helping soul!
    Ferris.

    try this:
    // Load text as variable and assign it to the
    // dynamic text field
    var features_lv:LoadVars = new LoadVars();
    features_lv.onLoad = onText();
    features_lv.load("safetyFeatures.txt");
    function onText(success:Boolean) {
    if (success) {
    myText_txt.text = features_lv.safetyfeatures;
    } else {
    myText_txt.text = "unable to load text file.";
    or this
    // Load text as variable and assign it to the
    // dynamic text field
    var features_lv:LoadVars = new LoadVars();
    features_lv.onLoad = function(success) {
    if (success) {
    myText_txt.text = features_lv.safetyfeatures;
    } else {
    myText_txt.text = "unable to load text file.";
    features_lv.load("safetyFeatures.txt");

  • Loading Multiple excel sheets in to different tables in a DB

    Hi All,
    I have problem in loading multiple excel sheets data in to according to that excelsheets tables in a DB.
    All the excel sheets are in a folder,from that folder i have to  acces all excel sheets.
    For this i am unsing script task and one dataflow task.
    But the error is coming in script task i am not able to put the path in the script..
    Is this the correct way to do like this? Or any other way?
    Can u please tell me the solution for this..Thanks in advance who are responding to this mail...
    Maruthi..

    Hi Vipin,
    Here you go with this requirement
    How to Load Multiple Sheets From Multiple Excel Files to Different Tables in SSIS Package?
    ttps://www.youtube.com/watch?v=1WXKpkwjhX8&feature=youtu.be
    I have other videos as well where you want to load all the sheets from file/s to same table 
    https://www.youtube.com/watch?v=F3sYO-S9icc&feature=youtu.be
    Check out the last links on below links all related to Excel
    http://sqlage.blogspot.com/search/label/SSIS%20Videos
    How to Create Excel file with Date-time on Each Package Execution in SSIS Package?
    How to Load Multiple Sheets to a SQL Server Table in SSIS Package?
    How to Load Data Excel File to SQL Server Table and Solve Data Conversion Issues?
    How to Load Multiple Sheets From Multiple Excel Files to Different Tables in SSIS Package?
    How to Load Data to Pre-Formatted Excel Sheet (Excel Report) in SSIS Package?
    All the best!
    http://sqlage.blogspot.com/

  • Loading data from text file into ListBox

    I have data in a text file that I want to load into a
    listbox... I have fully mastered handling strings and arrays so I'm
    going to need some help...
    I was wondering how do I get flash to load a text file that
    contains the data below.. and display it line for line like I want
    it to list down the component
    "Launch;7.1.7.6"
    "Engine;7.1.7.6"
    "OSX;7.0.0.2" (or something close to that)
    and I was wondering how do i just get it to take it fromt he
    file.. line for line from where it says exeversion in the file and
    list it in the listbox...
    I'm really thankful to anybody that helps.
    Data in text file:
    quote:
    exeversion=Launch;7.1.7.6;
    exeversion=Engine;7.1.7.6;
    exeversion=LinuxX86;7.0.0.2;
    exeversion=LinuxPPC;7.0.0.2;
    exeversion=LinuxMIPS;7.0.0.2;
    exeversion=OSX;7.0.0.2;
    exeversion=Config;7.1.7.6;
    exeversion=UI;7.1.7.7;
    exeversion=JAVA;7.0.4.5;

    nobody cna help me? i really need to know or have a tutorial
    or something so i can learn from it... i really appreciate anyone
    who helps

  • Unable to find file error while loading data from text file to Oracle

    Hi,
    I am having a interface where i am loading a data of Text file to Oracle.
    But when i am trying to do this i am getting following error.
    ODI-1227: Task SrcSet0 (Loading) fails on the source FILE connection SAPMM.
    Caused By: java.sql.SQLException: File not found: d:/mdb/#General.get_filename
         at com.sunopsis.jdbc.driver.file.FileResultSet.<init>(FileResultSet.java:160)
         at com.sunopsis.jdbc.driver.file.impl.commands.CommandSelect.execute(CommandSelect.java:57)
         at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
    SAPMM is connection name.
    I am using get_filename to get the filename and it is fetching correct value as the this variable refreshes in previous step of this interface.
    KM used for loading is File to SQL
    What would be cause of this error?
    Thanks,
    Mahesh

    Hi,
    Did a testing and following are the result
    I have
    A> created package having steps like
    1. Declaration of variable v_filename.
    2. Refreshing variable v_filename.
    3. Execution of Interface which gets the file name from v_filename and load into target table
    Package executes successfully.
    B> created package having steps like
    1. Declaration of variable v_filename.
    2. Refreshing variable v_filename.
    3. Scenario of Interface which gets the file name from v_filename and load into target table
    Package executes with erre as it is not able to find the file
    C> created package having steps like
    1. Declaration of variable v_filename.
    2. Refreshing variable v_filename.
    3. Execution of Interface which gets the file name from v_filename and load into target table
    4. Now create a scenario of the package , use the generated scenario in another package say main_package
    Execution of main_package is successful.
    Thanks,
    Sutirtha

  • Scenario or adapter to sending a text file to different target directories

    Hi experts
    In XI 3.0 I have developed a file2file scenario that takes a comma-separated file (*.csv) and converts it and returns a text file that is sent to a specific directory, the name input file determines the Target Directory, for each input file there is a sender channel and receiver channel that put the output file in the Target Directory. The problem is that i have many channels and not know how to make only one sender channel which takes the input file and the receiver channel to sends the output file to the destination directory through the file name. e.g. VTAS03.csv file located in target directory //work becomes in Clients.txt file in the directory //sap03 ie //work/VTAS03.csv --> //sap03/Clients.txt while the file VTAS05.csv must go to the directory //sap05 i.e. //work/VTAS05.csv --> //sap05/Clients.txt, //work/VTAS07.csv --> //sap07/Clients.txt so on.
    In short the output file name is the same for all but must go to different directories according to the input file name without using as many channels of communication.
    Someone can help me or tell me how to do this?
    Thanks  

    Liz,
    Please use the below steps if you are considering of using mapping program.
    Select the check boxes for the following Adapter Specific Message attributes in
    Sender Channel - FILE
    Receiver Channel - DIRECTORY
    Put the file name as Clients.txt in receiver channel , and directory name can be anything like TEST
    DynamicConfiguration conf = (DynamicConfiguration) container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        "http://sap.com/xi/XI/System/File",
        "Directory");
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create(
        "http://sap.com/xi/XI/System/File",
        "FileName");
    String temp = conf.get(key1);
    String src_filname = temp.substring(4,5) //This is used to get the last two digit value from the file name
    String tar_dir = "//sap"+src_filename+"/";
    conf.put(key,tar_dir);
    return "";
    I hope the above suggestion solves your problem!
    Thanks!

  • Is SAP capable of sending a TEXT file in different modes like DOS ?

    Is SAP capable of sending a TEXT file (.txt)  in different modes like DOS ?

    Yes SAP is capable to send .txt file in different mode.
    For this you have to maintain the setting of Code page and encoding. There so may types of encoding (UTF-8, UTF-8 without BOM, UTF-16 etc) supported by SAP. You can check them from SAP logon pad.
    If you are creating the file on application server then you can also mentioned encoding statement in OPEN DATASET statements.
    For more details check open dataset statement.

  • Write arrays into a text file in different columns at different times

    Hi,
              I have a problem write data into a text file. I want to write 4 1D arrays into a text file. The problem is that I need to write it at different time and in different column (in other word, not only append the arrays).
    Do you have an idea to solve my problem?
    Thank you

    A file is long a linear string of data (text). In order ro insert columns, you need to rewrite the entire file, because colums are interlaced over the entire lenght of the file.
    So:
    read file into 2D array
    insert columns using array operations
    write resulting 2D array to file again.
    (Only if your colums are guaranteed to be fixed width AND you know the final number of colums, you could write the missing columns as spaces and then overwrite later. Still, it will be painful and inefficient, because column data are not adjacent in the file.)
    LabVIEW Champion . Do more with less code and in less time .

  • Remove duplicates while loading data from text file

    Hi,
    Data in text file (some times has duplicates) is being loaded into Oracle 9i database using Informatica. To improve performance, we would like to remove duplicates at the time of each load using Oracle procedure. Could you please help me with this?
    Thanks,
    Lakshmi

    No, our table doesn't have that. Most of the functionality is managed at the informatica level. Is there any other way? Thanks,

  • How do I prevent sharing a text file by different users

    Hello,
    I am using LV8.6.1 and writing this application that read and write to a text file. The application is being used by many users at different sites and I want to prevent writing to the text file when other user is already using it (reading or writing to it). The other user should only be able to use it when it's not being read or getting written.
    Any suggestions? I know LV file function 'Set Permissions' won't work. I need a file attribute that tells that the file is open, so don't use it.

    I think the only real obtion is one I've seen some other programs use.
    Create a lock file in the same directory.
    1.  You want to open myfile.txt.
    2.  Your program looks to see if myfile.lck is present.  (Same filename, just the extension is different)
    3.  If it is present, you don't open the file or you give a warning.
    4.  If it is not present, you create a myfile.lck file.  It could be a small text file.  Perhaps you place in it the user name of the person who is opening the file.
    5.  When your VI is done with the file and "closes" it, your VI deletes the myfile.lck file.
    So the presence of the myfile.lck file indicates the file is being used.
    The absence of the myfile.lck indicates the file is available to be used.
    The only risk is if somehow the person who "takes out" the file somehow ends their application unexpectedly and the .lck file doesn't get deleted even though they are done.  You would need to manually go in and delete the .lck file.  But username data in the .lck could help determine who had the file last and you could confirm if they are really using it or not.  Putting the filedate in the warning information would help determine if it was a recent lock, or an old lock that is likely stale.

  • Script for access or load of a text file in forms

    Hi all
    In the forms 6i I want to access or load a text file/csv file.
    For that me have created a button on a form and when button pressed trigger.
    But my problem is that for getting the output me not able to get what to write in the script like should be dbms package or print function or any other and where can me get the output.
    can anybody suggest me the script as well.

    Try:
    try {
                BufferedReader in = new BufferedReader(new InputStreamReader(
                                  new FileInputStream(file), encoding));
            textarea.read(in, null);
                in.close();
            catch (Exception ex) {
                System.err.println(ex, "Error reading file " + file);
            }

  • Down load or create text file using bapi

    hi friends,
    My requirement is to create text file or down load text file in presentation server when the bapi runs in which the ip address is defined at the interface.
    plz sujjest me,
    points will be rewarded .
    prasad.

    Hi,
    The FM 'GUI_DOWNLOAD' should use the network path like '
    10.10.10.10\shared_file\PO.txt'. Pass this value to the file path parameter and execute the program.
    Thanks..
    Preetham S

Maybe you are looking for

  • HDR is not working after a new installation of Photoshop

    After a system crash of my computer I had to reinstall all programms. In the past I made a lot of HDR pictures, I will say I know what i have to do. But after the new installation of PS when I merge some photos with HDR pro the result is much more da

  • Create a report based on Workflow entities status.

    Hello guys! I want to make a report that shows me all entities grouped by workflow status (Not Started, First Pass, Under Review, etc.). It is possible? All answers will be accepted!! Regards! Fabian

  • Can't open new windows if clicking on a link!

    For some reason I can't open new windows if I clic on a link. It's alright if it opens in a new tab, but if it opens in a new window, the window that opens is just blank. I have no idea why it's doing so, it started a couple of weeks ago, and it's ve

  • SQL Developer wont work via SSL (TCPS)

    I am trying to get SQL Developer (1.5.1) to connect to our Oracle database using SSL (tcps -- port 2484) and am getting a very generic error. (I have no error connecting to the same database over the unencrypted port -- 1521). Status: Failue - Test f

  • Intel Rapid Start stops working when RAM upgraded

    I have a brand new ENVY dv7-7212nr notebook running Windows 8 64-bit. This machine has Intel Rapid Storage Technology which caches hard disk data (I think on the 32GB SSD) and Intel Rapid Start Technology which stores active memory in the SSD cache (