Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


XML & Flash.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Cryoma
Member of the Year
Reputation: 198

Joined: 14 Jan 2009
Posts: 1819

PostPosted: Tue Jun 23, 2009 5:11 pm    Post subject: XML & Flash. Reply with quote

I kinda doubt anyone knows AS around here, but here goes.
So I have an XML file.
In it is a list of icons and stuff.
Example:
Code:
<icons>
<icon image="icon1.png" tooltip="LimeWire"  text="blah1" url="http://1" />
<icon image="icon2.png" tooltip="Rubik's Cube"  text="blah2" url="http://2"/>
</icons>


In flash, I have the code to load the icons and display them, and a code to load some text from the xml file when you click on the icon.
I got rid of the text bit, because instead of loading the text, I want to go to the url in the text file.
So here's the code for the part where you click on the icon.

Code:
function released()
{
   //BONUS Section
   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,0,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,250,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;
         }
      }
   }
}


All I really need is this:

Code:
function released()
{
   //BONUS Section
   var sou:Sound = new Sound();
   sou.attachSound("sdown");
   sou.start();
   getURL("xml-url");
}


But how do I get it to getURL the url from the XML file?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites