Flash and XML help : (

Hi all
bit of a newbie, so probably quite easy if you know how:eek:
would anyone beable to help with sorting out an XML file, what I have is a tooltip that loads in via XML and exported from flash. the XML loads in 2 text fields,  field and field2.
what I am trying to do is add a button also to the tooltip so that you can click and go to a url.
would anyone beable to help with this.
this is what I have in my XML file;
<?xml version="1.0" encoding="utf-8"?>
<data>
    <image name="image 1" path="img/img1.jpg"
    title="Food Fight"
    text="Information here!" />
</data>
this loads in 2 text fields.
this is what I have in my AS;
              var tooltip:ToolTip = new ToolTip();
      //tooltip.buttonMode = false; 
                tooltip.field.text = titles;//loads tooltip 1
                tooltip.field2.text = texts;//loads tool tip 2
                holder.addChild(tooltip);
I thought I could do something like this but I seem to be getting errors
XML
<?xml version="1.0" encoding="utf-8"?>
<data>
    <image name="image 1" path="img/img1.jpg"
    title="Food Fight"
    text="Information here!"
             button="click to view/>
</data>
and in my AS
var tooltip:ToolTip = new ToolTip();
                //tooltip.buttonMode = false; 
                tooltip.field.text = titles;//loads tooltip 1
                tooltip.field2.text = texts;//loads tool tip 2
                tooltip.field3.text = buttons;//loads tool tip 3
                holder.addChild(tooltip);
but just not working, what am I doing wrong:yikes:
many thanks for any help!

hi Saransoft
thanks for that, thats great, yes it seesm to work I now have an extra text field with the menu that is the button, I have put my XML like this, is it correct
<image name="image 2" path="img/img2.jpg"
  title="Jazz Time"
  text="Information"
  button="Click for URL"  />   //NEW THAT I ADDED FOR THE BUTTON IS THIS CORRECT?
Now that I have another text for the button my final thing is getting it to be click able and go to a URL when you the text button is clicked. can I do this just in the XML file or is there also more to be added to the AS...aaaaaaaaaaaaarrrrrrrrghhhhh!!!!
many thanks for your help??

Similar Messages

  • AS3 and XML, HELP!

    Hi
    I have no idea where to post this, so pls forgive me if im in the wrong place, but I have an Assessment due tomorrow, I'm only 4 weeks knew to AS3 and Flash, and confused as, so pls forgive me if i also look silly asking this question.
    The issue is loading data from an XML file and having it present in a Flash website. Its a book review thing (i've altered the XML and AS3 for posting here so please bare that in mind), so the XML looks a little like this
    <books>
        <book>
            <bookName>The Monsters</bookName>
            <genres>
                <genre>Thriller</genre>
                <genre>Crime</genre>
                <genre>Comedy</genre>
            </genres>
            <description>about the mummies.</description>
            <image>mummies.jpg</image>
            <reviews>
                <review>
                    <date>16/07/2011</date>
                    <name>unnamed</name>
                    <info>
                        <rating>5</rating>
                        <why>blah blah</why>
                        <theGood>it was good...</theGood>
                        <the Bad>it was bad…</theBad>
                    </info>
                </review>
            </reviews>
        </book>
    <books>
    but each Book has multiple reviews, i've just shown you one. Anyway, i need to present this information in 3 dynamic text fields when a book is selected in my ComboBox… after a lot of trouble i got the basics of it. So in the Genre box the genres will display, and in the Description box the description will display, and in the Review box i can get all the information, but only with all the tags. I need it to display without any tags, it would be wonderful if i could figure out how i could put date, name etc in front of that information as well, but I cant even begin to figure that one out.  For the life of me i cannot figure it out. below is the code I have so far:
    //Load XML
    var booksXML:XML = new XML();
    var loader:URLLoader = new URLLoader();
    var request:URLRequest = new URLRequest("gigGuide.xml");
    loader.addEventListener(Event.COMPLETE,loaderOnComplete);
    loader.load(request);
    function loaderOnComplete(event:Event):void
       booksXML = new XML(event.target.data);
       var books:Array = new Array({label:"Select a Book"});
       for each (var book:XML in booksXML.band)
          books.push({label:book.bookName.toString(), data:book.description.toXMLString(),
                     infoLocal:book.genres.genre.toString(), infoDate:book.reviews.review.toString(),
                     infoImage:book.image});
       bandCB.dataProvider = new DataProvider(bands);
    //ComboBox changeable
    bookCB.addEventListener(Event.CHANGE, changeHandler2);
    function changeHandler2(event:Event):void
       genre_txt.text = ComboBox(event.target).selectedItem.infoLocal;
       description_txt.text = ComboBox(event.target).selectedItem.data;
       reviews_txt.text = ComboBox(event.target).selectedItem.infoDate;
       empty_mc.tex = ComboBox(event.target).selectedItem.infoImage; //doesn't work
    any help would be greatly appreciated, and the image doesn't work, i've already faced facts that im not going to get that one to work
    Thank you in advance

    From what I can see you have a few problems. In your loaderOnComplete you set the data provider with 'bands' but create a variable called 'books'.
    Also, you want to be using the XMLList object to parse your data out. It's much simpler.
    Have a look at the following:
    var booksXML:XML;
    function loaderOnComplete(e:Event):void
              booksXML = new XML(e.target.data);
              var books:XMLList = booksXML.book;
              trace(books[0].bookName);
              var bookReviews:XMLList = books[0].reviews.review;
              trace(bookReviews[0].name);
    trace(bookReviews[0].date);
    First we get all the book xml objects in an XML List - the trace traces book number 0's name - The Monsters.
    Next, you can get all the reviews for a book in another XML List. Here we use the first book - book[0] and trace out the review's name and date.
    You can iterate through an XMLList as it has a length() method - (not a length property)
    Also, loading an image for a book would be easy - you just grab the image property of the current book and then use a Loader to load it.
    trace(books[0].image);

  • Intoduction to Flash and XML

    This is the first time I've used flash, and for the life of me and all my google'ing I can't seem to workout
    a) How to add ActionScript
    b) How to use XML (I've found tutorials but I can't seem to use them because they don't describe where to put the code.
    c) What I need to do special for Flashlite (since this is for the Popcorn Hour)
    It would be great if you could show me how to make links to webpages from
        <myxml version="1">
            <links>
                <link location="http://www.google.com">Google</a>
                <link location="http://www.google.com.au">Google AU</a>
                <link location="http://www.google.se">Google SE</a>
            </links>
        </myxml>
    Just a simple example XML I made.
    Also if there are any security tips for Flash I should know about that would be great.
    Thanks.

    You are attempting an advanced topic before you know the basics of using the tool.  See if lynda.com can help you, or maybe http://tv.adobe.com/product/flash/
    While there are a few places you can place code, if you are just starting, code will be entered on the timeline.  What you do is click a keyframe on the timeline to select it and then open the Actions window (Window -> Actions, or F9) to write the code for that frame.

  • AS2 and XML help please

    Hi, I found a previous post in this forum that does exactly
    what I would like to do, but since I am new to adobe flash I am
    missing some knowledge. I have the actionscript code and the xml
    file - what I need help with is the GUI. I open a new AS2 project
    and press F9 to insert the action code. What do I do next? Please
    help!
    I attach the previous actionscript code posted by another
    member.
    Best Regards Eva

    Hi, thanks for Your reply. Yes, I have the .xml file, what I
    need help with is the 'frame' that You display the picture in. Do I
    need to create a layer or scene? I guess that myContainer_mc in the
    code needs to be identified in this 'frame'. How do I go about
    doing this?
    Any help is most appriciated!
    Best Regards Eva

  • Flash and XML

    I am very new to Flash.  I recently came across a tutorial while trying to learn a bit more about using XML with FLASH. I apologize if this question is to open ended. The tutorial was for a simple carousel with a secondary state with a text field. I have 3 questions:
    1) would it be possible for me to build a function into a single XML element with in that secondary state.  For instance, if I wanted to play a mc, in just one of the images released state.
    2) Can i make embedded links (hyperlinks?), that are unique to each xml line?
    3) What is the best file format to maintain scalable vector art in XML
    Here is the as code implemented from the tutorial:
        import flash.display.Stage
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
                stage.scaleMode = StageScaleMode.NO_SCALE;
                stage.align = StageAlign.TOP;
    import mx.utils.Delegate;
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    var numOfItems:Number;
    var radiusX:Number = 270;
    var radiusY:Number = 70;
    var centerX:Number = Stage.width / 2;
    var centerY:Number = Stage.height / 1.4;
    var speed:Number = .005;
    var perspective:Number = 300;
    var home:MovieClip = this;
    theText._alpha = 0;
    var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
    tooltip._alpha = 0;
    var xml:XML = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = function()
    var nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    for(var i=0;i<numOfItems;i++)
    var t = home.attachMovie("item","item"+i,i+1);
    t.angle = i * ((Math.PI*2)/numOfItems);
    t.onEnterFrame = mover;
    t.toolText = nodes[i].attributes.tooltip;
    t.content = nodes[i].attributes.content;
    t.icon.inner.loadMovie(nodes[i].attributes.image);
    t.r.inner.loadMovie(nodes[i].attributes.image);
    t.icon.onRollOver = over;
    t.icon.onRollOut = out;
    t.icon.onRelease = released;
    function over()
    var sou:Sound = new Sound();
    sou.attachSound("sover");
    sou.start();
    home.tooltip.tipText.text = this._parent.toolText;
    home.tooltip._x = this._parent._x;
    home.tooltip._y = this._parent._y - this._parent._height/2;
    home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
    home.tooltip._alpha = 100;
    function out()
    delete home.tooltip.onEnterFrame;
    home.tooltip._alpha = 0;
    function released()
    var sou:Sound = new Sound();
    sou.attachSound("sdown");
    sou.start();
    home.tooltip._alpha = 0;
    for(var i=0;i<numOfItems;i++)
    var t:MovieClip = home["item"+i];
    t.xPos = t._x;
    t.yPos = t._y;
    t.theScale = t._xscale;
    delete t.icon.onRollOver;
    delete t.icon.onRollOut;
    delete t.icon.onRelease;
    delete t.onEnterFrame;
    if(t != this._parent)
    var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
    var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
    var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
    else
    var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
    var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
    var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,200,1,true);
    var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,320,1,true);
    var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
    theText.text = t.content;
    var s:Object = this;
    tw.onMotionStopped = function()
    s.onRelease = unReleased;
    function unReleased()
    var sou:Sound = new Sound();
    sou.attachSound("sdown");
    sou.start();
    delete this.onRelease;
    var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
    for(var i=0;i<numOfItems;i++)
    var t:MovieClip = home["item"+i];
    if(t != this._parent)
    var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
    var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
    var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
    else
    var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
    var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
    var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
    var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
    tw.onMotionStopped = function()
    for(var i=0;i<numOfItems;i++)
    var t:MovieClip = home["item"+i];
    t.icon.onRollOver = Delegate.create(t.icon,over);
    t.icon.onRollOut = Delegate.create(t.icon,out);
    t.icon.onRelease = Delegate.create(t.icon,released);
    t.onEnterFrame = mover;
    function moveTip()
    home.tooltip._x = this._parent._x;
    home.tooltip._y = this._parent._y - this._parent._height/2;
    xml.load("icons.xml");
    function mover()
    this._x = Math.cos(this.angle) * radiusX + centerX;
    this._y = Math.sin(this.angle) * radiusY + centerY;
    var s = (this._y - perspective) /(centerY+radiusY-perspective);
    this._xscale = this._yscale = s*150;
    this.angle += this._parent.speed;
    this.swapDepths(Math.round(this._xscale) + 100);
    this.onMouseMove = function()
    speed = (this._xmouse-centerX)/30500;
    Any help would be much appreciated.  Thanks.

    Thanks for the response on the first two.  I'll give it a shot.  I'll try and make the third question a bit clearer.  I get the first part, I'm referencing images. I started by using png files and the images just were not looking great with the motion.  I than went hunting for some tutorials on whether I could use ai or eps in xml hoping to find improvement (scalable vector art), the general consensus seemed to be no, the suggestion seemed to be to use a SVG file.  Flash seemed to recognize the images but not display them (I showed no compiler errors initially but broke the names got unfound URLS).  I than found a suggestion to use SWF's exported from AI, which worked fine but gave little improvement.  I am looking for a response on the general consensus on the best quality image file format that I can maintain through XML and Flash? A preference I guess.  Thanks Again.

  • Flash and XML data loading issue

    I have this SWF that loads 2 XML files that controls 2 different areas of the SWF.  I am using this code because I have stacked layers and when this was 2 seperate SWFs I couldn't use the SWFObject because of the wmode quirk in FF.  So my issue is when you first load this it seems to only load the slideshow (left side) and part of the right menu and then on refresh it loads the rest of the menu - how do I get it to load everything at once?  I have attacehed all of my files.
    <div id="LargeFlashContainerFlashMenu">     
                            <script language="javascript">
                                  if (AC_FL_RunContent == 0) {
                                       alert("This page requires AC_RunActiveContent.js.");
                                  } else {
                                       AC_FL_RunContent(
                                            'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
                                            'width', '940',
                                            'height', '265',
                                            'src', 'JGSB_HeaderRightNav_v05',
                                            'FlashVars', 'strNavContentXML=BICMenu.xml&strShowContentXML=settings.xml',
                                            'quality', 'high',
                                            'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
                                            'align', 'middle',
                                            'play', 'true',
                                            'loop', 'true',
                                            'scale', 'showall',
                                            'wmode', 'transparent',
                                            'devicefont', 'false',
                                            'id', 'JGSB_HeaderRightNav_v05',
                                            'bgcolor', '#000000',
                                            'name', 'JGSB_HeaderRightNav_v05',
                                            'menu', 'true',
                                            'allowFullScreen', 'false',
                                            'allowScriptAccess','sameDomain',
                                            'movie', 'JGSB_HeaderRightNav_v05',
                                            'salign', ''
                                            ); //end AC code
                             </script>
                             <noscript>
                                       <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="940" height="265" id="JGSB_HeaderRightNav_v05" align="middle">
                                            <param name="allowScriptAccess" value="sameDomain" />
                                            <param name="allowFullScreen" value="false" />
                                            <param name="movie" value="JGSB_HeaderRightNav_v05.swf" />
                                            <param name="FlashVars" value="strNavContentXML=BICMenu.xml&strShowContentXML=settings.xml" />
                                            <param name="quality" value="high" />
                                            <param name="wmode" value="transparent" />
                                            <param name="bgcolor" value="#000000" />
                                            <embed wmode="transparent" src="JGSB_HeaderRightNav_v05.swf" quality="high" bgcolor="#0099cc" width="940" height="265" name="JGSB_HeaderRightNav_v05" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
                                       </object>
                             </noscript>
                   </div>

    ok I couldnt upload the files but I can send anyone who can help the zip with all files in it via email.

  • Flash and XML, looking for new images

    When I make changes to the XML file and haven't cleared my
    browsers cache, it still displays the old information (FF and IE).
    Our banner changes each week so I am constantly adding new stuff. I
    also change a single graphic once a week, but the image name
    doesn't change... So flash doesn't even load a new graphic when I
    just replace an old one...
    I am sure I am missing something easy...
    Here is what the Flash looks like:
    http://www.gracebrethren.org.
    Is there any way to make Flash check for changes and updates each
    time someone refreshes the page (say like an updated XML file
    different than what's in cache, or an updated graphic)?
    Let me know if you need any more information.

    quote:
    Originally posted by:
    kglad
    add a variable with a changing value to the end or your
    urlrequest string.
    Right now the code looks like this:
    var request:URLRequest = new URLRequest("eventTicker.xml");
    loader = new URLLoader(request);
    loader.addEventListener(Event.COMPLETE, loadComplete);
    I am not sure what you mean by adding a variable with a
    changing value.
    If it helps, in the actual Flash document, the "Document
    Class" is set to my class called "LoadEventData" where the code
    above is stored. So I thought by making it that way, each time the
    swf file was loaded it would make a new request to the specified
    XML file. Do I have my theory correct?

  • Java, Flash and Xml, not able to getParent of xml files

    Hi,
    I am using Java as a server, with a macromedia flash front end (using flash remoting to connect the two). I am loading in xml files in my java application, and i am having some problems when i run this from flash.
    Whenever i use any getParent methods from the JDOM library on an Element variable i get an error sent back to my flash document.
    But when i run my java code using NetBeans it is fine, the code runs fine and the getParent methods are called fine.
    Is there somthing I need to know about the getParent methods which make them return exceptions ....
    The error says the service threw an exception during method invocation: null
    What does this mean, my method threw an exception in Java ???
    Any help would be much appreciated
    Thanks

    Hi,
    Cheers for your interest. I think the problem is in the way in which I have mounted my JDOM.jar file. Currently I have just placed the JDOM.jar file into the lib folder on my JRun server.
    Does anyone have any ideas on how to mount the JDOM.jar file properly
    Thanks

  • Can someone take a look at my project and give me ideas to reduce lag/optimize it? (relatively new to flash and need help)

    Dropbox - TV_AL_Q
    I really need to reduce the lag happening in this project. I know practically nothing about action script except for what I've used in this project so please keep that in mind.
    Im going to try and break apart the grouped art so its in its most basic form and see if that helps, and also change all my tweens to frame by frame since those two things helped me with an animation I did awhile back that was lagging severely.
    But I was hoping someone with more knowledge could take a look and see if there is anything that they know of that I could do to help fix this. I'm working in Flash cs6 and using action script 3.
    I have to turn this project in by this Friday (the 20th) so I would love to get this sorted by then but even if I can't I would still be interested in some possible solutions, just for learnings sake.
    Thanks.

    Thank you for yet another cryptic reply, remember I'm the idiot here who doesn't understand this stuff so please can you explain things in a little more detail. Thanks.
    I am using the JW Player setup assistant and it lists two types of code
    The "Embed code" and the "swfobject 1.5 code" but not an Object/Embed code that you mention.
    This is the code that the website is telling me to use.
    <script type="text/javascript" src="/embed/swfobject.js"></script>
    This text will be replaced
    <script type="text/javascript">
    var so = new SWFObject('/embed/player.swf','mpl','480','270','9');
    so.addParam('allowscriptaccess','always');
    so.addParam('allowfullscreen','true');
    so.addParam('flashvars','&file=http://web.me.com/nathmac31/Flash/WaineWeddingHD. swf');
    so.write('player');
    </script>
    My movie does play on through the player on the JW site, after about 30 seconds of waiting for the picture to appear. When I cut and paste the above code into my webpage, I don't get anything. I have dropped the "Player.swf" and "swfobject.js" files into the folder containing the contents of the page that I want the player to appear on.
    Where is the exact best place to drop these files?

  • Flash and Flex Help

    I have a flash movie I created in Flash that has a couple
    buttons in the clip. Is there a way to make the flash buttons
    change the currentstate in Flex?
    I know in Flex state changes are as easy as
    currentState='STATENAME';
    Flex uses actionscript and so does flash, that is why I am
    hoping this is possible.
    PLEASE HELP, I appreciate your anticipated response.
    Thanks
    Todd

    Is Flash movie created using ActionScript 3? If so, you
    button click can dispatch an event and Flex application can
    register a listener to this event and whenever the event is
    dispatched, change the state.

  • Lost my flash and need help to get it back!!

    I have windows 7 home edition and have always had Adobe Flash Player until one day I was instructed to reinstall it.  Puzzeled as to why it was removed I followed the download instructions, got stuck on step 2, clicked the icon that stated "if you are having problems with your download click here." Still nothing.  I have tried a few times with no luck.  Help me get my flash player back please!!  Thank you!

    Can you please visit this page and follow the instructions for downloading and installing?
    https://get.adobe.com/flashplayer

  • I'm new to flash and need help with some controls

    I'm builidng a site that has a portfiolio of work to display.
    When the visitor arrives at the portfolio page he (or she) is
    faced with a split panel. The right panel displays a summary of a
    client and the work. The left panel displays the work examples
    attributed to that client. By clicking forward and backward arrows
    in the right panel, the visitor can call the summaries of the
    different clients. Landing on a client page 'opens' a separate swf,
    called using loader component, that contains the portfolio of that
    client's work into the left panel
    1. I want forward and backward arrows located on the main
    movie in the left panel to control the progress of the loaded swf,
    rather than using forward and backward arrows on the loaded swf.
    2. I want to prevent the forward and backward arrows in both
    panels from clicking beyond frames in the Portfolio area of the
    timeline.
    3. I want the backward arrow to be innactive on the first
    frame, and the forward arrow to be innactive on the last frame.
    I have no problems making the arrows work on the main movie
    controlling the client summaries. What I don't know how to do is
    make them control the movement of the loaded swf, or #2 and #3.
    Any help will be greatefully appreciated. Thanks in advance,
    Art

    "Art Lazaar" <[email protected]> wrote in
    message news:[email protected]...
    > Tralfaz,
    >
    > Thanks for your response. I must be missing something
    very simple here, but I
    > can't make this work no matter what I do. Let me see if
    I understand some of it:
    >
    > On my main movie I put the fwd_btn and rew_butn
    codes...do I put these on the
    > actual buttons, or in an actions time line? When I put
    them on the buttons, I
    > get an error report saying they need to be in an 'on'
    event handler. I thought
    > that's what 'onRelease' was.
    >
    > On my loaded movie, I place the 'one.swf' code. I'm not
    sure what you mean by
    > placing the code inside a loop, I don't seem to be able
    to find a reference to
    > using 'loop' anywhere. When I use an 'onEnterFrame', I
    presume I do that with
    > onEventClip(enterFrame). When I do that, if I run the
    'one.swf' by itself, i
    > get an error report saying onEeventClip is for movies
    only. But there's no
    > error report when it loads from the main movie. What
    happens tho' is it loops
    > continuously, even if there are stops() in it.
    >
    > Boy, am I confused ;)
    >
    > I am really baffled by this seemingly simple little
    task. Your help is
    > gratefully appreciated.
    >
    > Art
    >
    >
    >
    Hi Art,
    There are different coding methods, depending on where you
    put code..
    1) Frame code
    Click on a frame of the timeline to enter frame code
    2) Attached code for movieclips and buttons
    Click once on a movieclip or a button then enter attached
    code
    To make an onEnterFrame event for a movieclip, first chose
    either frame code or attached code method. I personally rarely ever
    use
    attached code because it hides code in places that can be
    hard to find. Almost all my coding is frame code, but it's a
    personal
    choice.
    Frame code method to make an onEnterFrame for the main
    timeline..
    // put this code into a frame on the main timeline
    this.onEnterFrame = function()
    // do something once per frame at the frame rate
    checkMyButtons(); // once per frame we will check on the
    button status
    OR
    Attached Code method to attach an onEnterFrame event to a
    movieclip
    // click once on the movieclip (don't dbl click it .. stay at
    the root timeline level)
    onClipEvent(enterFrame)
    // do something once per frame at the frame rate
    Those two types of code are not interchangeable. One type
    must be entered into a frame and the other style must be attached
    to a
    movieclip or you will get errors.
    Then there is the DOT syntax way to write frame code that is
    equivalent to attaching code..
    myMovieClip.onRelease = function()
    trace("release");
    myMovieClip.onPress = function()
    trace("press");
    myMovieClip.onDragOut = function()
    trace("drag out");
    tralfaz

  • Java servlet, DOM and xml help! please urgent!

    I have to write a servlet that takes the user input to build a xml document using DOM API and should be able to append new entry to that xml file whenever any user adds an entry. I have written the fillowing code, can anyone please take a look at this code and tell me the right way to do it as this code is actually not creating any xml file and also in commented line of this code I tried by giving blank xml file name with just root element, so that this code can enter new elements like name, title as child element of the root, but doesn't work.
    PrintWriter out = res.getWriter ();
    res.setContentType ("text/html");
    try
    Document xmldoc = null;
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    DOMImplementation impl = builder.getDOMImplementation();
    // Document xmldoc = builder.parse(xmlfile name);
    Element e = null;
    Node n = null;
    String name = req.getParameter("name");
    String title = req.getParameter("title");
    String address = req.getParameter("address");
    xmldoc = impl.createDocument(null, "records", null);
    Element root = xmldoc.getDocumentElement();
    e = xmldoc.createElementNS(null, "name");
    n = xmldoc.createTextNode(name);
    e.appendChild(n);
    root.appendChild(e);
    e = xmldoc.createElementNS(null, "title");
    n = xmldoc.createTextNode(title);
    e.appendChild(n);
    root.appendChild(e);
    e = xmldoc.createElementNS(null, "address");
    n = xmldoc.createTextNode(address);
    e.appendChild(n);
    root.appendChild(e);
    DOMSource domSource = new DOMSource(xmldoc);
    Source xslSource = new StreamSource (xsl file);
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer transformer = tf.newTransformer(xslSource);
    transformer.transform(domSource,new StreamResult (out));

    Document xmldoc = null;
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    xmldoc = documentBuilder.newDocument();
    Element e = null;
    Node n = null;
    String name = req.getParameter("name");
    String title = req.getParameter("title");
    String address = req.getParameter("address");
    e = xmldoc.createElement("name");
    n = xmldoc.createTextNode(name);
    e.appendChild(n);
    xmldoc.appendChild(e);
    e = xmldoc.createElement("title");
    n = xmldoc.createTextNode(title);
    e.appendChild(n);
    xmldoc.appendChild(e);
    e = xmldoc.createElement("address");
    n = xmldoc.createTextNode(address);
    e.appendChild(n);
    xmldoc.appendChild(e);
    DOMSource domSource = new DOMSource(xmldoc);
    StreamSource xslSource = new StreamSource (xsl file);
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer transformer = tf.newTransformer(xslSource);
    transformer.transform(domSource,new StreamResult (out));

  • How to edit bitmap which is imported in flash using xml and save the edited bitmap back to xml in flash.

    hi all
    It would be appreciated if any one let me know how to edit
    bitmap which is imported in flash using xml and save the edited
    bitmap back to xml in flash.
    Is it posible to save the bitmap data in flash?
    thanks in advance

    Yes you can... but like I said before you need to upload the
    data from the changes you make to a server.
    In terms of the solution... its unlikely that you'll find one
    specifically for your needs. You will have to learn whatever you
    don't know how already and maybe adapt some existing examples to
    your needs.
    To change the visual state of a movie clip... you just do all
    the regular things that you want to do to it using flash... scale,
    rotation, drawing API , textfields etc in actionscript. If you
    don't know how to how to do that stuff, then you need to learn that
    first. That's basic actionscript.
    You can capture the visual state of a movieclip using the
    BitmapData class. That includes a loaded jpeg. You can also
    manipulate bimatp data using the same class. You should read up on
    that if you don't know how to use it or check out the examples
    below for uploading info.
    For uploading to the server:
    Here's an as2 solution that took 15 secs to find using
    google:
    http://www.quasimondo.com/archives/000645.php
    If you're using as3, google search for "jpeg encoder as3" and
    look through that info. There are also historical answers in the
    forums here related to this type of thing that might help as
    well.

  • XML & Flash: ImageFader Component help

    Item 1
    Tutorial, with built-in (AS 2.0) Flash Component
    http://tutorialoutpost.com/count/7022
    Item 2
    Tutorial/Sample of XML thumbnail, photo, caption file:
    http://www.tutorio.com/tutorial/simple-flash-xml-photogallery/1
    (click 2nd page, go to bottom to download source code)
    Basically, I want to create a portfolio section with the
    components of the basic XML (item 2), but when you click on the
    thumbnails, you dont get that jumpy feeling, rather a smooth
    ImageFader (Item 1)
    Here are the files, or look at the code (Files are a bit more
    helpful)
    http://www.dominicdesign.com/mikegreener/Archive.zip

    For starters, read the Help Docs in Flash on Data
    Integration. There's even a tutorial in Flash 8 called "Flash and
    PHP Integration." Then you might want to Google "flash php xml
    tutorial" which returns plenty of stuff to keep you reading for a
    while.
    Good luck!

