Loop movie, but load XML once

Background:
I am tasked with building a vertical news scroller that reads
from an xml file and loops indefinitely.
Problem 1:
I have figured out how to scroll static text and I am now
working on loading the xml which I also have done. The problem I am
having with loading the xml is that if the movie loops, it is
loading the XML each instance of the loop. How can I load the XML
only on the initial load and still loop the movie?
Problem 2:
When working with static text, scrolling is simply a matter
of doing a motion tween. When working with XML, the data will not
be a fixed length, so doing a motion tween will have 2 problems.
First, the original text object will have a fixed height which will
either have blank space when the XML returns less than enough to
fill it, or will have hidden text when the XML returns more that it
can hold. Can I dynamically adjust the height of a text object to
fit the text that has been put into it? Once I figure out how to
dynamically change the height we have the second problem. If the
tween was built to scroll 10 records over 200 frames and the XML
now returns 100 records, the scroll will be 10 times too fast. Can
I dynamically adjust how many frames the tween will operate
over?

1. You can keep the XML in a variable and use an if/else to
determine if the XML is loaded.
var myXML:XML
// later
if(!myXML){
// call function or class that loads XML and assigns loaded
XML to the variable myXML
2. You can make dynamic TextField autosized AND multilined
(autoSize and multiline text filed properties) - it will adjust
text height depending on the content - width will not be affected.
Since the scrolling is an indefinite motion in this case, I
am not sure tweening is the best approach. Perhaps a better and
more controllable solution would be to write your own function
(class) that will perform the scroll.

Similar Messages

  • Looking for a way to move a rejected xml file after loading it

    Hi all,
    I'm currently looking for a solution to do the following:
    I've loaded multiple xml files into an external table and after firing a few queries on that external table, I've moved the xml data into a normal oracle table
    depending on a few values which need to be met (e.g. last two digits of column a need to be the same as the last two digits of column b)
    All of this works fine, but I'd like to be able to move the xml files which don't meet these requirements to another folder on the filesystem named e.g. 'rejected'
    now, my shell script just moves all the xml files to a processed folder after loading them into an external table.
    I've looked at utl_file.frename but I need to be able to automatically move more than one file if neccesary instead of filling in one filename in the frename statement.
    (maybe the filenames need to be entered into a separate table?)
    Thanks in advance and your help is much appreciated!

    You can look through some of the different Layouts available.
    Select your page.
    Click the "Layout" icon on the lower right hand of the application window.
    Above it will appear a "BACKGROUND" section and a "LAYOUT" section.
    Immediately below the "LAYOUT" is a drop down menu which will show you all the different options.

  • Can you loop video forever as a menu background, but audio only once?

    I'm wanting to make a menu that has a video background and plays music as soon as the DVD starts up, but I want the music to stop after it plays through twice and the video to continue to loop.
    I know I could do this by setting a loop point, but I don't want the user to have to sit and wait the first time the music plays before they can select a button.
    Is there a way to do this?

    ram8kumar wrote:
    There are mainly two workflows to set the looping in a motion menu :
    1. If you want to loop the entire video and audio, then there are two ways to do this:
         a)  In the motion tab of the menus properties, set the loop point to 00:00:00:00 and the loop# to the number of times you want the looping.
         b)  Go to the Specify Link dialog box to set the End action of the menu, select the menu as the target link and check the 'Set to loop point' checkbox there.
    2. If you want to loop the video from a specific point in the time, then in the motion tab of the menu, set the loop point to the exact time of the video you want to stat the looping from and set the loop # to number of times you want the looping.
    Thanks for the reply, but I don't think either of your solutions will achieve the result I'm wanting.  I want to loop the AUDIO just once (it plays two times after the menu comes up), but I want the VIDEO background to continue to loop forever.  I also want the user to be able to make a menu selection at any time, including right when the menu first appears.
    If I set a loop point, it makes the menu unusable until that loop point is reached the first time.
    I was thinking I could do this with two menus.  The first menu would have the audio and video and only loop one time, then its end action would send it to another menu that looks exactly like the first, but only has the video looping on it.  The only problem with this solution is that if the user moves their selection to something other than the default button, it will jump back to the default button when it goes to the second menu (or whatever button the "end action" is set to on the first menu).
    Would there be a way to have the first menu jump to the identical second menu and stay on whatever button the user currently has highlighted?
    Thanks.

  • Problems with loop on progressive loaded Movie

    Hey I got help for a a week ago to do a loop on progressive loaded movies, but nov I got a problem it only loops on keyframe one and not on keyframe 2. Do anyone know how I can sort that out..?
    I have the following on keyframe 1, where everything is perfect:
    var timedelay:Number = 3; 
    var video;
    var nc:NetConnection;
    var ns:NetStream;
    nc = new NetConnection();
    nc.connect(null);
    ns = new NetStream(nc);
    ns.client = this;
    ns.addEventListener(NetStatusEvent.NET_STATUS,netStatusf);
    function netStatusf(e:NetStatusEvent) {
        if (e.info.code == "NetStream.Play.Stop" && Math.abs(durationNum-ns.time)<.1) {
    setTimeout(replayF,timedelay*1000);
    function replayF(){
    ns.play("film/film1.f4v");
    var durationNum:Number;
    function onMetaData(iObj:Object):void {
        durationNum = iObj.duration;
    video = new Video(287,263);
    video.x = 204.1;
    video.y = 140.5;
    addChild(video);
    video.attachNetStream(ns);
    ns.play("film/film1.f4v");
    and on keyframe 2 I got this, here it chooses a randome movie from the Array, when it'a chosen it dosen't loop:
    var moviesA2:Array =["film/film1.f4v", "film/film2.f4v", "film/film2.f4v", "film/film2.f4v", "film/film2.f4v"];
    var movie2:String = moviesA2[Math.floor(Math.random()*moviesA2.length)];
    var timedelay2:Number = 6; 
    var video2;
    var nc2:NetConnection;
    var ns2:NetStream;
    nc2 = new NetConnection();
    nc2.connect(null);
    ns2 = new NetStream(nc2);
    ns2.client = this;
    ns2.addEventListener(NetStatusEvent.NET_STATUS,netStatusf2);
    function netStatusf2(e:NetStatusEvent) {
        if (e.info.code == "NetStream.Play.Stop" && Math.abs(durationNum-ns.time)<.1) {
    setTimeout(replayF2,timedelay*1000);
    function replayF2(){
    ns2.play(movie2);
    video2 = new Video(287,263);
    video2.x = 204.1;
    video2.y = 140.5;
    addChild(video2);
    video2.attachNetStream(ns2);
    ns2.play(movie2);

    i assume you've applied ns.close() when going to frame 2 so that stream stops looping.  then use:
    function netStatusf2(e:NetStatusEvent) {
        if (e.info.code == "NetStream.Play.Stop" && Math.abs(durationNum-ns2.time)<.1) {
    setTimeout(replayF2,timedelay*1000);

  • Trying to access Netflixs and pick movie but I get "Unable to load this content at this time"

    trying to access Netflixs and pick movie but I get "Unable to load this content at this time"

    This earlier posting worked for me:
    "This worked for me without having to reset my Apple TV universe: Press Menu and Down Arrow keys simultaneously for 6 seconds until the light flashes rapidly."
    Thank you!

  • HT1657 my rental download shows error. it happened once on my movie purchase, and twice on my season tv episode. this time it's a rented movie but i cant download it completely cus of the error... pls help

    my rental download shows error. it happened once on my movie purchase, and twice on my season tv episode. this time it's a rented movie but i cant download it completely cus of the error... pls help

    What does the error message say? (Include error message numbers if you're getting any, please.)

  • My video was recorded on my I phone 4, the camera was held sideways for a horizontal view, but loads in I movie vertically.  How can I rotate the image so it is horizontal?

    My video was recorded on my I phone 4, the camera was held sideways for a horizontal view, but loads in I movie vertically.  How can I rotate the image so it is horizontal?

    Drag the clip from your Event to your Project. Then use the Rotate, Crop, Ken Burns Tool on the Middle Toolbar to rotate it

  • I have a slideshow I made in iPhoto and it is showing in iTunes movies but when I select it and click 'sync' it does not load into my phone. I have made sure it is a mobile version of the slideshow

    I have a slideshow I made in iPhoto and it is showing in iTunes movies but when I select it and click 'sync' it does not load into my phone. I have made sure it is a mobile version of the slideshow. How do I load it onto my phone? Or also, how do I play it from iPhoto or iTunes through Apple TV

    Was the iPod setup via iTunes on this computer?
    Setup via wifi?
    Was the iPod previous synced to another iTunes library/computer?
    Have you successfully synced from this iTunes library/computer before?
    Do the songs play in iTunes?           
    Do you have the right boxes checked to sync?
    iTunes: Syncing media content to iOS devices and iPod        
    Try syncing using the manual method                 

  • Firefox is taking forever to open any website, the little spinning circle is driving me mad. Once it has opened my bookmarks and history haven't loaded. Once in ten attempts it does load correctly but this is happening less frequently...

    I'm running Windows 7x64 and Firefox 6.0.2 is taking forever to open any website, the little spinning circle is driving me mad. Once it has opened my bookmarks and history haven't loaded. Once in ten attempts it does load correctly but this is happening less frequently...

    Try the Firefox SafeMode to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4/5/6/7 SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    If it is good in the Firefox SafeMode, your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • HT1600 I get the menu and can pick a movie but then it won't load and displays an error message

    I get the menu and can pick a movie but then it won't load and displays an error

    What version of iPhoto do you have installed?  Is if one of the versions shown as not compatible in this screenshot?
    If it is then go to the App Store and download iPhoto 9.5.  It will be free if you have an iPhoto 9 or later verson currently.
    OT

  • My Mac book pro powers on and once on cursor moves but can not open anything with it.

    My Mac book pro powers on and once on cursor moves but can not open anything with it.

    ladislavfromcygnet wrote:
    Thank you Shootist007. I cannot do even Update now. I probably should have spent the same amount of money on a new IMac!
    No not really. If this is a brand new Macbook Pro take it back for a refund. Apple has a 14 day No Questions Asked return policy for Full refund.
    Take it back, get the Full Refund (DO NOT LET THEM TRY TO FIX IT. YOU BOUGHT A NEW COMPUTER NOT ONE THAT HAS BEEN WORKED ON OR NEEDS TO BE FIXED) and then decide whether to buy another Macbook Pro or the iMac. Or you could return it, get the Full refund and buy some other brand computer.

  • TS1362 Purchase a movie, down loaded it. But when I play it back it freezes after 10 minutes.

    Purchase a movie, down loaded it.  But when I play it back it freezes after 10 minutes of playing. What can I do to fix the problem?

    I'd report the problem to the iTunes Store. 
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the item that is not playing properly. If you can't see "Report a Problem" next to the item, click the "Report a problem" button. Now click the "Report a Problem" link next to the item.

  • Since up grading to new OS Lion  my iPhone iPod and iPad  all give me sync issues  they load apps , music , books , movies , but refuse photos  and the sync ends with an error 50 message most times  , yes  I have re booted  reinstalled new i Tunes  help !

    Since up grading to the  new OS Lion  basicly problem free except  my iPhone iPod and iPad  all give me sync issues  they load apps , music , books , movies , but refuse photos  and the sync ends with an error 50 message most times  , yes  I have re booted  reinstalled new i Tunes and all my others   help !   I have update every thing I can  re installed  , no other issues apart from Parallels  and windows  which  I have deleted and will reisnstall and up date when I get my discs back moving house so in storage boxes somewhere ? , but who needs  Windows ?  is any one else suffering , or have any solutions 

    Hi Ken,
    Wow, I've logged into adobe and never seen your response until now.
    I need to make the forums more of a daily stop I guess.
    Thank you for your response, When I go to the Archives, it states I have none. In addition, previously when I'd tried to move items to the archive, they just disappeared  
    Currently my desktop is not connecting at all, Everytime I connect, it's states "We have now logged you out" and requests I login again.
    I have of course rebooted,
    Gone into taskmanager, killed all the relevant threads,  tried again to login through the desktop, no luck, I'll have to uninstall it, make sure the threads are killed, then reboot it and then reinstall it, but I've not had the time to do that.
    On another note, and just as a point of reference, myself, personally, I hate these "cloud" file repositories (not to be confused with adobe cloud services which I love) but the file repositories themselves imho, are a blackhole of resource usage when one doesn't/isn't using them,
    Is there a way we can use it more of a "ftp" sort of thing, when I want to I can  put files there?  There is no way to "Download" the repository, no way to download the folders.. only individual files and then it takes I think three different steps before the download starts.. I find this very inhibiting.  Just an fyi. for what it's worth.
    Please, feel free to contact me,
    I'm on g+ chat [email protected]

  • I have apple TV  this is second time   My money goes down to drain  not even load a movie   To night   I was watching  movie but  stop never come back .what  could be the reason?

    I have apple TV  this is second time   My money goes down to drain  first time not even load a movie   To night   I was watching  movie but  stop never come back .what  could be the reason?

    I had the exact same thing happen ... for the second time.  I'm done renting movies on Apple TV that I cannot watch, and don't get my money back.  I have a strong Internet connection, and about 10 minutes into a movie and it stops and says that the movie will be ready to view in 55 hours.  Rediculous ... and frustrating.  I don't know how to fix this, and I disagee with the other person responding to you who said it was your network.  I have a strong network, running through an Airport Extreme -- and this problem persists.  I'm done.

  • Loading XML using a custom class and accessing it from other classes?

    I began with a class for a movie clip rollover function
    FigureRollOver. It works marvellously. Three things happen:
    1) it loads XML from a file "mod1_fig1.xml" and uses another
    class, XMLMember, to retool the scoping of the XML so that I can
    get at it
    2) an onload call inside of XMLMember calls the myOnLoad
    function and transfers the XML into an array.
    3) so long as the array is finished building, rolling over a
    movie clip attaches a new movie clip with the rollover text in it.
    But I don't want all those functions in one because I need it
    to be more dynamic, starting with being able to load any old xml
    file instead of just "mod1_fig1.xml", plus it seems like
    overbuilding to have all of that in one class, so I've separated
    out the loading of the XML and building of the array into its own
    class, FigureXMLLoader. FigureRollOver is then left to just attach
    the rollover with text in it, extracted from the array built by the
    new class.
    Problem is, though the array builds inside FigureXMLLoader, I
    can't figure out how to make it available outside the class. I know
    that I'm constructing things in the wrong order, and that the array
    needs to be somehow built inside the class function to be
    available, but I can't figure out how to do that. A cruddy
    work-around is to put a function call at the end of the building of
    the array, which calls yet ANOTHER function on the main timeline of
    my .swf to put the array I've just built into a new variable. This
    works, but it's messy. It seems like I should be able to have one
    line of script in the .swf that generates an array on the main
    timeline (or just a public array) which I can then access from my
    FigureRollOver class:
    var myRollOvers:Array = new FigureXMLLoader("mod1_fig1.xml");
    Here is FigureXMLLoader (see comments in the code for more
    details) which obviously does not return an array as it is, because
    of all the working around I've had to do. Note the "testing"
    variable, which can be traced from the main timeline of the .swf,
    but I will get "not what I want" because of course the array hasn't
    been built yet, and never will be, inside of the declaration as it
    is. How do I get it in there so I can return an array?
    Thanks!

    Suggest you ask this question in the Actionscript forum as
    this forum is
    more tuned to database integration questions.
    You can create arrays outside a class and pass them into it
    by reference and
    visa versa build arrays inside a class and pass out via
    reference.
    The preferred approach is to place the array in a class and
    not expose it.
    Then add methods to use the array or should we say to use the
    class.
    Lon Hosford
    www.lonhosford.com
    Flash, Actionscript and Flash Media Server examples:
    http://flashexamples.hosfordusa.com
    May many happy bits flow your way!
    "maija_g" <[email protected]> wrote in
    message
    news:ed4i43$9v0$[email protected]..
    > Update: I've now put this on the main timeline of the
    .swf:
    >
    > myRollOversLoaded = false;
    > var myRollOvers:Array;
    > var roll_content = new FigureXMLLoader("mod1_fig1.xml");
    >
    > And inside the "myOnLoad" function in FigureXMLLoader,
    just after the
    > while
    > loop I've put this:
    >
    > _root.myRollOversLoaded = true;
    > _root.myRollOvers = figure_arr;
    >
    > The movie clip rollover won't act until
    myRollOversLoaded is true. It
    > works,
    > but it still seems klugey. Any suggestions for a more
    elegant solution
    > would be
    > appreciated.
    >

Maybe you are looking for

  • PC CARD

    I have an Orinoco WiFi 11 Mbit/s Silver pc card in a black G3 PowerBook. The airport works in OS 9, but I just upgraded to OS X and the airport no longer works. I went on the Lucent site to see if I could download new software and the only thing I co

  • Regarding Function module for validating Date

    Hi , Cananybody tell me that is there any function mdoule for validating the BGDDA and ENDDA.

  • Enhanced DSL

    Had enhanced for two years.  Down speed at 2.8.  Changing billing, now Verizon provisions me at .5 to 1 and states that enhanced is not available to my number at any price.  Neighbors in same pedestal still have 3.0 on their line according to Verizon

  • Un-install E-Business Suite 11.5.10

    I want to de-install my whole VISION environment. I'm on Red Hat linux. I was reading thread #426271, and on page 8, it is mentioned that the quickest way to de-install EBS on Linux is to userdel users oracle and applmgr (or whatever they're called:

  • Technical Support in Turkey

    I bought my phone 3 months ago from greece and I am in turkey now. I can not find any support here that will repair my phone via guaranty. My phone problem is that I can not hear caller.Please Help!