talkxe

riaxe snippets

Follow me on TwitterRSS Feeds

  • Home
  • About Us

loadMovie loadClip external image height width issue in AS2 [Solved]

Aug 5th

Posted by Susrut Mishra in actionscript

No comments

Recently while working on an AS2 project in flashlite we had a issue of getting the height and width of a dynamically loaded external image from a URL. Here is the solution we formulated:

var mclListener:Object = new Object();
mclListener.onLoadInit = function(targetmc:MovieClip) {
trace(“movie loaded”);
trace(targetmc._width);
};

var imagemcl:MovieClipLoader = new MovieClipLoader();
imagemcl.addListener(mclListener);
imagemcl.loadClip(URL, mc);

actionscript, as2, flash, flashlite

FTPA018 and FTPS033 issues in Flashlite[Solved]

Aug 5th

Posted by Susrut Mishra in actionscript

No comments

While developing a flashlite application for a Samsung BADA phone we face a weird issue. We were not able to load an external XML file. WE got the following error :

FTPS033: A Call to loadVariables(URL) found, limitations might apply.
FTPA018: The call to loadVariables for [URL] was ignored because it was not associated with a keypress.

We were using Flash CS4 and Device Central CS4. After some research on the IDE we found that running the app on the Device Central generated these errors. We switched to Flash CS5 and it worked like a charm.

actionscript, as2, cs4, cs5, flash
Firefox-Flash-plugin-crash

Flex Firefox Flash Debug Player Crash [Solved]

Jul 7th

Posted by Susrut Mishra in flash

No comments

After updating the Firefox to the latest version, while using Flex debug I found the debug session did not last much and it crashed after a short period. This happens because firefox kills the debug session. Found a quick fix for the above issue:

1. Goto firefox config by typing about:config in the firefox address bar
2. Click on the I’ll be careful, I promise button.
3. Type dom.ipc.plugins.timeoutSecs
4. Find value and double click and change the value to -1

This changes the default timeout value from 45 secs to unlimited. This should solve the issue.

10.1, crash, debug, firefox, flash player, flex
Pagination

Pagination in Flex

Jun 9th

Posted by Brajendra in actionscript

1 comment

Recently while working on a flex project, had an issue while paginating a list of data. Could find many solutions for paginating of Datagrid and lists on the web but I needed little different. So created an application to paginate a large amount of data. This isn’t using any Datagrid or List but a simple VBox. I added some effects as well to it. I used a canvas having a list of images and at the bottom the paginator is placed with the “First”(<<), ”Previous”(<), “Next”(>) and “Last”(>>) buttons for navigation. One can click on the page number to navigate to any specified page.

We need 4 properties to set on application loading complete.
1. Set selectedIndex = 0 ; // As we need to show the first page on load complete.
2. Set visiblePages = the number of pages we want to show every time. Here the visiblePages = 3.
3. Set totalItems = the total number of items
4. Set itemsPerpage = the number of items to be shown in a page.

Screenshot given below.
null

You can click here to see the example.

I think this sample could be useful for all. Do post back for any issues or suggestions.
Thanks.

actionscript, AIR, as3, flash, flex, pagination, paging
The cfml editor

ColdFusion 9 Web Editor

Jun 7th

Posted by Satyajit Behera in ColdFusion

No comments

Created an online web editor to test ColdFusion 9 tags and functions. Although it has limitations of testing only basic tags. File operations, database operations won’t work that are dependent on the server path and properties.

Benefits of the editor -
- You can test ColdFusion code directly on one page. You don’t need to install ColdFusion on every machine. You can just use one server and put this file there and you can test basic ColdFusion tags and functions.
- Suppose you would like to trace values in an application, you can include this page to your application and test simultaneously. Let’s say you want to check the application variables.
- You can download the code you have written in a file and use it wherever you needed.
- You eliminates the procedure of Create new file, add some code and test. It gives the other way round, write code and test it there, if you need that code then download the file and save.

Preview Image of the Editor -

The cfml editor

The cfml editor

