Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Urgent Response Required



I am aware that this is not easy and really the issue is don't deleate files, but can someone point me in the direction of some shareware apps that can crack a projector file. My boss needs to ammend a movie and he has deleated the fla.
Many thanks



FlashKit > Flash Help > Flash ActionScript
Posted on: 11-02-2001, 05:13 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Actionscript Pro Required: Syntax Help Required For Button To Initiate Easing
Hi guys I was wondering if any of you actionscript daddio’s could give me 2 minutes of your time and help me write the appropriate syntax to make the below example work on a button release rather than on the MC mouse down state that it currently uses.

http://www.fluid.com/experiments/timecode/mx_time.html

If you click on the geek panel drop down menu, you will see that it generates the appropriate code for the on onMouseDown,, however I want to call the easing from a button.

If someone could give me an example of the correct syntax using the “easeInquad” function that would be brilliant.

Thanks For The Response
Yeah I tried that also. Thank you though!

Response
thanks, for the quick response. I can't upload the fla as it is 6MB. Each button is the same and has the same actionscript on it. I just made 1 button and copy and pasted it into each scene. I will try your suggestion, and if it doesn't work, I will post my fla on my web site.
thanks for all the help!

XML Response Help
Good Morning

I am using a getURL() command to pass variables to an PHP page, which reads my variables and returns a XML response. Please point me to a sample of how I check the xml and prase the information after it is returned to the flash movie?

Thank you

I Really Would Appreciate A Response From Anyone
It must be that I posted this in the wrong place. So I'm cutting and pasteing it again here. It can't be that no one knows how to do this. I used to know it myself, but forgot.

I'm creating this simple little presentation using Flash. There is only 1 scene. Each page in the presentation is a movie clip which occupies a frame in the scene. So if I have a button in one of the pages(movie clip) to play one of the other frames(movie clip) in the scene, how would I code that? I already know that I have to use _root to get out to the main scene, but how do I get it to play at a specific frame and thus the movie clip of that frame.?

I appreciate any help thanks.

This is the closest I got: on the button, inside the movie-clip I have this code, the target frame is labeled "main":

on (release) {gotoAndPlay(_root,"main");

}

No Response
Does no response to a post generally mean that it is impossible and can't be done?

Can I Get At Least One Response?
It's my intention to do something like this; I want to make a class that fills the background of whatever movieclip calls it. Say for example... Stage.fillPattern("tile1"); or contentMC.fillPattern("tile2"); ....

attached is the code I currently have....I know it doesn't work, so how would I change it so that it would work the way I want it to?

Code:

import flash.display.BitmapData;
class BGPattern extends MovieClip {
   public function BGPattern(myTile:String) {
      trace(myTile);
      var tile = BitmapData.loadBitmap(myTile);
      _global.curTile = myTile;
      destroyBG();
      fillBG(tile);
   }
   /* Function that fills the stage background with tile */
   private function fillBG(theTile) {
      this.beginBitmapFill(theTile);
      this.moveTo(0, 0);
      this.lineTo(Stage.width, 0);
      this.lineTo(Stage.width, Stage.height);
      this.lineTo(0, Stage.height);
      this.lineTo(0, 0);
      this.endFill();
   }
   /* Function that destroys the background */
   private function destroyBG() {
      this.beginFill(0xFFFFFF);
      this.moveTo(0, 0);
      this.lineTo(Stage.width, 0);
      this.lineTo(Stage.width, Stage.height);
      this.lineTo(0, Stage.height);
      this.lineTo(0, 0);
      this.endFill();
   }
}

Response.write Help Please.
This does what I need it to do (outputs exactly what it does and NOTHING more):

<%
response.write ("&text1=The+Borse")
response.write ("&value1=4")
%>

NOW - what I need to do is have those response.writes come from a database.
(i.e. the database will hold the values for text1 and value1)

How can I do this - I know it cant be too difficult - but I am learing I just don't know the format/code to make a connection to the database and use those response.writes to output the same thing.

I need it in ASP btw.

Thanks in Advance,
Oznob

CGI Response From Server
Hi, All,

Here's my situation and question: I've got a Flash form set up to POST
variables to a cgi/pl script on a secure remote server; the POST
generates a server response in the form of a 3-part string, delimited by
quotes and commas (i.e. "text1","text2","text3" - When the response
loads, it replaces the Flash form with a blank page and the 3-part text
response.). This is for a credit card payment system. Now my question.
How do I go about capturing this 3-part response to display in dynamic
text fields in Flash? And how do I parse it? And can I even do this with
Flash? Is Javascript any help? As it stands, I can successfully send the
variables and generate the response (actually credit card codes for
verification), but I can't seem to figure out how to capture the
response to display in the forms text fields. I can't name them 'cuz I
don't know what to name them. Is there a generic variable name I can use
to bring this response into the form?

Geez, seems like a lot to ask. And it is. Anyone willing to help?

Thanks,
DavidQ

