Jump to content
Search Community

patcruz

Members
  • Posts

    7
  • Joined

  • Last visited

patcruz's Achievements

0

Reputation

  1. Hello carl schooff, Thank you for your reply. I don't need a perfect flag movement, just some movement that feels like a flag. A simple tween is too flat, for that feel. It is to be used on a mobile application, so a complex math calculations maybe not so good... I will try to figured something out, in the meantime, if anyone have or found a solution I will be glad to take it. =)
  2. Hello, I saw some animation done with greensock js flavor... http://codepen.io/nrose/details/KrnGq Is this possible with as3 version? How can I create a animation to simulate a flag? Thank you...
  3. I'm sorry, i mispelled the correct work... has holder, not loader. holder is a container for the loaded SWF.
  4. Hello, I have an AIR application where I have to load a SWF from a server. At some point the user will click on a button and that button will create a new nativeWindow. Inside that nativeWindow we have a stage reference. I just want to load a SWF, addChild it to the stage and be happy! But I'm getting this error: SecurityError: Error #2070: Security sandbox violation: caller http://somewhere.com/swfapp.swf cannot access Stage owned by app:/Teste.swf. at flash.display::Stage/get stageWidth() at com.swfapp::MainClass/initApp() at flash.display::DisplayObjectContainer/addChild() at flash.display::Stage/addChild() at NativeWindowSWFLoader/loadSWFURLComplete()[C:\Users\hats\Desktop\teste\NativeWindowSWFLoader.as:93] I'm using a normal SWFLoader: private function loadSWF(url:String):void { holder = new MovieClip(); applicationDomain = new ApplicationDomain(); loaderContext = new LoaderContext(false, applicationDomain); loader = new SWFLoader(url, { context:loaderContext, container:holder, onProgress:progressHandler, onComplete:onCompleteSWFLoader } ); loader.load(); } private function onCompleteSWFLoader(e:Event):void { this.stage.addChild(holder); } Can someone hep me on this? Thank you.
  5. I have a XMLLoader loading a XML with the following structure: <data> <LoaderMax name="loaderMax" prependURLs="../paginas/" load="false"> <SWFLoader url="page1.swf" name="pag1" autoPlay="false"/> <SWFLoader url="page2.swf" name="pag2" autoPlay="false"/> </LoaderMax[/indent] </data> I want to load automatically all the SWF and track the loader progress and on the loader complete, send all the loaded content to Vector. This Vector will be used along other classes and the content instantiated when needed. private function startLoaders():void { loaderXML = new XMLLoader("xml.xml", { name:"book", requireWithRoot:this.root, estimatedBytes:3000 } ); loaderMax = new LoaderMax( { name:"loaderMax", onProgress:progressHandlerLoaderMax, onComplete:completeHandlerLoaderMax, onError:errorHandlerLoaderMax } ); loaderMax.append(loaderXML); loaderMax.load(); } private function progressHandlerLoaderMax(evt:LoaderEvent):void { trace("loaded: " + evt.target.progress); this.loadbar.scaleX = evt.target.progress; } private function errorHandlerLoaderMax(evt:LoaderEvent):void { trace("error loading: " + evt.text); } private function completeHandlerLoaderMax(evt:LoaderEvent):void { var vector:Vector.<MovieClip> = new Vector.<Class>(); var xml:XML = loaderXML.getContent("livroConfig"); numberSWF = xml.child(0).child(0).length();[/indent] for (var i:int = 0; i < numberSWF; ++i) [/indent] { vector.push(LoaderMax.getLoader("pag" + i).rawContent); } dispatchEvent(new Event(EventLoadPaginas.LOADCOMPLETE)); } This is not working... What is the best way to accomplish this? I just need to get all the content from the SWF used anywhere else and call methods inside that SWF. Thank you!
  6. hehehehe newbie errors!! It works now! Thank you so much for the fast reply, you save me some hours of sleeeepp! fantastic work!
  7. I want to access some public functions inside a loaded SWF. private var contentor:MovieClip; private var loaderSwf:LoaderMax; ... public function LoaderClass():void { loaderSwf = new LoaderMax( { name:"loaderSwf", onOpen:startHandler, onProgress:progressHandler, onComplete:completeHandlerSwf, onError:errorHandler } ); } private function completeHandlerSwf(event:LoaderEvent):void { contentor = new MovieClip; contentor = event.target.rawContent as MovieClip; dispatchEvent(new Event(Event.COMPLETE)); } I get this error: "ReferenceError: Error #1069: Property rawContent not found on com.greensock.loading.LoaderMax and there is no default value." If I try to access the rawContent trow the loader: private function completeHandlerSwf(event:LoaderEvent):void { contentor = new MovieClip; contentor = loaderSwf.rawContent as MovieClip; dispatchEvent(new Event(Event.COMPLETE)); } I get this error: "1119: Access of possibly undefined property rawContent through a reference with static type com.greensock.loading:LoaderMax." I'm I missing some import? Some newbie error?
×
×
  • Create New...