Jump to content
Search Community

mrkos67

Members
  • Posts

    49
  • Joined

  • Last visited

Everything posted by mrkos67

  1. Found it. I didn't realize the LoaderEvent had a "text" property for errors, fails, and such. Using that, it was determined that the fail was being caused by an incorrectly terminated <![CDATA[]]> block in the XML file itself.
  2. What would cause an XMLLoader to fail? This just started happening the other day, whereas before it was working perfect. When I started getting this error, I added all the other event listeners to see if anything else was going on, but the only events that fire are the OPEN, an HTTPStatus, and then the FAIL, as indicated by the output below. Code to load the XML var xmlLoader:XMLLoader = new XMLLoader( $url, {} ); xmlLoader.addEventListener( LoaderEvent.OPEN, onOpen_xml, false, 0, true ); xmlLoader.addEventListener( LoaderEvent.COMPLETE, onComplete_xml, false, 0, true ); xmlLoader.addEventListener( LoaderEvent.FAIL, onFail_xml, false, 0, true ); xmlLoader.addEventListener( LoaderEvent.ERROR, onError_xml, false, 0, true ); xmlLoader.addEventListener( LoaderEvent.IO_ERROR, onIOError_xml, false, 0, true ); xmlLoader.addEventListener( LoaderEvent.HTTP_STATUS, onHTTPStatus_xml, false, 0, true ); xmlLoader.addEventListener( LoaderEvent.SECURITY_ERROR, onSecurityError_xml, false, 0, true ); xmlLoader.addEventListener( LoaderEvent.UNCAUGHT_ERROR, onUncaughtError_xml, false, 0, true ); xmlLoader.load(); protected function onOpen_xml( evt:LoaderEvent ):void { _log.log( "AudioRecorderApp :: onOpen_xml()" ); } protected function onError_xml( evt:LoaderEvent ):void { _log.log( "AudioRecorderApp :: onError_xml()" ); } protected function onIOError_xml( evt:LoaderEvent ):void { _log.log( "AudioRecorderApp :: onIOError_xml()" ); } protected function onHTTPStatus_xml( evt:LoaderEvent ):void { _log.log( "AudioRecorderApp :: onHTTPStatus_xml() - data:" +evt.data ); } protected function onFail_settings( evt:LoaderEvent ):void { _log.log( "AudioRecorderApp :: onFail_xml() - data:" + evt.data ); protected function onUncaughtError_xml( evt:LoaderEvent ):void { _log.log( "AudioRecorderApp :: onUncaughtError_xml()" ); } protected function onSecurityError_xml( evt:LoaderEvent ):void { _log.log( "AudioRecorderApp :: onSecurityError_xml()" ); } protected function onComplete_settings( evt:LoaderEvent ):void { _log.log( "AudioRecorderApp :: onComplete_xml()" ); } And the output: AudioRecorderApp :: onOpen_xml() AudioRecorderApp :: onHTTPStatus_xml() - data:[HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=200 redirected=false responseURL=null] AudioRecorderApp :: onFail_xml() - data:null I don't get it.
  3. I'm running into this issue as well. Is there any way around this? I'd really like to be able to cast my loaded children SWF as they are, so I have access to their properties and methods. FWIW, It seems to work when I test my parent SWF on my development server (pulling the children SWF from another domain), but not when testing locally.
  4. roger that. i'll update my bookmark with the new api docs.
  5. Is goto() deprecated for TimelineLite and TimelineMax? It's still in the API docs (http://www.greensock.com/as/docs/tween/com/greensock/TimelineLite.html), but doesn't come up in the code hints in the Flash IDE, as well as throwing an "possibly undefined method" compilation error. What's the workaround now?
  6. I've discovered something strange.... Here's the link where I need it to work: http://dev.option5.net/CNCT/CNCT13009_new/index.html (Click the play button. This is supposed to load a SlideshowApplication.swf, which is then loading a variety of SWFs, like a BarBannerWidget, which is then loading 3 different banner SWFs. If you have the debug player installed, you'll see 3 errors come up, one for each of the banner SWFs. See the link below to see what it's supposed to look like.) When I throw the SlideshowApplication.swf and all accompanying SWFs on a separate page, it works: http://dev.option5.net/CNCT/slideshow/ I even tried moving the SlideshowApplication.swf to another domain of mine to see if it would still work as a standalone cross domain, loading the SWFs from the dev.option5.net domain, and it does: http://www.johnbandy.net/stuff/slideshow/ So something about getting loaded into the BannerTimelineApplication.swf is throwing it off somewhere.
  7. I don't understand what's going on. I've got Security.allowDomain("*"); Security.allowInsecureDomain("*"); in both SWFs. I tried using this: new LoaderContext( true, new ApplicationDomain( ApplicationDomain.currentDomain), SecurityDomain.currentDomain ) as the SWFLoader's "context" init object in the main SWF that's doing the loading Nothing's working. I keep getting the error: "TypeError: Error #1034: Type Coercion failed: cannot convert com.greensock::TimelineMax@3c96cf41 to com.greensock.core.TweenCore." This is driving me crazy and I'm under deadline. :/
  8. They're all using the same version of the platform (all my projects use the same src location for external libraries). Got a link/tutorial on the ApplicationDomain and LoaderContext stuff? I've never done that before.
  9. I'm getting this same error, but with a TimelineMax and TweenCore. I've narrowed it down to loading an external SWF (with a TimelineMax instance) from a different domain/URL. When I load that external SWF locally, it works fine. Is there some cross-domain/casting/conversion thing that's going on?
  10. It seems to be a problem with the Flash Player. When exporting a projector file, it works fine loading up all 60 videos.
  11. hmm, how about keeping a queue of the next 10 videos? do all i have to do is call unload() on the VideoLoader to flush that video from memory? and then call load() again if I need it again?
  12. I'm getting an error when I try to load about 60 smallish videos from an XML file. Most videos are around 4-7MB, but a few are bigger. The total size of the folder is 486MB. The strange thing is the error that is thrown by what I assume is the LoaderMax code. View it here: http://pastebin.com/TBvKjcrJ (the editor here wasn't allowing me to paste the actual URL in the error for some reason). The lines above the error code are me tracing out progress to see when it happens. I've tried commenting out nodes in the XML until it works, and it seems I can get around 25-27 of these videos to load successfully. Sometimes 26 will work, sometimes it doesn't. It's really bizarre. I've got Error and Fail listeners on the LoaderMax instance and nothing is being caught by those listeners. What makes this really strange is the URL that is says it has an error loading isn't in the XML to be loaded, but is the SWF where the LoaderMax instance resides. What the what?! Anybody have any ideas?
  13. Nope, all SWFs are on the same domain. I'll see what I can do about creating some simple test files.
  14. I'm making a modular presentation tool for a client with different "scenes" (separate SWFs) loaded into the main SWF. Each of the separate SWFs contain a public timeline variable (a TimelineMax instance), which I'm using to sequence them into the main app's _timeline variable (a TimelineMax instance). When I test each of the scene SWF's timelines separately, tweens with motion blurs applied work correctly. However, when nested into the main app's _timeline, each SWF's timeline is firing but those tweens with motion blurs don't show (all others do); objects with motion blur tweens applied to them just "appear" after their tweens have completed. When I remove all motion blur directives to the tweens in each SWF, everything appears as it should when loaded into the main SWF's _timeline. In the main SWF, I activated the MotionBlurPlugin to test if that might have been the case, but that didn't work. Any ideas? main SWF — this is within a loop and the listeners fire (no need to put all that code, just know they toggle the visibility of the CarringtonScene object). var s:CarringtonScene = CarringtonScene( pi.loader.rawContent ); s.visible = false; s.timeline.paused = false; _timeline.insert( s.timeline, $insertTime ); s.addEventListener( CarringtonSceneEvent.START, onStart_scene ); s.addEventListener( CarringtonSceneEvent.COMPLETE, onComplete_scene ); CarringtonScene6.SWF — this is in the constructor. // init timeline _timeline = new TimelineMax( { paused:true } ); _timeline.insert( TweenLite.to( mcLogo, .50, { x:131, motionBlur:true } ), 1.5 ); _timeline.insert( TweenLite.to( mcCampus, .40, { alpha:1 } ), 2 ); _timeline.insert( TweenLite.to( mcAddy1, .40, { alpha:1 } ), 2.2 ); _timeline.insert( TweenLite.to( mcAddy2, .40, { alpha:1 } ), 2.4 ); _timeline.insert( TweenLite.to( mcPresenter, .50, { x:71.75, motionBlur:true } ), 2.8 ); _timeline.insert( TweenLite.to( mcName , .50, { x:69.75, motionBlur:true } ), 3.0 ); _timeline.insertMultiple( [ TweenLite.to( mcLogo, .75, { x:"-1000", motionBlur:true, ease:Back.easeIn } ), TweenLite.to( mcCampus, .75, { x:"-1000", motionBlur:true, ease:Back.easeIn } ), TweenLite.to( mcAddy1, .75, { x:"-1000", motionBlur:true, ease:Back.easeIn } ), TweenLite.to( mcAddy2, .75, { x:"-1000", motionBlur:true, ease:Back.easeIn } ), TweenLite.to( mcPresenter, .75, { x:"-1000", motionBlur:true, ease:Back.easeIn } ), TweenLite.to( mcName, .75, { x:"-1000", motionBlur:true, ease:Back.easeIn } ) ], 6 );
  15. I do have bufferMode set to true. Will the video start playing when it has enough in the buffer if I set that to false?
  16. http://dev.option5.net/CNCT/CNCT13004/video.html I've built a custom video player built on the use of VideoLoader. However, the loader progress isn't working. It appears to be working; the loader bar grows in width based on a LoaderEvent.PROGRESS dispatch. But when I test the actual network usage in Chrome (dev tools), it shows the video is loading long after the loader bar goes to 100%. Any ideas?
  17. this doesn't work for me; i get errors thrown saying that fitHeight and fitWidth aren't properities of a ContentDisplay object. any help would be appreciated. exact errors thrown: ReferenceError: Error #1056: Cannot create property fitWidth on com.greensock.loading.display.ContentDisplay. ReferenceError: Error #1056: Cannot create property fitHeight on com.greensock.loading.display.ContentDisplay.
  18. just created a basic class for this: package { import com.greensock.*; import com.greensock.events.*; import flash.events.*; //======================================================================================================================================= // CLASS: SecondsTimer //--------------------------------------------------------------------------------------------------------------------------------------- public class SecondsTimer extends EventDispatcher { //===================================================================================================================================== // CONSTS //------------------------------------------------------------------------------------------------------------------------------------- //===================================================================================================================================== // VARS //------------------------------------------------------------------------------------------------------------------------------------- protected var _timer :TweenMax; protected var _$currentTime :int; protected var _$currentCountdown :int; protected var _$duration :int; //===================================================================================================================================== // GETTERS //------------------------------------------------------------------------------------------------------------------------------------- public function get duration () :int { return( _$duration ); } public function get currentTime () :Number { return( _$currentTime ); } public function get currentCountdown () :Number { return( _$currentCountdown ); } //===================================================================================================================================== // SETTERS //------------------------------------------------------------------------------------------------------------------------------------- public function set duration ( $n:int ) :void { _$duration = $n; } //===================================================================================================================================== // CONSTRUCTOR & INITS //------------------------------------------------------------------------------------------------------------------------------------- public function SecondsTimer( $duration:int = -1 ) { // init vars duration = $duration; } //===================================================================================================================================== // PUBLIC ACCESS //------------------------------------------------------------------------------------------------------------------------------------- public function start():void { if( _$duration > 0 ) _timer = TweenMax.to( this, _$duration, { onUpdate:onUpdate_timer, onComplete:onComplete_timer } ); else dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "Property \"duration\" has not been set." ) ); } //------------------------------------------------------------------------------------------------------------------------------------- public function play():void { if( _timer ) _timer.play(); else start(); } //------------------------------------------------------------------------------------------------------------------------------------- public function pause():void { if( _timer ) _timer.pause(); else dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "Timer is not currently running" ) ); } //------------------------------------------------------------------------------------------------------------------------------------- public function stop():void { if( _timer ) _timer.kill(); else dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "Timer is not currently running" ) ); } //===================================================================================================================================== // HELPERS //------------------------------------------------------------------------------------------------------------------------------------- protected function onUpdate_timer( evt:TweenEvent = null ):void { var newCurrentTime:int = Math.floor( _timer.currentTime ); if( _$currentTime != newCurrentTime ) { _$currentTime = newCurrentTime; _$currentCountdown = _$duration - _$currentTime; dispatchEvent( new TimerEvent( TimerEvent.TIMER ) ); } } //------------------------------------------------------------------------------------------------------------------------------------- protected function onComplete_timer( evt:TweenEvent = null ):void { dispatchEvent( new TimerEvent( TimerEvent.TIMER_COMPLETE ) ); } } }
  19. var $time:int = 90; var twn:TweenMax = TweenMax.to( this, $time, { onUpdate:onUpdate_tl, onComplete:onComplete_tl } ); function onUpdate_tl( evt:TweenEvent = null ):void { mcTimer.time = Math.ceil( $time - twn.currentTime ); } function onComplete_tl( evt:TweenEvent = null ):void { trace( "timer done!" ); } btnPlay.addEventListener( MouseEvent.CLICK, onclick_play ); btnPause.addEventListener( MouseEvent.CLICK, onclick_pause ); function onclick_play( evt:MouseEvent ):void { twn.play(); } function onclick_pause( evt:MouseEvent ):void { twn.pause(); } Works like a champ! Just thought I'd post this in case anybody might want to use it.
  20. so i found this thread (viewtopic.php?f=1&t=1585) and apparently what i'm experiencing isn't a bug, but it's the way Greensock intended. Greensock: will there be an update to the timeline classes to include some sort of variable to override this behavior? i could see this being very handy. carl: thanks for your suggestion, i've modified my code to do something similar to what you've outlined, and it works perfectly.
  21. it is paused when it's created because it's being created earlier in the function. i didn't even think of that. that's why it isn't playing. i commented that line of code, and the first aif plays but not the successive ones (they actually are, but at the same time as the others because they're all created in the same FOR loop earlier). so yeah, now the question is why the main timeline isn't triggering/playing each child timeline when it reaches it?
  22. Do nested timelines have to have the same parent, i.e. can my Document Class have a timeline, and append/insert a child object's timeline? Because right now, I can't seem to get it working. Here's a breakdown of my code: //------------------------------------------------------------------------------------------------------------------------------------- ... _timeline = new TimelineMax(); for( $i = 0; $i < $aifs.length; $i++ ) { aif = $aifs[$i]; var tlmAIF:TimelineMax = new TimelineMax(); if( aif.timeline ) tlmAIF.insert( aif.timeline, 0 ); tlmAIF.insert( TweenLite.to( aif, .5, { alpha:1 } ), 0 ); tlmAIF.insert( TweenLite.to( aif, $transTime, { alpha:0 } ), 3.5 ); _timeline.append( tlmAIF, -$transTime ); } ... The problem comes when doing the tlmAIF.insert( ... ) on the aif.timeline, even though aif.timeline is not null and it will play using other means by changing the previous code to use an onStart function like so: //------------------------------------------------------------------------------------------------------------------------------------- ... _timeline = new TimelineMax(); for( $i = 0; $i < $aifs.length; $i++ ) { aif = $aifs[$i]; var tlmAIF:TimelineMax = new TimelineMax( {onStart:onStart_aif, onStartParams:[ aif ] } ); tlmAIF.insert( TweenLite.to( aif, .5, { alpha:1 } ), 0 ); tlmAIF.insert( TweenLite.to( aif, $transTime, { alpha:0 } ), 3.5 ); _timeline.append( tlmAIF, -$transTime ); } ... //------------------------------------------------------------------------------------------------------------------------------------- private function onStart_aif( aif:AnimatedImageFrame ):void { aif.timeline.play(); } However, I want all animations to be within the main timeline so i can play/pause/seek accordingly. Any insight would be much appreciated. Thanks.
×
×
  • Create New...