Random Response
I need this script to generate a random response based on the % correct on a quiz. If a user gets 0% right I need 1 of 3 random answers displayed. same for 20%, 40% 60% 80% and 100%. below is my script. can anyone see what i am doing wrong??

score = int((score/5)*100);
Unit = "3";
Test = "1";
response0= new Array ("test1 for 0%", "test2 for 0%", "test3 for 0%");
response20= new Array ("test1 for 20%", "test2 for 20%", "test3 for 20%");
response40= new Array ("test1 for 40%", "test2 for 40%", "test3 for 40%");
response60= new Array ("test1 for 60%", "test2 for 60%", "test3 for 60%");
response80= new Array ("test1 for 80%", "test2 for 80%", "test3 for 80%");
response100= new Array ("test1 for 100%", "test2 for 100%", "test3 for 100%");
function randomResponse0() {
randomNumber = random (response0.length);
}
function randomResponse20() {
randomNumber = random (response20.length);
}
function randomResponse60() {
randomNumber = random (response60.length);
}
function randomResponse80() {
randomNumber = random (response80.length);
}
function randomResponse100() {
randomNumber = random (response100.length);
}

if (score == 0) {
response = response0;
gotoAndStop("failed");
} else if (score == 20) {
response = response20;
gotoAndStop("failed");
} else if (score == 40) {
function randomResponse40() {
randomNumber = random (response40.length);
}
response = response40;
gotoAndStop("failed");
} else if (score == 80) {
response = response80;
gotoAndStop("passed");
} else if (score == 100) {
response = response100;
gotoAndStop("passed");
} else if (score == 60) {
response = response60;
gotoAndStop("failed");
}
loadVariablesNum("/update_score.asp", 0, "POST");
stop();

E-mail Response
I am very new to flash and have a question.

When I make a button that says "e-mail us", how do I make
it so that when it is pressed it automatically opens the
users mail program and inserts the e-mail address in the
program.I have looked hi and lo, but for the love of who-ever,
I cannot find how to do it any-where.

Weird Response
Hmm.. I'm having slight problems using flash mx 2004.
Assuming I'm having a movie clip which plays a sound on event on frame 5, but I have a 'gotoAndPlay(20)' on frame 3. The sound still plays!
Does anyone encounter a similar problem? Please help.

Thanks.

ID Response For An Image
Hoping someone has the knowledge to help on this, can't find anything related in the forum.

I have a flash movie with a number of imported jpeg images. What I would like is to be able to display the name of each image when the user roles over it with the mouse. But I want it to be dynamic rather than the names being manuallly created. So is there a way of:

a) dynamically producing the image name (the name of the jpeg file)?

and

b) having that name appear in a similar way as an 'alt' tag does in html when the image is rolled over?

Any help would be much appreciated!

Jams

Trying To Get Even A Single Response...
Hello-
I posted this in the site check forum, trying to get some comments, criticism, or suggestions on my first flash animation. Unfortunately, no one was interested enough to give me any feedback on my project. Maybe I'll do better on this forum.

Fuzzy Math is sort of a music video, using the real voice of President Bush, rapping the straight truth. After seeing Jibjab's "This Land," I got inspired to attempt something along the same lines for this song. If anyone has any response to this thing, I'd love to hear it. Fuzzy Math is here:

http://www.thebots.net/FuzzyTest.htm

thanks
bc

Xml Response With GetURL()
Good Morning

I am using a getURL() command to pass variables to an PHP page, which reads my variables and returns a XML response. Please point me to a sample of how I check the xml and prase the information after it is returned to the flash movie?

Thank you

MC Inside MC, No Response
MC inside MC, no response

Hi all,

I have a simple nav made by attaching MC's (btn_mc)from the library. The MC's that are attached contain a base_mc and two MC 's on top of the base_mc that act as buttons. I wanted the whole MC to have a rollover effect but then still have the two MC buttons inside to still be clickable, so I changed the base_mc alpha on rollover and then changed it back on rollout. If I do it this way the two MC inside aren't clickable, but if I take away the alpha change on the base_mc the two MC work.
Does anyone know a way around this or know of another way I can do this.


Code:
changeColor = function (tar, col) {
banColor = new Color(tar);
banColor.setRGB(col);
};
//--------------------
// Load XML
//--------------------
cart_xml = new XML();
cart_xml.ignoreWhite = true;
cart_xml.onLoad = function(success) {
if (success) {
cart();
} else {
trace("cart xml not loaded");
}
};
cart_xml.load("cart.xml");
cart = function () {
proNames = cart_xml.firstChild.childNodes;
for (var i = 0; i<proNames.length; i++) {
fontInfo = proNames[i];
buy = Holder_mc.attachMovie("btn_mc", "btn_mc"+i, i+1);
buy.useHandCursor = false;
buy._y = 26*i;
buy.idcolor = fontInfo.attributes.color;
buy.name = fontInfo.attributes.name;
buy.name_txt.text = buy.name;
buy.one_mc.onRollOver = function() {
trace(this.buy.name+"ONE");
};
buy.two_mc.onRollOver = function() {
trace("TWO");
};
changeColor(buy.base_mc, buy.idcolor);
//
if (buy.name != "ONE" && buy.name != "TWO") {
buy.base_mc._alpha = 50;
buy.onRollOver = function() {
this.base_mc._alpha = 100;
};
buy.onRollOut = function() {
this.base_mc._alpha = 50;
};
buy.onRelease = function() {
trace(this.name);
};
}
}
};