Maybe you are looking for

  • Username and Password for Forms 6i SQL Plus 8.0

    What is the default username and password for SQL Plus 8.0 that comes with the download of forms 6i from OTN. I have tried system, scott, and manager respectively and none of them work. Please help. Thank You

  • ABAP select statement !!

    Hi All, I want to write a query on SOOD table like: SELECT OBJTP OBJYR OBJNO OBJDES OWNNAM FROM SOOD INTO TABLE IT_SOOD        WHERE OBJDES  LIKE 'String%'  AND              ( SDDAT BETWEEN LV_LASTRUN AND SY-DATUM )      AND              ( SDTIM BETW

  • Accessing XMRadio through Itunes and Airport Express

    I would like to play my XMRadio subscription through my Airport Express to my stereo. Has anyone done that? Thanks

  • Very Very frustrated and ticked off!!!

    I am right now very very ticked off, I recently made a video, and imported it to Quicktime using expert settings and whatever, and keep on trying to upload the video on Google Video, Yahoo, and YouTube, and nothing seems to work! Either it takes a se

  • Windows 7 fills in missing glyphs - suggestions?

    Hi all, I wasn't sure how to title the thread in a way that caught what I was trying to get at, so please bear with me.  And I do realise that what I'm asking about is a Windows issue rather than an Adobe one, but I thought people here might have an