Home Tutorials Forums Articles Blogs Movies Library Employment Press
Prev Previous Post   Next Post Next
Old 06-25-2007, 12:40 AM   #1
team08
Registered User
 
Join Date: Jun 2007
Posts: 10
Default MXML + AS = frustrating!

I am a c+-#? programmer and am getting killed by this programming environment. AS in flex has been great, straight forward, no problems. Now that I am trying to integrate it into MXML, I want to shoot myself. I have a standalone app in AS, that is basically a CAD/drawing program. Now I want it to live inside a nice graphical environment with buttons for controls. I could keep using AS, but it seems most people use MXML. So the class is called "test" and I dont know how to make an object in MXML and then draw it. Here is the MXML code:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!--usingas/eightCAD.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
	<mx:Script><![CDDATA[
		import test;
		
		public var x:test = new test();
	]]></mx:Script>		
	<mx:Button id="b1" label="Draw"
		click="x.drawBoard();"/>
</mx:Application>
and the AS code starts as:

Code:
package {
	import flash.display.Sprite;
	import flash.display.Shape;
	import flash.geom.Point;
	import flash.geom.Matrix;
	import flash.events.MouseEvent;
	import flash.display.Loader;
	import flash.net.URLRequest;
	import flash.events.Event;
	import flash.display.BitmapData;

	public class test extends Sprite
	{
		private var imgLoader:Loader;
		private var boardSprite:Sprite = new Sprite();
Thanks for any help!
team08 is offline   Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Having problems linking mxml and AS robbob22 ActionScript 3.0 2 01-29-2007 02:34 PM
Dynamic MXML with ActionScript Achernar Flex 2, 3 & 4 2 12-30-2006 03:56 PM
Passing variables between MXML files / components - Flex component communication ljonny18 Flex 2, 3 & 4 4 10-27-2006 04:54 PM
open MXML component + button click ljonny18 Flex 2, 3 & 4 5 10-25-2006 08:50 PM
mxml on client (illegal?) Igor Ageyev Flex 1 1 11-30-2005 01:29 PM


All times are GMT. The time now is 11:39 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.