MC Response Inside Nav
MC response inside nav

Hi all,

This has been driving me mad for days so I would really appreicate if anyone can help.
I have a vertical menu made by attaching btn_mc from the libaray using an XML file. The btn_mc is a MC which has three MC's inside - base_mc, one_mc and two_mc, I set the alpha of all MC's to 50. I want to be able to rollOver one_mc and two_mc and it's alpha change to 100 and also change the alpha of base_mc 100, but rolling over base_mc won't change it's alpha. I know this is to do with the parent clip having actions attached, but if I do without the xml using this code below it works fine.

code:
btn_mc.base_mc._alpha = 50;
btn_mc.two_mc._alpha = 50;
btn_mc.one_mc._alpha = 50;
btn_mc.two_mc.onRollOver = function() {
this._alpha = 100;
btn_mc.base_mc._alpha = 100;
};
btn_mc.two_mc.onRollOut = function() {
this._alpha = 50;
btn_mc.base_mc._alpha = 50;
};
btn_mc.one_mc.onRollOver = function() {
this._alpha = 100;
btn_mc.base_mc._alpha = 100;
};
btn_mc.one_mc.onRollOut = function() {
this._alpha = 50;
btn_mc.base_mc._alpha = 50;
};
btn_mc.one_mc.onRelease = function() {
trace("One");
};
btn_mc.two_mc.onRelease = function() {
trace("Two");
};



This is the code I'm using with the XML file


code:
var btnSpace = 35;
//--------------------
// Change Color
//--------------------
changeColor = function (tar, col) {
banColor = new Color(tar);
banColor.setRGB(col);
};
//--------------------
// Load XML
//--------------------
btn_xml = new XML();
btn_xml.ignoreWhite = true;
btn_xml.onLoad = function(success) {
if (success) {
btnTest();
} else {
trace("cart xml not loaded");
}
};
btn_xml.load("cart.xml");
btnTest = function () {
proNames = btn_xml.firstChild.childNodes;
for (var i = 0; i<proNames.length; i++) {
fontInfo = proNames[i];
btn = holder_mc.attachMovie("btn_mc", "btn_mc"+i, i+1);
btn._y = btnSpace*i;
btn.idcolor = fontInfo.attributes.color;
btn.name_txt.text = fontInfo.attributes.name;
changeColor(btn.base_mc, btn.idcolor);
changeColor(btn.one_mc, btn.idcolor);
changeColor(btn.two_mc, btn.idcolor);
btn.base_mc._alpha = btn.one_mc._alpha=btn.two_mc._alpha=50;
btn.one_mc.onRollOver = function() {
this._alpha = 100
btn.base_mc._alpha = 100
};
btn.two_mc.onRollOver = function() {
this._alpha = 100
btn.base_mc._alpha = 100
};
btn.one_mc.onRollOut = function() {
this._alpha = 50
btn.base_mc._alpha = 50
};
btn.two_mc.onRollOut = function() {
this._alpha = 50
btn.base_mc._alpha = 50
};
}
};



Here is an example of how it should work

http://homepage.ntlworld.com/c.dickinson40/

Slow Response From Web?
for some reason this is running very slowly when i hosted it. why is that? is it slow for anyone else?

http://www.phpstylesource.com/Design/Matty/V2/V.2.html

-No Response Displayed
Hi all,

I've implemented openamf with TOmcat 5.0.28 but when I run HelloWorld example on flash I couldn't get an output diplayed.

But I got the message that the service is successfully created.
and following also come up on tomcat server console.

Any help please I'm new to flash remoting.
- Venura

- Deserializing Message, for more info turn on debug level
Request message [AMFMessage: {version=0, headers={}, bodies={}}] |
- REQUEST:

- RESPONSE:

- Serializing Message, for more info turn on debug level
[AMFMessage: {version=0, headers={}, bodies={}}]

MC Inside MC, No Response
MC inside MC, no response

Hi all,

I have a simple nav made by attaching MC's (btn_mc)from the library. The MC's that are attached contain a base_mc and two MC 's on top of the base_mc that act as buttons. I wanted the whole MC to have a rollover effect but then still have the two MC buttons inside to still be clickable, so I changed the base_mc alpha on rollover and then changed it back on rollout. If I do it this way the two MC inside aren't clickable, but if I take away the alpha change on the base_mc the two MC work.
Does anyone know a way around this or know of another way I can do this.


