Building a loader inside of a scene

Hey Everyone
I have a quick question (I think). I have some old AS2 code
from a client that has a loader in scene 1 and the movie in scene
2. I built and external loader in a separate SWF but they want the
loader, and movie to be in the same SWF but different timelines. I
figured I could build scene 1 with two frames. The first frame
would have this code on frame 1:
pBar.width = (Math.round(this.bytesLoaded/this.bytesTotal) *
100)
on frame 2 the code would be:
if(this.bytesLoaded == this.bytesTotal)
nextScene();
else
gotoAndPlay(1)
I figured I could use the timeline as a constant checker of
bytes, but it seems that every time it gets to the if statement it
halts, even though I have a else statement telling it to go back to
frame 1
This is one of many combinations I have tried but no luck at
all. I am starting to think this is not possible. Any help would be
appreciated.
T.I.A

that isn't quite right in as2 and it's not right in as3. are
your publish settings using as2 or as3?

Similar Messages

  • AS2 SWF loaded inside a AS3 SWF

    Hi,
    In a recent project I had to load a FlashPaper2 document
    inside a SWF implemented in AS3. I read a couple of articles about
    Darron
    Shcall's article and
    FlashInterface
    but none of them seemed to be useful in my case.
    I needed to load a FlashPaper SWF inside a AS3 and couldn't
    rely on ExternalInterface since they were not two separate SWF's.
    To be more clear, I was using the Loader class via a Sprite to load
    the FlashPaper SWF.
    Anyways, I created FlashPaperLoader.SWF implemented in AS2
    which was used to load the FlashPaper SWF. This loader was able to
    communicate with the FlashPaper APIs (AS2). As you can guess, the
    AS3 SWF was used to load the FlashPaperLoader.swf.
    What I don't understand is how come the FlashPaperLoader the
    FlashPaper document SWFs can communicate with each other thru AS2
    function calls when they are loaded inside a AS3 SWF, I thought
    that due to VM differences, no communication is possible!
    I hope I was clear, if I was, any guru insight is really
    appreciated.
    Cheers.

    Thanks kglad,
    But you still haven't answered my question. I am not looking
    for solutions, my own solution works. I wanted to understand more
    about the VM's.
    AS3
    var request:URLRequest = new
    URLRequest("./FlashPaperLoader.swf");
    var loader:Loader = new Loader();
    loader.load(request);
    AS2
    var loader:MovieClipLoader = new MovieClipLoader();
    loader.loadClip("./FlashPaperDoc.swf", fpContainer);
    // the loader SWF used IFlashPaper APIs to communicate with
    the FlashPaper SWF.
    Now, the first part (AS3), all that code is interpreted by
    VM2. Once an AS2 SWF is loaded a
    AVM1Movie
    is created and no direct communication between AS3 and AS2 is
    possible. I am curious to know how come the two AS2 SWFs can
    communicate with each other while inside the VM2 space.

  • How to avoid Build Array function inside a For (while) Loop?

    Hi there,
    I have a simple question about how to avoid using Build Array function inside the loop. Now I want to remove the Build Array funtion inside the loop to improve the performance (To get better memory management). Any idea how to do that?
    Thanks a lot!
    Warmest regards,
    Chong

    It's been my experience that using the auto-indexing to build an array
    on a For loop is just as good as initializing and replacing elements.
    The For loop knows before it runs how many iterations it has to run and
    can allocate the array ahead of time.
    You're better off initializing and replacing when using a While loop
    because it does not know how many iterations it will run and can't
    pre-allocate the array ahead of time.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • Build and load error

    While running the bat job for build and load i got this error Failed to select any new views or all views that you requested to build exist already.
    I guess it is build error . Please let me know where i should look and what is the cause of this error.

    Your build contains one of the following commands...
    execute aggregate selection
    execute aggregate process
    execute aggregate build...to select aggregate views based on specified criteria (without your script I can't tell what they are). However, all the views selected already exist.
    You can make the error go away by clearing the aggregate views (alter database app.db clear aggregates) before selecting / building new views, but that seems a waste of time in this scenario. Unless your whole process is really fast anyway in which case it doesn't matter.
    In my opinion, it's not really an error (I wish it was only a warning but I'll save you my grumbling). You could use IFERROR to just ignore an error on that particular statement, the only problem being that with MaxL's limited error handling you won't be able to distinguish a real error (running out of space while building the aggregations, say) from this 'problem'.

  • When i load mini dvd's they wont load in order of scenes they load randomly

    when i load mini dvds they wont load in order of scenes they load randomly

    Apple - Mac OS X - Feedback

  • "stop" inside AS 2 Frame doesn't work when loaded inside AS 3 swf

    Hi
    Please help!!!!!!
    I have a flash code where i am loading an AS 2 SWF inside AS 3. The thing is if i put the AS 2 SWF on same domain its working fine but if i put AS 2 SWF on different domain it loads the SWF properly but the "stop()" written inside the AS 2 frame doesnt work... and it keeps on playing all the frames continuously...
    Here is the loading code..
    var context:LoaderContext = new LoaderContext();
    if(Security.sandboxType == Security.REMOTE)
    { context.securityDomain = SecurityDomain.currentDomain };
    var objLoader:Loader = new Loader();
    var mRequest:URLRequest = new URLRequest("SomeURL.swf");
    objLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, onSWFLoadComplete);
    objLoader.load(mRequest, context);
    function onSWFLoadComplete(e:Event):void
    var oLoaderInfo:LoaderInfo = LoaderInfo(e.target);
    var mcChild = oLoaderInfo.content;
    mcChild.addEventListener(MouseEvent.ROLL_OVER, onMouseOverLoader);
    mcChild.addEventListener(MouseEvent.CLICK, onMouseClickLoader);
    addChild(mcChild);
    Have tried
    System.security.allowDomain ("*");
    Thanks for the help

    Hi,
    Actualy the "stop();" will only work when you don't use external as3 file, instead shift all your file code into frame code and remove the class name.
    this is the only way i found out while developing the application.
    What i think is there must be some class which we have to include to use the "stop" in the main scene fram.

  • Preloader not loading on the second scene

    Hi. I'm new to flash and I have this problem about preloader.
    I have a preloader and it is working on the first frame of Scene 1. Now after loading, a menu will be appear and there is a Start button. There is no error in my code, after clicking the Start button, it will gotoAndStop to frame 1 scene 2 were the second preloader is located, it seems to be loading so fast so there is no loading animation unlike the first preloader. What I want to do is after clicking the Start button, the preloader will appear again to load the Scene 2. Please help
    Here is the link to the file:
    https://www.dropbox.com/s/8raiwk4qxe693u1/test.fla
    Thanks!

    You don`t need any "real" preloader for a scene that is inside the movie that you already loaded. If you want to have a mockup for graphical effect or sth.
    simulate a preloader with an animation or a timer controlled MovieClip.

  • Adobe Reader crashing when loading inside web browser?

    Hi there,
    Having a very frustrating problem with adobe reader XI inside google chome. Every time I open a .pdf inside the browser it just hangs? I can see it start to load (in that I see the circle turning) but it never loads.
    Please help!
    Sam

    Do you really use the Adobe Reader plugin, or Chrome's own PDF viewer?  See http://helpx.adobe.com/acrobat/kb/pdf-browser-plugin-configuration.html

  • Query Builder doesnt load the tables. Schema not loaded

    Hi all,
    One small issue i am facing.. I have made a connection to Oracle db using the user id given by my DBA.
    But when I try to open the query builder it doesnt load any tables.. cant see any tables.
    Findings:
    If on toad i run a query
    select * from table it returns me noting.
    But if i run it with SIEBEL
    Select * from SIEBEL.table it returns result.
    just prefixing it with SIEBEL gives me the result.
    Do i need to ask the DBA to give my user id the access to run queries without prefixing SIEBEL... what exactly shld i ask him to do
    OR is something we can do at the publisher end itself so that it strt loading required tables avalable for my user id?
    thanks a lot!!
    Dev

    From your description I'd conclude that your DBA has provided you database access via a user ID (schema), let's say USER1. If you have registered this database as JDBC / JNDI data source using this particular user, then you will always need to prefix your table names with 'SIEBEL.' as the database objects are stored in the SIEBEL schema, and not in the USER1 schema.
    You may question your DBA about the feasibility of setting up a logon trigger on the USER1 account so that it automatically switches the current schema to the SIEBEL one.
    alter session set current_schema = <your_schema_name>;
    Something similar was discussed in the following thread:
    how to switch schema in a logon trigger when in 3-tier (how to define case)

  • Alternate hierarchy dimension build with load rules

    Hi,
    I am trying to build a alternate hierarchy dimension using load rules (I feel using EIS is easier to build ASO and multiple hierarchies but we r trying to get rid of EIS member loads). Looking at different posts my understanding is it has to be done using two different rules file first to build the stored hierarchies then use parent-child reference to build the shared hierarchy. Below is the link for the picture how I am trying to build the dimension. I've tried different possibilities but no luck, I am having a tough time to come up with a way to do this using rules file.
    http://s24.postimg.org/u5hl4eyqt/basis.jpg

    If your file is in a parent/child order, then you can build easily in one rule. make sure the primary (stored Hierarchy) gets built first followed by the alternate hierarchies. I suggest adding a SortID column to the source so you can sort the file to get it into the right order. You can also build the alternate hierarchies using level or generation builds in one load rule, but especially if you have a lot of alternate hierarchies or members, then the parent/child method is easiest.
    Read in the DBAG about parent/child files and it will give you more info

  • Help required to build SQL loader control file

    I have a table, That we need to load using SQL loader.
    table structure is --
    <emp_id>,<first_name>,<middle_name>,<last_name>,<sal>
    The structure of flat file is like below,
    <emp_id>|<emp_name>|<sal>
    <emp_name> field can contain space to define first name, middle name and last name,
    if no space is there means we only need to load first name. and one space means First and last name should load.
    Sample flat file--
    1001|Ram|10000
    1002|Syam Kumar Sharma|20000
    1003|Jadu Prashad|15000
    Please help me out to build the control file.
    Thanks in Advance

    Means, can use DBMS_SCHEDULER for loading data ?Yes, you can create procedures for that and let the scheduler execute them on the desired interval
    (you can even execute OS commands through DBMS_SCHEDULER).
    Read about it here:
    http://www.oracle.com/pls/db102/search?word=DBMS_SCHEDULER&partno=
    http://www.oracle-base.com/articles/10g/Scheduler10g.php
    By the way, instead of using sqlloader why not switch to using external tables?
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6611962171229
    http://www.oracle-base.com/articles/9i/SQLNewFeatures9i.php#ExternalTables
    A few other approaches (pre 10g)
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2048340300346698595
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:3084681089099

  • Methods to build an array inside a For Loop.

    Let me introduce to you my nested For Loops:  
    They output a 2D boolean array depending on two 1D boolean arrays of different lengths.  This is all well and good however, in another part of my program, I want this to be a 1D array instead.
    Idea #1:
    "I'll just reshape the array at the end. Simples!"
    Idea #2:
    "Hang on, why am I using three primitives outside the loop when I can use just one inside it along with a shift register?"
    Idea #2.5:
    "Oh, wait... I remember reading somewhere about continuously building an array (with concatenate inputs) inside a loop being a bad thing and quite slow. Let me test this."
    Spoiler (Highlight to read)
    Idea #3:
    "Umm... okay, so actually the second way is faster.  I think if I initialize the shift register first then replace subsets of the array, that might also be better."
    Spoiler (Highlight to read)
    Idea #4:
    "Yep - seems much better. (Something to do with LabVIEW not having to constantly allocate more memory on every iteration of the loop)  Looking at this closer, I don't actually need the inner For Loop because of the way I'm handling the arrays.  Try again...!"
    Spoiler (Highlight to read)
    Conclusion(?) #1:
    "Well I seem to have arrived at something that looks messier, but executes about 6x faster than my initial idea. That said, the difference rapidly increases as the input arrays get much bigger (becoming orders of magnitude different)."
    Is this the most efficient way of doing what I want?  Or is there something even better (and works in LV 8.5)?
    Never say "Oops." Always say "Ah, interesting!"

    Thank you both for the feedback.  It never occurred for me to recheck the logic after I'd initially extracted the nested For Loops, but the AND gate output is obviously the same now that it's been pointed out!
    Continuing on with Idea #4, I replaced the Select with an AND then compared the times.  (also meant I didn't have to initialize one of the arrays anymore)
    Spoiler (Highlight to read)
    It appears that the AND gate was slower but then I tried with different sizes of initial arrays and in one case, the timings were 'reversed'.
    This only happened when the top array (the one that is fed into the AND gate whole) was reduced to a length in the region of 5 elements long.
    Spoiler (Highlight to read)
    Why does this happen?  Is it something to do with the AND gate possibly being optimised for single element operations so smaller arrays are handled better...?
    Never say "Oops." Always say "Ah, interesting!"

  • XML data is not loading inside buttons !

    Hi there... it is an urgent issue: My application only loads
    the XML data to the "main" dynamic text fieds.. but all the rest
    which are "inside" a button do not load them !!! why ? is there any
    special way to load them ?
    the way I loaded to the "main" text fields is:
    promo01title_txt.text =
    obj_xml.firstChild.childNodes[0].firstChild.nodeValue;
    I do the same for the buttons but it does not work.. am I
    supposed to type a prefix or something like that before the text
    field ??? I will appreciate your answer, thanks in advance.
    Jiten

    If I understand your post you have dynamic text fields on the
    stage that you are loading string values from an XML file into the
    text property. It sounds like you are trying to take XML strings
    and then load them to a text field that is part of another movie
    clip. Based on your code it would be simply
    myButton.mytextfield.text =
    xml.firstchild.childNodes[0].firstchild.nodeValue
    You need to give the complete movieclip path of the
    textfield. If it is part of another movie clip then you need to
    start with that movieclips name then the name of the
    textfield.

  • How to build an array inside a loop

    Hi everyone,
    I have a basic question about labview. I would like to create an array in a "for" loop in that way:
    inside the loop, if a condition named "A" is verified, then, i add a new value to the first column of the array.  Otherwise, i create a new column, and start to add values to this column when the condition "A" is verified, etc.
    I put an example of a VI where the condition "A" is "the increment of the loop + 1 is not divisible by 5" and the values of the arrays are the increment of the loop + 1. The loop stops when the increment = 25.
    In this example, i have a single column with the values [1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24]
    while I would like to have an array of 5 columns:
    1   6   11   16   21
    2   7   12   17   22
    3   8   13   18   23
    4   9   14    19   24
    Note than this is just an example. More generally, the array can contain columns of different lengths.
    Thanx for your answer
    Andrew
    Solved!
    Go to Solution.
    Attachments:
    build_array.vi ‏9 KB

    You can't have columns in an array have different lengths - you can dynamically increase the size of the array (e.g. build array) but it means you will get the default value of the array in the other columns up to the new size of the array (normally 0).
    You will need to either keep track of the last index you wrote to for each column so you can trim it later or put an array in a cluster and then create an array of those (an array of a cluster of an array) - that will allow your column data array to have different lengths and you'll just need to unbundle/bundle the array before adding new items.
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • Communication from a flex app. to a swf loaded inside it at runtime

    I am loading a swf (made with Flex 2) inside another flex
    application using the SWFLoader as:
    <mx:SWFLoader id="swfLoader1" source="Modules.swf"
    width="100%" height="100%"/>
    the swf ("Modules.swf' ) loads as expected, but form the
    parent movie I want to be able to control (change values of
    variables) parameters on the child swf (swfLoader1).
    When a click a button in the host movie I want to change the
    text on a label on the child movie, but it is not working for me.
    I have done this:
    when clicking the button call a function doStuff()
    public function doStuff():void
    var myMovie:* = swfLoader1.content;
    myMovie.mod1_desc.text = "blah blah";
    But it's not working. Then I tried
    public function init():void
    _loader = new Loader;
    extContent.addChild(_loader);
    _loader.contentLoaderInfo.addEventListener(Event.INIT,
    doStuff);
    _loader.load(new URLRequest("Modules.swf"));
    init() is called from creationComplete on the Application
    (MXML) and when the _loadr is loaded it calls the doStuff function
    above. Again is not working.
    Any suggestions on how to do this right?
    Gilbert

    Probably not.  Otherwise lots of great malware would be delivered via Flash.

Maybe you are looking for

  • Get kernel panic when I burn DVDs

    when I burn several DVDs using the internal DVD burner on my 1.25 Ghz G4 running OS X 10.4.11, I am getting a kernel panic that tells me to reboot my computer. I'm using Toast Titanium 8 to burn with. Any ideas how to prevent this? Here's the details

  • Getting username and password list by site visited

    I am a member of several consumer research/survey sites; each site requires a user name and password. How do I retrieve that information from the Password Manager? == This happened == Not sure how often == Trying to access a site I don't visit often.

  • Reciever Interface missing in SXMB_MONI

    Hi, When an XML message is generated in my backend ECC 6.0 system, SXMB_MONI does not show any entry in the Reciever Interface coloumn. Hence the message will never go to the PI server. SLD & SM59 connections are working fine. Could we be missing out

  • Flash Player 10.1 not working for Mac

    I recently downloaded the new flash player 10.1 for my mac and also have updated to the latest safari browser but every time i try and watch any videos or play flash games it doesn't work and i'm told to download the latest flash player. I've tried u

  • .profile question

    Probably some kind of silly question: I'm logged into X as lets say A user. Then I'm using su to use terminal as oracle user. I have oracle varialbes (ORACLE_HOME, etc..) set in my ./profile as ORACLE_HOME=/opt/oracle/product/10.2.0/client_1 export O