As we don’t have an enterprise license, I couldn’t deploy to our server. I provide the full source code below to try out
Following is the code for the editor

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">	

	<cfsetting showdebugoutput="false">

	<!--- Form Action Part --->
	<cfset attributes.codeText = "">
	<cfset frameSrc = "">
	<cfif isDefined("form.codeText")>
		<cfset attributes.codeText = form.codeText>

		<cfif isDefined("form.saveFile") and form.saveFile>
			<cfset textToWrite = attributes.codeText>
		<cfelse>
			<cfset textToWrite = '<cfsetting showdebugoutput="false">' & attributes.codeText>
		</cfif>

		<cfset fileName = CreateUUID() & ".cfm">
		<cffile action="write" file="#ExpandPath('#fileName#')#" output="#textToWrite#"/>

		<cfif isDefined("form.saveFile") and form.saveFile>
			<cfheader name="Content-Disposition" value="attachment; filename=testcfml.cfm">
			<cfcontent deletefile="false" file="#ExpandPath('#fileName#')#" type="application/octet-stream">
		<cfelse>
			<cfset frameSrc = fileName>
		</cfif>
	</cfif>

	<head>
		<title>ColdFusion 9 Web Editor</title>
		<meta name="keywords" content="adobe, ColdFusion, editor, web, online ColdFusion 9, cfml, tags, functions" />
		<meta name="description" content="Online editor to run cfml code and test the output directly on the web" />

		<!--- Style Definitions --->
		<style>
			table{
				background:#cccccc;
				border:1px solid #808080;
				-moz-border-radius:9px;
			}

			td{
				font-family:Verdana;
				font-size:10px;
			}

			div{
				color:#ffffff;
				border:1px solid #606060;
				background:#808080;
				-moz-border-radius:3px;
				align:center;
			}

			a{
				font-family:Verdana;
				font-size:10px;
				text-decoration:none;
				color:#ffffff;
				border:1px solid #cccccc;
				background:#909090;
				-moz-border-radius:4px;
			}

			iframe,textarea{
				border:1px solid #808080;
				background:#ffffff;
				-moz-border-radius:4px;
			}

			textarea{
				font-family:Verdana;
				font-size:10px;
				color:#505050;
			}

		</style>
	</head>
	<body>
		<!--- Display of form --->

		<form method="post" action="cfmlEditor.cfm">
		  <input type="hidden" name="saveFile" id="idSaveFile" value="false"/>
		<table width="800px" height="470px" cellpadding="10" cellspacing="0" align="center">
			<tr height="20px">
			  <td colspan="2" align="left" style="font-size:14px;color:#606060;">
				  <strong>CFML 9 WEB EDITOR</strong>	  </td>
			</tr>
			<tr>
			  <td align="right">
				  <div>::code view::
					<cfoutput>
					<textarea name="codeText" style="width:400px;height:450px;">#attributes.codeText#</textarea>
					</cfoutput>
					<br/><br/>
					<a href="javascript:document.getElementById('idSaveFile').value=true;document.forms[0].submit();">&nbsp;save code to file&nbsp;</a>&nbsp;&nbsp;
					<a href="javascript:document.getElementById('idSaveFile').value=false;document.forms[0].submit();">&nbsp;show me &raquo&nbsp;</a>&nbsp;&nbsp;<br/>&nbsp;		  </div>	  </td>
			  <td align="right">
				  <div>::design view::
					<iframe src="<cfoutput>#frameSrc#</cfoutput>" frameborder="0" width="400px" height="450px"></iframe><br/><br/>
					created by :: satyajit behera &nbsp;&nbsp;<a href="mailto:satyajit@riaxe.com?subject=Query">&nbsp;mail me a query&nbsp;</a>&nbsp;&nbsp;<br/>&nbsp;		  </div>	  </td>
			</tr>
		</table>
		</form>
   </body>
</html>

Let me know of any issues.

ColdFusion, editor, online, web
12345»
    • Popular posts
    • Archives
    • Tags
    • Categories
    • actionscript (19)
    • AIR (2)
    • amazon (1)
    • as2 (2)
    • as3 (15)
    • ColdFusion (2)
    • facebook (1)
    • flash (11)
    • flex (17)
    • JAVA (1)
    • Javascript (1)
    • mobile (1)
    • PHP (1)
    • s60 (1)
    • symbian (3)
    ACL actionscript AIR alivepdf amazon amazonaws arc as2 as3 aws bucket button circular cloud ColdFusion components corner crossdomain cs4 doubleclick drag dynamic flash flex gradient highlight icon iconfield jar JAVA lines matrix merapi message pdf player rotate s3 s3fox scale singleclick text textarea tilelist transform tool
    • August 2010 (2)
    • July 2010 (1)
    • June 2010 (3)
    • May 2010 (2)
    • April 2010 (1)
    • March 2010 (1)
    • November 2009 (1)
    • October 2009 (1)
    • July 2009 (2)
    • April 2009 (1)
    • March 2009 (3)
    • February 2009 (1)
    • January 2009 (3)
    • AS3 Transform Tool for scaling, rotating components containing text controls in Flex (19)
    • Alive PDF from Flash Player 10 issue (7)
    • Rotating text along a circular arc in as3 (7)
    • Simple tutorial for creating an AIR application using Merapi Bridge (6)
    • Publish into facebook wall from flex (5)
    • Adobe Stratus Video Chat using Flex 4 and PHP / ColdFusion Services (5)
    • Using mouse position from Javascript into Flex (3)
    • Dynamic TextArea control that resizes with the text content (2)
    • Adding Singleclick, Doubleclick and Drag events all at a time in as3 (2)
    • Flex and Amazon S3(Simple Storage Service) integration simplified. (2)
  • Twitxe

    Loading tweets...
    Follow me on Twitter!
  • Resources

    • ByteArray.org
    • Flex Examples
    • InsideRIA
    • lab.polygonal.de
    • Reflektions.com
    • ScaleNine
    • Senocular
    • The Official Flex Team Blog
Copyright © 2009 ::RIAXE:: | The solving side