ActionScript Code:
changeColor = function (tar, col) {
    banColor = new Color(tar);
    banColor.setRGB(col);
};
//--------------------
// Load XML
//--------------------
cart_xml = new XML();
cart_xml.ignoreWhite = true;
cart_xml.onLoad = function(success) {
    if (success) {
        cart();
    } else {
        trace("cart xml not loaded");
    }
};
cart_xml.load("cart.xml");
cart = function () {
    proNames = cart_xml.firstChild.childNodes;
    for (var i = 0; i<proNames.length; i++) {
        fontInfo = proNames[i];
        buy = Holder_mc.attachMovie("btn_mc", "btn_mc"+i, i+1);
        buy.useHandCursor = false;
        buy._y = 26*i;
        buy.idcolor = fontInfo.attributes.color;
        buy.name = fontInfo.attributes.name;
        buy.name_txt.text = buy.name;
        buy.one_mc.onRollOver = function() {
            trace(this.buy.name+"ONE");
        };
        buy.two_mc.onRollOver = function() {
            trace("TWO");
        };
        changeColor(buy.base_mc, buy.idcolor);
        //
        if (buy.name != "ONE" && buy.name != "TWO") {
            buy.base_mc._alpha = 50;
            buy.onRollOver = function() {
                this.base_mc._alpha = 100;
            };
            buy.onRollOut = function() {
                this.base_mc._alpha = 50;
            };
            buy.onRelease = function() {
                trace(this.name);
            };
        }
    }
};

MC Response Inside Nav
MC response inside nav

Hi all,

This has been driving me mad for days so I would really appreicate if anyone can help.
I have a vertical menu made by attaching btn_mc from the libaray using an XML file. The btn_mc is a MC which has three MC's inside - base_mc, one_mc and two_mc, I set the alpha of all MC's to 50. I want to be able to rollOver one_mc and two_mc and it's alpha change to 100 and also change the alpha of base_mc 100, but rolling over base_mc won't change it's alpha. I know this is to do with the parent clip having actions attached, but if I do without the xml using this code below it works fine.


ActionScript Code:
btn_mc.base_mc._alpha = 50;
btn_mc.two_mc._alpha = 50;
btn_mc.one_mc._alpha = 50;
btn_mc.two_mc.onRollOver = function() {
    this._alpha = 100;
    btn_mc.base_mc._alpha = 100;
};
btn_mc.two_mc.onRollOut = function() {
    this._alpha = 50;
    btn_mc.base_mc._alpha = 50;
};
btn_mc.one_mc.onRollOver = function() {
    this._alpha = 100;
    btn_mc.base_mc._alpha = 100;
};
btn_mc.one_mc.onRollOut = function() {
    this._alpha = 50;
    btn_mc.base_mc._alpha = 50;
};
btn_mc.one_mc.onRelease = function() {
    trace("One");
};
btn_mc.two_mc.onRelease = function() {
    trace("Two");
};


This is the code I'm using with the XML file



ActionScript Code:
var btnSpace = 35;
//--------------------
// Change Color
//--------------------
changeColor = function (tar, col) {
    banColor = new Color(tar);
    banColor.setRGB(col);
};
//--------------------
// Load XML
//--------------------
btn_xml = new XML();
btn_xml.ignoreWhite = true;
btn_xml.onLoad = function(success) {
    if (success) {
        btnTest();
    } else {
        trace("cart xml not loaded");
    }
};
btn_xml.load("cart.xml");
btnTest = function () {
    proNames = btn_xml.firstChild.childNodes;
    for (var i = 0; i<proNames.length; i++) {
        fontInfo = proNames[i];
        btn = holder_mc.attachMovie("btn_mc", "btn_mc"+i, i+1);
        btn._y = btnSpace*i;
        btn.idcolor = fontInfo.attributes.color;
        btn.name_txt.text = fontInfo.attributes.name;
        changeColor(btn.base_mc, btn.idcolor);
        changeColor(btn.one_mc, btn.idcolor);
        changeColor(btn.two_mc, btn.idcolor);
        btn.base_mc._alpha = btn.one_mc._alpha=btn.two_mc._alpha=50;
        btn.one_mc.onRollOver = function() {
            this._alpha = 100
            btn.base_mc._alpha = 100
        };
        btn.two_mc.onRollOver = function() {
            this._alpha = 100
            btn.base_mc._alpha = 100
        };
        btn.one_mc.onRollOut = function() {
            this._alpha = 50
            btn.base_mc._alpha = 50
        };
        btn.two_mc.onRollOut = function() {
            this._alpha = 50
            btn.base_mc._alpha = 50
        };
    }
};


Here is an example of how it should work

http://homepage.ntlworld.com/c.dickinson40/

Multipart Response
Hello,

I have a security camera and it is available over http. Client application must send http request to get real-time video. Response content type is
multipart. Camera takes a picture (.jpeg) and pushes it in opened HTTP stream. Is it possible to make client application in Flash? I tried to use
URLStream functionality and actually got results as ByteArray but how to restore image from these bytes and show it in user interface? One idea is to
send bytes to server (java) and it will send it back as picture http response, so its become available through URLLoader. But this solution is not the

