Is it possible to use HTTPService outside of MXML in an ActionScript class? I have a very simple ActionScript project with the code:
[CODE] package { import flash.display.Sprite; import mx.rpc.http.HTTPService; public class HTTPServiceExample extends Sprite { public function HTTPServiceExample() { var service:HTTPService = new HTTPService(); } } } [/CODE] that I can't get to compile. Flex Builder reports the problem, "An internal build error has occurred. Please check the Error Log.", and when I check the log, I see: [LOGGED_ERROR] !ENTRY com.adobe.flexbuilder.project 4 43 2006-09-27 12:11:49.97 !MESSAGE Uncaught exception in compiler !STACK 0 java.lang.NullPointerException at macromedia.asc.semantics.InterfaceWalker.processQueue(InterfaceWalker.java:75) at macromedia.asc.semantics.InterfaceWalker.<init>(InterfaceWalker.java:27) at macromedia.asc.semantics.InterfaceWalker.<init>(InterfaceWalker.java:17) at macromedia.asc.semantics.FlowAnalyzer.scanInterfaceMethods(FlowAnalyzer.java:5972) at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:4833) at macromedia.asc.parser.BinaryClassDefNode.evaluate(BinaryClassDefNode.java:22) at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:2559) at macromedia.asc.parser.ProgramNode.evaluate(ProgramNode.java:63) at flex2.compiler.abc.Compiler.analyze2(Compiler.java:280) at flex2.compiler.API.analyze(API.java:2118) at flex2.compiler.API.analyze(API.java:2041) at flex2.compiler.API.batch2(API.java:296) at flex2.compiler.API.batch(API.java:901) at flex2.compiler.API.compile(API.java:1110) at flex2.compiler.API.compile(API.java:1022) at com.adobe.flexbuilder.project.compiler.Compiler.compile(Unknown Source) at com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.buildApplication(Unknown Source) at com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.build(Unknown Source) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:593) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044) at org.eclipse.core.runtime.Platform.run(Platform.java:783) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:168) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:202) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:231) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044) at org.eclipse.core.runtime.Platform.run(Platform.java:783) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:234) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:253) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:282) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:139) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:200) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) [/LOGGED_ERROR] Am I doing something wrong, or is Flex Builder? I see from http://kuwamoto.org/2006/08/04/flex-tags-and-as-class-the-exceptions/ that HTTPService is a faceless component and "can only go at the root level of a document", but I can't imagine you must use HTTPService in the context of MXML. Any ideas on how to use an HTTPService from ActionScript? Also, I am including the "libs/rpc.swc" library. Thanks. Ali -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/