How to set levels for external swf's??? loading code added!

hi,
im using flash cs5, as2.
i have a main index fla that loads into it 5 swf's.
i need these 5 to be loaded into a lower level than the main index fla (index has to be the highest level)
how can this be acheived?
i have no idea on how or where to code this.
my code for loading the movies is:
F1
var IndexLoaded = _root.getBytesLoaded();
var total = _root.getBytesTotal();
var percent = int(IndexLoaded/total*100);
var loadingName = "Loading.. " + percent + "%" + " of " + "Index";
var checkFrameplay = 0;
Bar_anime.gotoAndStop(percent);
Loadtext_txt.text = loadingName;
if (IndexLoaded == total) {
                var n = 0;
                gotoAndPlay(3);
F2
gotoAndPlay(1);
F3
var movie:MovieClip = _root.StoredActions.Con.createEmptyMovieClip("movie"+n,n +1);
loadMovie(n+".swf",_root.StoredActions.Con["movie"+n]);
var MovieLoaded = 0;
percent = 0;
_root.StoredActions.Con["movie"+n]._x = 3000;
F4
MovieLoaded = _root.StoredActions.Con["movie"+n].getBytesLoaded();
loadTotal = _root.StoredActions.Con["movie"+n].getBytesTotal();
percent = int(MovieLoaded/loadTotal*100);
Bar_anime.gotoAndStop(percent);
loadingName = ("Loading.. " + percent+ "%" + " of "+ n);
Loadtext_txt.text = loadingName;
if (loadTotal>10) {
                if (MovieLoaded>=loadTotal) {
                                gotoAndPlay(6);
F5
gotoAndPlay(4);
F6
if (n < _root.nMenus) {
                n++;
                gotoAndPlay(3);
} else {
                gotoAndStop("Stopload");
                _root.gotoAndPlay("Playmovie");
F7
stop();
thanks in advance for any help.
sajjy

hi,
i understand what you are saying about the code, im no advance user of as2 but i can say from all the research i have done, iv not seen anyone using this sort of code, its all over the place.
but on the other hand, even though its a mess, its working and all the site functions and buttons work well with the code.
basically the main.swf is the structure of the site, it has all the images/frames in the right places.  the other swfs load into a little window on the main.swf.  this window has some shading/reflections on it and the problem i have is when i scroll the movieclips, they scroll over the shading/reflections making it look tacky, if i didnt use any scrolling it would be fine but i need to use it due to having a small window.
the content of the window is controlled by a button thats on the main.swf.
each of the loaded swfs have dynamic text, movieclips, buttons to open external html windows.  nothing advance to be honest, all the interactive movieclips are controlled by clicking on them, navigating to another frame (using labels).
i would upload the files for you to have a look but im under strict ruling that i cant share the content as its not yet been released to the public.
i hope that helps clear a few things up for you.  if i cant get the levels to work then i guess it will have to stay like that or i will have to scrap the whole project and start again.

Similar Messages

  • How do I get my external swf to load in the release build?

    My external swf loads in the debug build, but not in the release build.  How can this be fixed?
    Thanks,
    Doug

    After exporting the Flex project on my Macintosh, then importing it on my PC, then rebuilding the relase
    build, it works.  Probably some "path" issues between Mac and PC.
    Doug

  • How to set shortcuts for external keyboard for MacBook Pro?

    I attached a wired external keyboard (Apple aluminum) to my MacBook Pro. Several of the function keys are preprogrammed, and several are open. I want to program one of the open function keys to emulate the F11 key on the internal keyboard, the one that moves all open windows out of the way to show the desktop. The keyboard shortcuts tab in System Preferences only controls the internal keyboard.
    Does anyone know a way to do this?

    Bump. Searching for a solution to the same problem.

  • How to include contextMenu for whole swf

    Hi everybody,
         Let me know How to include contextMenu for whole swf?

    I have a similar problem.
    Stand alone my Sprites custom context menu always works. I can instantiate it using code, and nest it 'n' levels deep.
    When I add it to my main application, a default context menu is shown.   The main application is very complex - as it's a design application similar to Balsamiq Mockups - so every individual widget has a stand alone test harness.   This has been working very well as a way of coping with the size and complexity of the main application. But the context menu thing just doesn't work in the main application, and from the documentation I've seen nothing that suggests I should have had any problems including else wher.
    Please, please if anyone knows why in some scenarios a context menu stops working and the default context menu is shown instead then please share as I'm at the point of tearing my hair out on this....

  • HOW TO: set anchoredObjectSettings for .palce() object?

    Hi, I'm currently working on interesting script for GREP placing, and I'm wondering how I can set anchoredObjectSettings for .palce() object?
    for(i=0; i < found.length; i++)
        foundElem = new File (myFolder + "/" + found[i].contents);
        found[i].place(foundElem); // Placing Ancored Object
        // HERE IS WHERE I NEED SOME HELP: how to set "anchoredObjectSettings" for just placed Ancored Object
        //anchoredObjectSettings.anchoredPosition = AnchorPosition.ABOVE_LINE;
        //anchoredObjectSettings.horizontalAlignment = HorizontalAlignment.TEXT_ALIGN;
    Here you can download example files - script, InDesign file and images, that should be placed into InDesign file with script
    Dropbox - GREP placing.zip
    PS: I believe this script will be very useful, so if anybody have any ideas/suggestions, and want to help me with further development - this would be great!

    Hi Kai, this script is still under development, here is updated version attached (now it can also place files/images by file name only, without extension):
    #target indesign;
    //#include  "! Basic functions.jsx"
        GREP place files.
        This script will ask to select source folder with files to place,
        and then, with dialog box (or prompt) [this is not implemented yet, so I use static GREP value while developing]
        will ask to type GREP find expresion to search for text placeholder, that need to be replaced with file from source folder we just selected.
        TODO: Check how it works with other than image formats
            Also, this might be usefull to make anchored frame with column widh, and fit image proportionally
    scriptName = decodeURI(File(app.activeScript).name.slice(0, -4)); // detect name of current script without expression
    function Alert(msg) // function for native-looking alerts
        w = new Window ("dialog", scriptName, undefined, {closeButton: true});
        w.preferredSize = [300,75]; // window width and height
        w.margins = 15; // window margins
        w.orientation = "column";
        w.alignChildren = ["left", "top"];
        w.add("statictext", undefined, msg);
        close = w.add ("button", [0,0,96,20], "OK", {name: "Ok"});
        close.alignment = ["right", "bottom"];
        close.onClick = function(){exit();}
        w.show();
    main();
    function main()
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
        if(app.documents.length == 0)
            Alert("No documents are open. Please open a document and try again."); exit();
        else
            //> START OF doUndoWraper
            if (parseFloat(app.version) < 6) // "app.version < 6" if it's running under an earlier version than CS4, as earlier versions don't support "Undo" in scripts
                doUndoWrapper();
            else
                app.doScript(doUndoWrapper, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, scriptName);
            //< END OF doUnoWraper
    function doUndoWrapper() // this is the wraper function UNDO everything script made  by single undo
    {// START OF doUndoWrapper
    defaultGREPexpression = "(?i)^[a-z0-9 _-]+\\.\\w{2,4}$"; // Paragraph that starts with upper or lower case latin character, digits, spaces, hyphen or underscore, and ends with .extension
    var myFilteredFiles;
    var myExtensions = []; // initialize array
    myExtensions.push(".jpg", ".jpeg", ".png", ".gif"); // raster images
    myExtensions.push(".psd", ".tif", ".tiff", ".pdf"); // raster images (layered)
    myExtensions.push(".ai", ".eps", ".svg", ".cdr"); // vector graphics
    myExtensions.push(".mp3"); // audio files
    myExtensions.push(".mp4"); // video files
    myExtensions.push(".swf"); // flash files
    myExtensions.push(".doc", ".docx", ".rtf", ".txt"); // text documents
    myExtensions.push(".xls", ".xlsx"); // table documents 
    //Display the folder browser.
    if(app.activeDocument.saved) // our document was saved before - we suggest to start search for source folder from were InDesign file saved
        var myFolder =  Folder(app.activeDocument.filePath).selectDlg("Select the source folder with files for placing", "");
    else // file was not saved before, so we don't know where to search > suggest to start from Desktop
        var myFolder = Folder.selectDialog("Select the source folder with files for placing", "");
    if(myFolder) // if folder was selected
        //Get the path to the folder containing the files you want to place.
        var files = new Object(); // This will assoc array with FILE_NAME => FILE_EXTENSION
        if(File.fs == "Macintosh")
            myFilteredFiles = myMacOSFileFilter(myFolder);
        else
            myFilteredFiles = myWinOSFileFilter(myFolder);
        if(myFilteredFiles.length != 0) // success: we have found supported files to place
            for(i = 0; i < myFilteredFiles.length; i++)
                var filename = myFilteredFiles[i].fsName.toString().replace(/^.*[\\\/]/, ""); // now we get only file names with extenstions
                var file = [];
                file = filename.split("."); // separate file name from file extension         
                files[file[0]] = file[1]; // write FILE_NAME => FILE_EXTENSION as assoc array
        else // error: There is no supported files for placing in specified folder
            Alert("ERROR: There is no supported files for placing in specified folder.");
            exit();
    else // ERROR: we have not choose source folder
        Alert("Folder with source files was not specified"); exit();
    //Windows version of the file filter.
    function myWinOSFileFilter(myFolder)
      var myFiles = new Array;
      var myFilteredFiles = new Array;
      for(myExtensionCounter = 0; myExtensionCounter < myExtensions.length; myExtensionCounter++)
            myExtension = myExtensions[myExtensionCounter];
            myFiles = myFolder.getFiles("*"+ myExtension);
      if(myFiles.length != 0)
                for(var myFileCounter = 0; myFileCounter < myFiles.length; myFileCounter++)
      myFilteredFiles.push(myFiles[myFileCounter]);
      return myFilteredFiles;
    function myMacOSFileFilter(myFolder)
      var myFilteredFiles = myFolder.getFiles(myFileFilter);
      return myFilteredFiles;
    //Mac OS version of file filter
    //Have to provide a separate version because not all Mac OS users use file extensions and/or file extensions are sometimes hidden by the Finder.
    function myFileFilter(myFile)
        var myFileType = myFile.type;
        switch (myFileType)
            case "JPEG":
            case "EPSF":
            case "PICT":
            case "TIFF":
            case "8BPS":
            case "GIFf":
            case "PDF ":
                return true;
                break;
            default:
            for(var myCounter = 0; myCounter<myExtensions.length; myCounter++)
                var myExtension = myExtensions[myCounter];
                if(myFile.name.indexOf(myExtension)>-1)
                    return true;
                    break;
      return false;
    //> START OF GREP expression dialog
    w = new Window ("dialog", scriptName+": specify expression", undefined, {closeButton: true});
    w.preferredSize = [300,75]; // window width and height
    w.margins = 15; // window margins
    w.orientation = "column";
    w.alignChildren = ["left", "top"];
    panel = w.add("panel", undefined, "Find what: (GREP expression)");
    if(app.findGrepPreferences.findWhat != "")
        grepExpression = app.findGrepPreferences.findWhat;
        clearFindWhat = false;
    else
        grepExpression = defaultGREPexpression; // use default GREP expression
        //fgrepExpression = "\\[.+\\]"; // \\< means "begining of the world", and \\> means end of the world;
        clearFindWhat = true;
    var grepExpression = panel.add ("edittext", [0,0,270,20], grepExpression);
    grepExpression.active = true;
    panel.add("statictext", undefined, "GREP expression no need for for double \\\\ escaping");
    ok = w.add ("button", [0,0,96,20], "Continue", {name: "Ok"});
    ok.alignment = ["right", "bottom"];
    ok.onClick = function()
        findWhat = grepExpression.text; 
        w.hide();
    w.show();
    //< END OF GREP expression dialog
    if(typeof findWhat !== "undefined") // check we have not left GREP expression field empy
        app.findGrepPreferences.findWhat = findWhat; // our GREP that search for image placeholder text;
        found = app.activeDocument.findGrep();
        for(i=0; i < found.length; i++)
            if(found[i].contents.indexOf(".") > -1) // we wroking with file name with extension
                foundElem = new File (myFolder + "/" + found[i].contents);
            else // we work with file name only, so we need to add file extension manually
                found[i].contents = found[i].contents.replace(/[^a-z0-9 _-]/gi, ""); // remove all unwanted characters from file name: only letters, numbers, spcaces, minus and underscores allowed     
                foundElem = new File (myFolder + "/" + found[i].contents + "." +  files[found[i].contents]);     
          try
                placedObj = found[i].place(foundElem)[0].parent; // THANKS TO: Jump_Over for help @ https://forums.adobe.com/message/6912489#6912489
                placedObj.anchoredObjectSettings.anchoredPosition = AnchorPosition.ABOVE_LINE;
                placedObj.anchoredObjectSettings.horizontalAlignment = HorizontalAlignment.TEXT_ALIGN;
                placedObj.frameFittingOptions.autoFit = true;
                placedObj.frameFittingOptions.fittingOnEmptyFrame = EmptyFrameFittingOptions.FILL_PROPORTIONALLY;
                placedObj.frameFittingOptions.fittingAlignment = AnchorPoint.CENTER_ANCHOR;         
            catch(e)
                Alert(e);         
        app.changeGrepPreferences.changeTo = "";
        app.activeDocument.changeGrep();
        if(clearFindWhat) // clearing only if typed GREP expression manually
            app.findGrepPreferences = app.changeGrepPreferences = null; // clear Find/Change preferences once we finished
    else
        Alert("Find what GREP expression was not specified"); exit();
    }// END OF doUndoWrapper
    Top part with Windows/Mac filtering was copy-pasted from default InDeign script "ImageCatalog.jsx" as example and modified - I'm not sure if all this stuff is needed, I haven't test if it works the same without those filtering on both OS - if that's not needed - then thanks for tip!
    PS: in your findWhat \l{3,4} will not catch .ai files
    and what means .source at the end? is that doing necessary escaping, so with it it's posible to write \l instead of \\l

  • AS3 how to put the buttons always on top of the external swf in the code below?

    how to put the buttons always on top of the external swf in the code below?  I am  beginner use to as3, can someone help me?
    thanks, for all!!
    var Xpos:Number = 110;
    var Ypos:Number = 180;
    var swf:MovieClip;
    var loader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest("swfs/eyesClosed.swf");
    loader.load(defaultSWF);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
    // Btns Universal function
    function btnClick(event:MouseEvent):void {
    removeChild(loader);
    var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf");
    loader.load(newSWFRequest);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
    // Btn listeners
    eyesClosed.addEventListener(MouseEvent.CLICK, btnClick);
    stingray.addEventListener(MouseEvent.CLICK, btnClick);
    demon.addEventListener(MouseEvent.CLICK, btnClick);
    strongman.addEventListener(MouseEvent.CLICK, btnClick);

    use:
    var Xpos:Number = 110;
    var Ypos:Number = 180;
    var swf:MovieClip;
    var loader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest("swfs/eyesClosed.swf");
    loader.load(defaultSWF);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
    // Btns Universal function
    function btnClick(event:MouseEvent):void {
    removeChild(loader);
    var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf");
    loader.load(newSWFRequest);
    loader.x = Xpos;
    loader.y = Ypos;
    addChildAt(loader,0);
    // Btn listeners
    eyesClosed.addEventListener(MouseEvent.CLICK, btnClick);
    stingray.addEventListener(MouseEvent.CLICK, btnClick);
    demon.addEventListener(MouseEvent.CLICK, btnClick);
    strongman.addEventListener(MouseEvent.CLICK, btnClick);

  • How to set View for Completed items inside Tasks?

    How to set button for 'View' and see Completed items or not completed inside Tasks?

    Hi,
    You want to set custom views for Tasks folder so that when we click a view button, it will show all Completed or incomplete tasks, am I correct?
    Which version of Outlook are you using? There are existing views for completed/incomplete tasks in Outlook. In Outlook 2010 and Outlook 2013, we can find the buttons under View tab > Change View. Click Completed button to view all completed
    tasks; Click Active button to view incomplete tasks.
    In Outlook 2007, just click View > Current View to switch between different views.
    If I've misunderstood something, please feel free to let me know.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to set  password for BPEL domain

    Hi,
    I am new to SOA.
    I want to setup client-server environment for few developers.
    I installed SOA 10.1.3.3 in the server machine.
    And I created few domains in BPEL, one for each developer.
    It didn't ask me to set the password while creation of the domain.
    Please let me know how to set password for newly created domain so that each developer login to his/her own domain and manage processes.
    Thanks!!!

    Thanks for the prompt response.
    What roles should I give to my developers to allow them to manage their services in ESB control, BPEL control, WSM control.
    And I would like to know how to set the password for a BPEL domain too.
    Message was edited by:
    user644377

  • How to set password for every application

    Hi,
    As a administrator how to set password for every weblication in sharepoint 2013.
    Is there any way to set?
    Thanks,

    Who's password are you trying to set? Please provide more details.

  • How to set password for a zip file and should be checked when reading that

    Hi friends,
    how to set password for a zip file and should be checked when reading that file???
    thanks.
    Praveen Reddy.J

    Heyy man, i think, u did not get my problem.
    all i have to do is:
    i have to create a zip file, and we should secure it with password when creating. and whenever the user wants to open that zip file he should provide correct passowrd otherwise he could not read that file. So, we should check for that also.
    Tanks for reply.

  • How to set password for Local are connection?

    How to set password for Local are connection?

    do you mean the 802.1x authentication?
    check out links below:
    http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2950/software/release/12-1_9_ea1/configuration/guide/scg/Sw8021x.html
    http://technet.microsoft.com/en-us/network/bb545365.aspx
    Every second counts..make use of it. Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    IT Stuff Quick Bytes

  • How to set value for trim and bleed using jsx script?

    I have tried using bleedoffsetRect but somehow it is not working. Can anybody please help me on how to set value for trim and bleed using jsx script? Any example will be highly appreciated.
    Following is the code I am trying with:
    var _saveName = new File ( root_path +_strFileName+".pdf");
        var _saveOpts = new PDFSaveOptions();
        _saveOpts.printerResolution = 300; 
        var bleedarray = new Array();
         bleedarray[0] =9.00;
         bleedarray[1]=9.00;
         bleedarray[2]=9.00;
         bleedarray[3]=9.00;    
        _saveOpts.bleedOffsetRect = bleedarray;

    I would expect although I've not actually tried this for the bleed off set box to be larger than the artbaord and the first two values to be negative or 0…
    var bleedarray = new Array(-9,-9,artboard.width+9,artboard.height+9);
    Where 'artboard.width' & 'artboard.height' you will have calculated from your file. An Array(9,9,9,9); would not constitute any boxes bounds.

  • How to set sourceURL for MS Access database in other computer?

    How to set sourceURL for MS Access database in other computer?
    getConnection("jdbc:odbc://www.micrsoft.com:9999/msaccess");
    How do you determine the port for the MS Access?
    Thank you very much.

    How to set sourceURL for MS Access database in other computer?You don't.
    How do you determine the port for the MS Access?You don't.
    Databases like Oracle and MS SQL Server have 'server' software which runs on a server computer. Requests talk to that server software. MS Access does not have a server, so there is nothing to talk to.
    You either must use a DSN or create you own server. For the DSN each client must have a mapped driver to the computer with the database. For your own server search the Sun site for JDBC drivers or use RmiJdbc (http://www.objectweb.org/)

  • How to set color for a tabstrip in BSP

    Hello all,
    Can anyone please let me know how to set color for a tabstripn in BSP?
    I am using the below syntax but it still gives me the default color.
    <htmlb:content design="design2003" >
      <htmlb:page title="test " >
        <htmlb:form>
    <htmlb:tabStrip id         = "TabStrip"
                          bodyHeight = "200"
                          bodyColor  = "red"
                          width      = "700" >
    </htmlb:tabStrip>
    </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Thanks,
    Sandeep

    Hi...
    The below code is working fine for me...
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="stg " >
        <htmlb:form>
          <htmlb:tabStrip width      = "430"
                          bodyColor  = "rgb(88,5,64)"
                          id         = "t1"
                          bodyHeight = "112" >
            <htmlb:tabStripItem id      = "t1"
                                index   = "1"
                                title   = "Sales"
                                tooltip = "My Tooltip for Tab 1" >
              <htmlb:textView text="Tab N 1" />
              <htmlb:tree id        = "treeReports"
                          showTitle = "true"
                          table2    = "<%= mt_nodes %>"
                          title     = "Menu"
                          width     = "100%" />
            </htmlb:tabStripItem>
            <htmlb:tabStripItem id      = "t2"
                                index   = "2"
                                title   = "Production"
                                tooltip = "My Tooltip for Tab 2" >
              <htmlb:textView text="Tab N 2" />
            </htmlb:tabStripItem>
          </htmlb:tabStrip>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>

  • How to set optional for table structure in functiona module

    hi experts,
    as i have small doubt regarding
    while publishing web service by using rfc where i am unable to set optional for table structure i am able to put optional for import parameters may i know how to set optional for table structure ....
    reagrds prabhanjan

    Ignoring the TABLES/CHANGING/EXPORTING argument...
    while publishing web service by using rfc where i am unable to set optional for table structure i am able to put optional for import parameters may i know how to set optional for table structure
    Why not?  There's no issue with marking a TABLES interface parameter with 'Optional' and publishing the function module or function group as a web service...

Maybe you are looking for

  • Amount of primary freight

    Hi Guys, Could you please suggest me for below report. A report that will provide the amount of primary freight we spent in 2007. The freight costs need to be reported in two ways: Vendor to Distributor - Distributor to Distributor Thnaks tata

  • HP G62 Windows Startup error recovery Failure

    Notebook: HP G62 - 228CL Running Windows 7 64-bit Hello everyone, I need a bit of help. My computer will boot windows 7. When I start it up, it tries to boot up.  I then get a Windows failed to boot message on the windows error recovery screen and as

  • User with IE8 can't see automatically masthead

    Hello, One of our Portals which was developped for external users and working via F5 shows a security message for IE8 users. This message says that the https page contains secure and non-secure objects- the user shold decide if he wishes to continue.

  • Can anyone guide me how to do Oracle Certification in HRMS/Payroll

    Hi Can anyone guide me how to do Oracle Certification in HRMS/payroll & what are basic exams required to complete for the eligibility?

  • HT201303 what is my security code?

    what is sequrity code?