best one.
Any help will be appreciated.
Thanks

Example of live camera: http://194.126.108.66:8890/1192033705718

HTTP Response
I want to retrieve data from some website, using response. how can i .. ?

there could be other option of using "web service" but it'll add extra effort at server side. The server side is already running on java.

How can i send request with my defined parameters to a page and then retreive response from it ?

Tutorials or anyother material will be helpful

HttpRequest Response
Hi

Im having trouble with a request /response.

What I'm trying to do is send a string to a http request such as

"http://webdeploy/r/mixes/mixreq.aspx?username="+username+"&mixname="+mixnam e, "_parent"

The response of this returns a string value.

Ive tried using getURL but all that does is open a new html page with the response string printed on it.

I couldnt get this to work with urlRequest either.

Basically all I want to do is capture the returned string

thanks,
dub

XML Response Is Encoded, But Why....
Hey guys,

I wrote a simple script to make a request to the server and trace the output thus:

function sendForm(evt:MouseEvent):void {
mc_viewStack.gotoAndStop(2);
variables.senderDob = txDob.text;
variables.senderEmail = txEmail.text;
variables.senderNews = newsletterUrlVar;
variables.senderOptin = optinUrlVar;
req.data = variables;
req.method = URLRequestMethod.POST;
loader.load(req);
showBusyCursor();
loader.addEventListener(Event.COMPLETE, receiveLoad);
loader.addEventListener(IOErrorEvent.IO_ERROR, handleIoError);

}

function receiveLoad(evt:Event):void {
processXML(evt);

hideBusyCursor();
}

function handleIoError(e:IOErrorEvent):void
{
trace(e.text);
}

function processXML(e:Event):void
{
var myXML:XML = XML(e.target.data);
trace(myXML.toXMLString());
}



This is all good and fine, and it works, but the returned string is encoded in what I believe to be some sort of html entity encoding. Some of these characters are too strange to be html character entities, though. For one thing less than symbol is represented here by %3C, but it should have been <.

%3C%3Fxml%20version=%221%2E0%22%20encoding%3D%22UT F
%2D8%22%3F%3E%0A%3Cresponse%3E%0A%3Cerror%20field
%3D%220%22%3EYou%20must%20accept%20the%20official% 20rules
%3C%2Ferror%3E%0A%3Cnoprize%3E0%3C%2Fnoprize%3E%0A %3C%2Fresponse
%3E

Any help woul dbe great.

How To Collision Response
I have been messing around with collision response for a week or so now and have slowly been building up a series of calculations for flash to do after two objects collide. I have it now so that it properly simulates momentum of two rigid bodies collideing in two demsions, however these objects are squares and they do not rotate.

What I would like to know is how other people have simulated a circle bouncing off another stationary, fixed, circle. I know it is complicated but if i could get a look at the math I think I will be able to glean some understanding of how to program it with what I have already.

Can anyone help?

P.S. I do have some code already but it is very disorganized and dosen't work properly so I won't bother posting it unless someone wants it specifically.

MC Inside MC, No Response
MC inside MC, no response

Hi all,

I have a simple nav made by attaching MC's (btn_mc)from the library. The MC's that are attached contain a base_mc and two MC 's on top of the base_mc that act as buttons. I wanted the whole MC to have a rollover effect but then still have the two MC buttons inside to still be clickable, so I changed the base_mc alpha on rollover and then changed it back on rollout. If I do it this way the two MC inside aren't clickable, but if I take away the alpha change on the base_mc the two MC work.
Does anyone know a way around this or know of another way I can do this.


ActionScript Code:
changeColor = function (tar, col) {    banColor = new Color(tar);    banColor.setRGB(col);};//--------------------// Load XML//--------------------cart_xml = new XML();cart_xml.ignoreWhite = true;cart_xml.onLoad = function(success) {    if (success) {        cart();    } else {        trace("cart xml not loaded");    }};cart_xml.load("cart.xml");cart = function () {    proNames = cart_xml.firstChild.childNodes;    for (var i = 0; i<proNames.length; i++) {        fontInfo = proNames[i];        buy = Holder_mc.attachMovie("btn_mc", "btn_mc"+i, i+1);        buy.useHandCursor = false;        buy._y = 26*i;        buy.idcolor = fontInfo.attributes.color;        buy.name = fontInfo.attributes.name;        buy.name_txt.text = buy.name;        buy.one_mc.onRollOver = function() {            trace(this.buy.name+"ONE");        };        buy.two_mc.onRollOver = function() {            trace("TWO");        };        changeColor(buy.base_mc, buy.idcolor);        //         if (buy.name != "ONE" && buy.name != "TWO") {            buy.base_mc._alpha = 50;            buy.onRollOver = function() {                this.base_mc._alpha = 100;            };            buy.onRollOut = function() {                this.base_mc._alpha = 50;            };            buy.onRelease = function() {                trace(this.name);            };        }    }};

