Category Archives: Actionscript

Flash Alert Box – Change Size

Hello everyone,

Today I am here with solution for another interesting challenge that I faced while I was working on a flash website. The requirement was to show a long text message in the alert box in the flash site but the problem was changing the size of the alert box.

After a long time of searching finally got the solution.

Here is a small excerpt from my script.

import mx.controls.Alert;

Q = Alert.show(“Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.”,”Title Text”, Alert.OK , null, onSubmit);

Q.setSize(400,260);

Hope this helps… happy reading 😛

Post Data from SWF to ASPX file

Hi all,

Few days back I was working on an application where i needed to post shopping cart data from swf to aspx page.

Sample codes are available over the internet to post data from swf but you never get “ready to use code”  all the time.

I was trying to post data in XML format and there was a catch in case of aspx files that i did not notice.

I was getting “HTTP Error 500 Internal server error” every time my swf posted data to aspx file. After some research I got the reason.

I missed ValidateRequest=”false” on the Page directive of the aspx page i was trying to POST data to, finally i succeeded 🙂

Here is an excerpt from my code

public function sendOrder(items:String):Void

{

var reply_lv = new LoadVars();

reply_lv.replyTo =””;

var send_lv = new LoadVars();

send_lv.xmlData = items;

send_lv.sendAndLoad(“http://www.yourdomain.com/yourpage/Checkout.aspx”, reply_lv, “POST”);

reply_lv.onLoad = function(Sucess){

if(Sucess)

{

getURL(reply_lv.replyTo);

}

else

{

Alert.show(“Sorry! Failed to send your order this time. Please try again.”);

}

}

}