en en en en en en en en en en en en en en en en fa en en fr hbs_lat en en en es en en en de en en fr en en ca en en en en en en en en en en en en en en en en en en fr en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en es en en en en en es en en en en en pl en en en de en en en en en en en fr cv es tr es en en en en ms en en en en en en fr en hbs_lat en en en en en en en fr cv es tr es en en en en de en en en ca en en en en en
accessing loaded swf's textfield and MC's
punchcreative replied to punchcreative's topic in Loading (Flash)
can you please explain me what to do to stop the netstream in a VideoLoader which is in an mc contentWindow
punchcreative replied to luk's topic in Loading (Flash)
punchcreative replied to a topic in Loading (Flash)
problem solved mainQue = new LoaderMax({name:"mainItemsQue",onComplete:mQcompleteHandler, onError:mQerrorHandler, onChildProgress:progressHandler}); mainQue.append(new XMLLoader(debugging + "xml/main.xml", {name:"mainXML",recursivePrependURLs:debugging}) ); had the recursivePrependURLs in the LoaderMax definition in the first place.
punchcreative replied to a topic in Loading (Flash)
i can't get mainQue = new LoaderMax({name:"mainItemsQue",recursivePrependURLs:debugging, onComplete:mQcompleteHandler, onError:mQerrorHandler, onChildProgress:progressHandler}); to work i want to us the string debugging, which holds "../" to test on my local machine, and make the string empty when i publish
accessing loaded swf's textfield and MC's
punchcreative replied to punchcreative's topic in Loading (Flash)
i'm on my way of getting there even targeting the loaded SWF from Main succeeds from within the complete function i used event.target.rawContent.kop.text = "just a test"; to solve an issue on the loaded AMSheet i skipped TLFTexField and used the classic version the XML tut came in very handy thanx sofar (guess i'll be back)
accessing loaded swf's textfield and MC's
punchcreative replied to punchcreative's topic in Loading (Flash)
as the SWFLoader loads the amSheet.swf correctly how can i access the loaded swf's TLFTextfields and mc from the main class (root) i tried contentWindow.sheetAM.kop.text as sheetAm is the name i gave the loaded SWF in the amSheetComplete function TypeError: Error #1009: Cannot access a property or method of a null object reference. at nl.agis::AmSheet/createAMSheet() at nl.agis::AmSheet() Cannot display source code at this location. by the way, replying on a saturday is really a BIG UP deadline is chasing me
accessing loaded swf's textfield and MC's
punchcreative replied to punchcreative's topic in Loading (Flash)
Attempting to launch and connect to Player using URL /Volumes/Media/Punch Sync MacBook/110202 Agis AMZM/flash/app/swf/main.swf [sWF] Volumes:Media:Punch Sync MacBook:flash:app:swf:main.swf - 861006 bytes after decompression fontName: Agis Klavika Medium fontType: embeddedCFF fontStyle: regular fontName: Agis Klavika Medium fontType: embeddedCFF fontStyle: regular 1 steps: p91 XMLLoaderComplete: p01,p91 [sWF] Volumes:Media:Punch Sync MacBook:110202 Agis AMZM:flash:app:swf:.:amSheet.swf - 590626 bytes after decompression listSheetItems traced: Doorlopen eerste versie inleiding Fullscreen Navigatie invoer Accountmanager Voordelen Evaluatie Afsluiting sheetItems 0 data from XMLList: sheetItems Doorlopen eerste versie TypeError: Error #1009: Cannot access a property or method of a null object reference. at nl.agis::AmSheet/createAMSheet() at nl.agis::AmSheet() Cannot display source code at this location. this is the amSheet class package nl.agis { import fl.text.TLFTextField; import fl.transitions.*; import fl.transitions.easing.*; import flash.display.*; import flash.events.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import flash.net.*; import flash.system.Security; import flash.text.*; import flash.text.Font; import flash.ui.Keyboard; import flash.utils.*; import flashx.textLayout.container.*; import flashx.textLayout.elements.*; import flashx.textLayout.formats.*; import com.greensock.*; import com.greensock.TweenMax; import com.greensock.easing.*; import com.greensock.events.LoaderEvent; import com.greensock.layout.*; import com.greensock.loading.*; import com.greensock.loading.display.*; import flash.display.MovieClip; import Main; public class AmSheet extends MovieClip { public var kop:TLFTextField; public var t1:TLFTextField; public var t2:TLFTextField; public var t3:TLFTextField; public var t4:TLFTextField; public var t5:TLFTextField; public var t6:TLFTextField; public var t7:TLFTextField; public var sub:TLFTextField; public var listSheetItems:XMLList; public function AmSheet() { listSheetItems = new XMLList(Main.M._XML_sheet); trace("listSheetItems traced:"); trace(listSheetItems); var foto:ImageLoader = new ImageLoader("../am-img/" + Main.M._XML_sheet.@afb + ".png", {name:"sheetafb",container:this.polaroid.foto}); createAMSheet(0); } private function createAMSheet(nr:Number):void { var sheetItems:XMLList = new XMLList(listSheetItems.children()[nr].children()); trace("sheetItems 0 data from XMLList:"); trace("sheetItems"); var teller:Number = sheetItems.length(); var yPos:Number = 240; for (var i:Number = 0; i < teller;i++) { switch (sheetItems[i].@soort.toString()) { case "kopregel": trace(sheetItems[i].text()); kop.text = sheetItems[i].text(); break; case "tekst": trace(sheetItems[i].text()); this["t"+i].text = "• " + sheetItems[i].text(); break; default: trace("niets gevonden!"); } } } } } seems like i'm doing this wrong var sheetItems:XMLList = new XMLList(listSheetItems.children()[nr].children()); i'm a bit blacked out at the moment
accessing loaded swf's textfield and MC's
punchcreative posted a topic in Loading (Flash)
i'm stuck on probably something simple to an advanced user in a main class from wthin a function i call var amsheet_loader:SWFLoader = new SWFLoader("./amSheet.swf", {name:"sheetAM", container:contentWindow, onProgress:progressHandler, onComplete:amSheetComplete}); amsheet_loader.load(); this is the listener object public function amSheetComplete(event:LoaderEvent):void { trace("amSheetComplete - " + contentWindow.getChildAt(0).name); } this is wordking fine and i see the amSheet.swf is loaded in the contentWindow mc which is on the root timeline of main.swf ([sWF] Volumes:Media:Punch Sync MacBook:flash:app:swf:.:amSheet.swf - 590408 bytes after decompression) in amSheet.swf there are some TLFTextFields on the stage, which i have given an embedded font, and a mc polaroid which holds a masked mc foto where i want to load a picture in. in the amSheet class i have the following code which i thougt was going to fill the TLFTextFields and the fot mc in polaroid, but..... public function AmSheet() { listSheetItems = new XMLList(Main.M._XML_sheet); var foto:ImageLoader = new ImageLoader("../am-img/" + Main.M._XML_sheet.@afb + ".png", {name:"sheetafb",container:this.polaroid.foto}); createAMSheet(0); } private function createAMSheet(nr:Number):void { var sheetItems:XMLList = new XMLList(listSheetItems.children()[nr].children()); //trace("de sheetItems 0 data uit XMLList: " + sheetItems); var teller:Number = sheetItems.length(); var yPos:Number = 240; for (var i:Number = 0; i < teller;i++) { switch (sheetItems[i].@soort.toString()) { case "kopregel": kop.text = sheetItems[i].text(); trace(sheetItems[i].text()); break; case "tekst": this["t"+i].text = "• " + sheetItems[i].text(); trace(sheetItems[i].text()); break; default: trace("niets gevonden!"); } } } when debugging i get this error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at nl.agis::AmSheet/createAMSheet() at nl.agis::AmSheet() Cannot display source code at this location.
Fast mouse movement skips MouseEvent.ROLL_OUT
punchcreative replied to punchcreative's topic in GSAP (Flash)
problem solved, there were some things i didn't handle well... for instance i gave the library mc itself the listeners for roll_over and roll_out instead of the hoover mc hoover mc is now just an indicator of the area which to listen to i gave the tweens an overwrite:1 to be sure the menu down acted as i want it to maybe this helps some of you with the same issue initMenu(); function initMenu():void { //this.mouseChildren = true; this.addEventListener(MouseEvent.ROLL_OVER, menuUit); this.addEventListener(MouseEvent.ROLL_OUT, menuIn); nav.mouseChildren = true; afb.mouseEnabled = true; afb.mouseChildren = true; afb.buttonMode = true; for (var i:Number = 1;i<11;i++) { nav["btn_" + i].addEventListener(MouseEvent.ROLL_OVER, btnOver); nav["btn_" + i].addEventListener(MouseEvent.ROLL_OUT, btnOut); nav["btn_" + i].buttonMode = true; nav["btn_" + i].mouseEnabled = true; } } function menuUit(e:MouseEvent):void { this.parent.setChildIndex(this,this.parent.numChildren - 1); hoover.height = hoover.height + nav.bkg.height; TweenMax.to(nav, 1, {y:(yPosFotoOnder + nav.bkg.height), delay:0.3, ease:Sine.easeOut, overwrite:1}); } function menuIn(e:MouseEvent):void { this.hoover.height = yPosFotoOnder + (randHoover*2); TweenMax.to(nav, 0.5, {y:yPosFotoOnder, ease:Sine.easeIn, overwrite:1}); } function btnOver(e:MouseEvent):void { e.target.gotoAndStop(2); this.titel.text = e.target.name; } function btnOut(e:MouseEvent):void { e.target.gotoAndStop(1); }
Fast mouse movement skips MouseEvent.ROLL_OUT
punchcreative posted a topic in GSAP (Flash)
in a menu (dropdown block) that i build using actionscript 3 and a library mc the menubuttons scroll down on mouseover of an image (afb) in the menu mc and scroll up when rolling over an invisible border (hoover in green). there are 4 different menu mc's created on the stage and when moving fast with the mouse, the leaving action of a menu mc is not detected bij the listener for the MouseEvent.ROLL_OUT in the mc. thus the menubuttons (mc) does'nt scroll up. the listeners are defined in the library mc, which is duplicated for each menu item i wonder is the tweening causes the problem initMenu(); function initMenu():void { this.nav.mouseChildren = true; this.afb.mouseEnabled = true; this.afb.mouseChildren = true; this.afb.buttonMode = true; this.afb.addEventListener(MouseEvent.ROLL_OVER, menuUit); for (var i:Number = 1;i<11;i++) { this.nav["btn_" + i].addEventListener(MouseEvent.MOUSE_OVER, btnOver); this.nav["btn_" + i].addEventListener(MouseEvent.MOUSE_OUT, btnOut); } } function menuUit(e:MouseEvent):void { this.afb.removeEventListener(MouseEvent.ROLL_OVER, menuUit); this.hoover.height = this.hoover.height + this.nav.bkg.height; TweenMax.to(this.nav, 1, {y:(yPosFotoOnder + this.nav.bkg.height), delay:0.3, ease:Sine.easeOut}); this.hoover.addEventListener(MouseEvent.ROLL_OVER, menuIn); } function menuIn(e:MouseEvent):void { this.hoover.removeEventListener(MouseEvent.ROLL_OVER, menuIn); this.hoover.height = yPosFotoOnder + (randHoover*2); TweenMax.to(this.nav, 0.5, {y:yPosFotoOnder, ease:Sine.easeIn}); this.afb.addEventListener(MouseEvent.ROLL_OVER, menuUit); } function btnOver(e:MouseEvent):void { e.target.parent.gotoAndStop(2); } function btnOut(e:MouseEvent):void { e.target.parent.gotoAndStop(1); }
“I’ve long felt like GSAP is the best kept secret in JavaScript.”
“@greensock is just pure awesomeness. What more can be said?”
“If every library were as robust and reliable as GreenSock’s, the world would be a much better place for software engineers and their clients. I can't think of a better designed or better performing tool, and as a bonus, it's fun as heck to play with.”
“With the incredible functionality, and the mind-blowing customer service, the price of Club GreenSock admission is well worth it!”
“Really quite impressed with @GreenSock JS - even the small things.”
“The GreenSock animation platform is one of the most useful sets of tools in existence when it comes to web animation.”
“GSAP is just miles and miles ahead of any animation library out there. Great work!”
“Honestly think without TweenMax, I'd of changed careers by now; it's that good.”
“@greensock it’s a great library that many people love, and I know you care deeply about performance :)”
Sign Up For Our Newsletter
Get the latest updates on GreenSock products, exclusive offers, and more right in your inbox.
Your information will always be kept confidential.
Thanks for signing up!
Now you'll begin receiving the latest GreenSock updates, exclusive offers, and more right in your inbox. Welcome aboard.