MC Response Inside Nav
MC response inside nav

Hi all,

This has been driving me mad for days so I would really appreicate if anyone can help.
I have a vertical menu made by attaching btn_mc from the libaray using an XML file. The btn_mc is a MC which has three MC's inside - base_mc, one_mc and two_mc, I set the alpha of all MC's to 50. I want to be able to rollOver one_mc and two_mc and it's alpha change to 100 and also change the alpha of base_mc 100, but rolling over base_mc won't change it's alpha. I know this is to do with the parent clip having actions attached, but if I do without the xml using this code below it works fine.


ActionScript Code:
btn_mc.base_mc._alpha = 50;btn_mc.two_mc._alpha = 50;btn_mc.one_mc._alpha = 50;btn_mc.two_mc.onRollOver = function() {    this._alpha = 100;    btn_mc.base_mc._alpha = 100;};btn_mc.two_mc.onRollOut = function() {    this._alpha = 50;    btn_mc.base_mc._alpha = 50;};btn_mc.one_mc.onRollOver = function() {    this._alpha = 100;    btn_mc.base_mc._alpha = 100;};btn_mc.one_mc.onRollOut = function() {    this._alpha = 50;    btn_mc.base_mc._alpha = 50;};btn_mc.one_mc.onRelease = function() {    trace("One");};btn_mc.two_mc.onRelease = function() {    trace("Two");};



This is the code I'm using with the XML file



ActionScript Code:
var btnSpace = 35;//--------------------// Change Color//--------------------changeColor = function (tar, col) {    banColor = new Color(tar);    banColor.setRGB(col);};//--------------------// Load XML//--------------------btn_xml = new XML();btn_xml.ignoreWhite = true;btn_xml.onLoad = function(success) {    if (success) {        btnTest();    } else {        trace("cart xml not loaded");    }};btn_xml.load("cart.xml");btnTest = function () {    proNames = btn_xml.firstChild.childNodes;    for (var i = 0; i<proNames.length; i++) {        fontInfo = proNames[i];        btn = holder_mc.attachMovie("btn_mc", "btn_mc"+i, i+1);        btn._y = btnSpace*i;        btn.idcolor = fontInfo.attributes.color;        btn.name_txt.text = fontInfo.attributes.name;        changeColor(btn.base_mc, btn.idcolor);        changeColor(btn.one_mc, btn.idcolor);        changeColor(btn.two_mc, btn.idcolor);        btn.base_mc._alpha = btn.one_mc._alpha=btn.two_mc._alpha=50;        btn.one_mc.onRollOver = function() {            this._alpha = 100            btn.base_mc._alpha = 100        };        btn.two_mc.onRollOver = function() {            this._alpha = 100            btn.base_mc._alpha = 100        };        btn.one_mc.onRollOut = function() {            this._alpha = 50            btn.base_mc._alpha = 50        };        btn.two_mc.onRollOut = function() {            this._alpha = 50            btn.base_mc._alpha = 50        };    }};



Here is an example of how it should work

http://homepage.ntlworld.com/c.****inson40/

Response Vs Result
I hope this isn't too complex and someone can help me out here.

If I call a webservice and receive the data back. It seems that there are 2 ways of accessing it:

a) As a result which seems to automatically format the xml into an object

b) As a response which seems to leave the xml as a string.

My question is, which would be faster and less memory/cpu intensive (considering the application is running on a mobile device).

1) To just have flash format the xml result as a standard object.

2) Or take the response string and convert it into an XML object.

(I could perhaps leave the response string as a string I'm not sure how I would navigate the nodes this way?)


Thanks!

Please Help, No Response To Previous Posts.
Hi, I'll keep it short and sweet this time. I have three seperate SWF's that I am loading into my main timeline with loadMovie. I need them to preload before the main movie starts so that they syncronize with the main movie. I really don't know much about actionscripting, so a dumbed down answer would be appreciated. Thanks alot for any help you can give.

Jason

Creating A Delayed Response
probably creating a delayed reaction is different depending on the type of motion

this is my script where i need delayed reaction

objectinstance._x = _xmouse;

How To Create A Response Form
I am not sure if this is possible, so here it goes. After creating a form in Flash, can you post your response via CGI script? Has anyone attempted to try this out?

Confused newbie.

Button Response Problem...
My button in my movie clip is not responding, I'm trying to get the button to switch scenes.
I have looked at a few other posts of similar nature and still, I get the same problem.
can anyone help?
here's the action attached to the button within the movieclip, the flash version is 5:

on(release){
_root.gotoAndPlay("main", 1);
}

...thank u

Flash Exe And Sever Response
Can we run flash file as an EXE. and getting and putting data to a data base which is on a server (by using load variables or if possible get url or any way ) if we give server url ?

Simple Response Needed...
Hi,

I am creating a Flash website. I have the main document called: website.fla. Now, to make it simple, I created the buttons + button effects on a separate document called: myButtons.fla
When I attempt to import the myButtons.swf into the library of website.fla ... it comes out as a bitmap(rather than MC), hence, buttons don't work and no more nice effects on them.
I do not want to have to import all the elements used to make the buttons panel 'cause I'd have to piece it all together again. I need to import a MovieClip that represents these buttons + their effects to simply drop into my website.fla document.
How do I go about making a movie clip out of the myButtons.fla?

Sendandload Response Problem
I am using the sendandload command to send data to
a python cgi server...the data gets there and the updates
are made but I don't seem to get the response/loaded back.
I've tried playing with sending back various formats....does
anyone know exactly what the command is looking for in response
to the cgi--get?
thanks.

Delayed Cursor Response
when my cursor rolls over a button it changes to the hand pointer icon as usual, but it fails to change back to the standard pointer after moving outside of the hit area, or it does so only after quite some time..

any idea why this might be happening?

i have a number of swfs loading in the background.. could this have anything to do with it? maybe a cpu issue?

Resticting Cursor Response
have been designing the DTFusion Nav bar from the tutorials section, and have got it working fine, but the draggable cursor that responds to the mouse position follows the mouse even when it is nowhere near the nav buttons... very annoying. How can I isolate the x_position actions so they only happen when the mouse enters an area very near the nav bar)?

Please help me

[MX04] Reading A Response XML
Good Morning

I am using a getURL() command to pass variables to an PHP page, which reads my variables and returns a XML response. Please point me to a sample of how I check the xml and prase the information after it is returned to the flash movie?

Thank you

[F8] Help With Triggering A Response In Actionscript
Hi there, I have uploaded a cheezy example of what I am trying to achieve with this.

What I want to happen is when the player clicks the <spacebar> I want it to trigger a particular movie clip. For instance if the player hits the space bar and its below area 2 then I want the area 1 movie clip to play. If the user hits below area 3 then I want movie clip 2 to play etc...

I created a cheezy animation in each one so that I can see whats going on in each section.

I am not sure how to go about animating this and using code to coincide with it. Any assistance would be greatly appreciated.

No Response From Custom Event
hi guys...what am i missing here:

Code:
package {
import flash.display.Sprite;
import flash.net.URLRequest;
import flash.net.URLLoader;
import flash.text.StyleSheet;
import flash.events.Event;
import com.em.CSSEvent;
import com.em.Response;

public class LC extends Sprite{
private var urlr:URLRequest;
private var urll:URLLoader;
public var css:StyleSheet;
public var mainURL:String;
public function LC(){
init();
}
private function init():void{
var re:Response= new Response();
re.addEventListener(CSSEvent.LOADED,tellme)
mainURL="http://localhost/LC/";
urlr= new URLRequest();
urlr.url=mainURL+"styles/styles.css";
urll=new URLLoader();
urll.addEventListener(Event.COMPLETE,doCSS);
urll.load(urlr)
}
private function doCSS(ev:Event):void{
var cssev:CSSEvent= new CSSEvent("loaded","yep, it's good");
this.dispatchEvent(cssev);
}
private function tellme(ce:CSSEvent){
trace(ce.result);
}
}
}


the custom event code is:


Code:
package com.em
{
import flash.events.Event;
public class CSSEvent extends Event{
public static const LOADED:String="loaded";
public var result:String;
public function CSSEvent(type:String,x:String){
super(type,true);
result=x;
}
public override function clone():Event{
//return the event, it's type, and it's result props
return new CSSEvent(type,result);
}
}
}


the Response class, you don't need to see...i don't think. Just know that it extends Sprite. I am expecting to see the trace from the eventListener....but apparently, i am not dispatching or listening correctly....ideas?

URLLoader Response Timeout
I was asked to give longer waiting time (30sec) for URLLoader response. Is that possible to change in some way (not Socket).

Thanks,
George

[f8] How To Get Acurate Response Time
Hello all,
I am attempting to write a small program using ActionScript 2.0 which presents the user with a series of images and records their reaction time (amount of time it takes them to press a button after the image is displayed). Now, with the manner in which flash executes it's code in relation to the display of a frame, what is the most acurate (im looking for ms acuracy here) way to measure this. I tried this code applied to the frame:


Code:
var startTime;
var endTime;
var responseTime;
startTime = getTimer();
With a button created with this event:

Code:
on (keyPress "<Left>"){
endTime = getTimer();
responseTime = endTime - startTime;
play();
}
However, this appears to be very inacurate. (Maybe because of the use of a button?) I am still quite new to Flash development so forgive my ignorance. Does anyone know of a way to optimize such code so that it more accurately reflects the actual response time? Or, a completely new way of accomplishing what I need would also be very helpful.

Thanks in advance,
Josh

[F8] NaN Response In Dynamic Text Box
Hi guys,

The rule of the game is that the user has to put the dark circle into the dark box and the lighter gray circle in the light box. Every time the user places a circle into the hit box the number of attempts go's up by one, even wrong attempts. Also wrong attempts will be scored.

So that means I have two dynamic text boxes to produce my scores for number of attempts and number of incorrect attempts. They both have variable names:

_root.score

_root.wrong

I have no problems with getting the score to work for the number of attempts , but the problem is with getting the number of incorrect attempts to work correctly. When I run the game every time the user makes a mistake technically the number of incorrect attempts should go up by 1, but instead I get a NaN as a response.

I don’t know what I have done wrong. Here’s the action script I have used:

drag_mc.onPress = function():Void {
this.startDrag(true);
reply_txt.text = "";
};
drag_mc.onRelease = function():Void {
this.stopDrag();
if (this.hitTest(_root.hitbox_mc )) {
_root.score += 1;
//if (eval(this._droptarget) == hitbox_mc) {
reply_txt.text="Well Done!";
}
else {
reply_txt.text="No, keep trying!";
if (this.hitTest(_root.hitbox2_mc )) {
_root.score += 1,_root.wrong +=1;
reply_txt.text="No, keep trying!";
}
else {
reply_txt.text="No, Keep trying";
}
};
}
drag2_mc.onPress = function():Void {
this.startDrag(true);
reply_txt.text = "";
};
drag2_mc.onRelease = function():Void {
this.stopDrag();
if (this.hitTest(_root.hitbox2_mc )) {
_root.score += 1;
//if (eval(this._droptarget) == hitbox2_mc) {
reply_txt.text="Cool!";
}
else {
reply_txt.text="Ooops!";
if (this.hitTest(_root.hitbox_mc )) {
_root.score += 1,_root.wrong +=1;
reply_txt.text="Ooops!";
}
else {
reply_txt.text="Ooops!";
}
};
}



I have also added the file so you can see how it all works and put together.

Thanks guys

Custom TweeEvent Response
Is it possible to do this?... I'm trying to make my coding more simple.. I know there's other ways of doing this but it requires more code.

function fadeObject(obj:Object){
var objAlpha:Tween = new Tween(obj, "alpha", Regular.easeInOut, obj.alpha, 1, 8, false);
objAlpha.addEventListener(TweenEvent.MOTION_FINISH , objfinish(obj));
}

so I want the event response to be able to input the object, so that when it finishes I can do something specifically for that object.

Parsing A SOAP Response
Hi all, I have two web services: one fetches a password, the other builds and sends an email. In order for the email to build I need to give it the password from the first service. My send mail service tests fine, but what I'm having problems with is parsing out the service response of the password request (so I can pass that variable to the second web service).

Here's the code I currently have:


PHP Code:




private function done(serviceResponse:XML):void {
  var mystring:String=serviceResponse.toString();
  var myxml:XML;
  myxml=new XML(mystring);
  trace (myxml);
}







The above code traces this:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getSendMailPasscodeResponse xmlns="http://www.omittedurl.com/webservices/">
<getSendMailPasscodeResult>passwordVariableIsHere< /getSendMailPasscodeResult>
</getSendMailPasscodeResponse>
</soap:Body>
</soap:Envelope>


I can't figure out how to parse this so I can get the 'passwordVariableIsHere' to trace on it's own (if I can get that, then I can subsequently attach it to a variable).

Thanks.

~Jason

Parsing A SOAP Response
Hi all, I have two web services: one fetches a password, the other builds and sends an email. In order for the email to build I need to give it the password from the first service. My send mail service tests fine, but what I'm having problems with is parsing out the service response of the password request (so I can pass that variable to the second web service).

Here's the code I currently have:


PHP Code:




private function done(serviceResponse:XML):void {
  var mystring:String=serviceResponse.toString();
  var myxml:XML;
  myxml=new XML(mystring);
  trace (myxml);
}







The above code traces this:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getSendMailPasscodeResponse xmlns="http://www.omittedurl.com/webservices/">
<getSendMailPasscodeResult>passwordVariableIsHere< /getSendMailPasscodeResult>
</getSendMailPasscodeResponse>
</soap:Body>
</soap:Envelope>


I can't figure out how to parse this so I can get the 'passwordVariableIsHere' to trace on it's own (if I can get that, then I can subsequently attach it to a variable).

Thanks.

~Jason

HTTP Post And XML Response
Hello guys,

I have an upcoming app we're developing. And we want to utilize xml for Flash but simple variables for PHP.

Is this possible?
Flash posts data to PHP thru regular GET/POST method.
PHP responses in XML
Flash reads response as XML
Flash parses XML

Thank you guys!

KeepWaiting For Response Function
why this not work:


Code:
MyButt.onRelease = function(){
myFunc();

}

function myFunc(){
beetle._y = POSY;
keepWaitingForResponse();
}


function keepWaitingForResponse() {

intervalID = setInterval(function () {

if (POSY == undefined) {
VariableReturned(POSY);
}
}, 100);
}

function VariableReturned(value) {
clearInterval(intervalID);
}
i want to recall the function if the var posy is undefined!!!

Copyright © 2005-08 www.BigResource.com, All rights reserved