Alex.A
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Alex.A
-
-
Is there the way to "load" server's echo answer? Like that:
var server_queue:LoaderMax = new LoaderMax({name:"server_queue", autoLoad:true, onChildComplete:serverAnswer, onError:serverError}); server_queue.append(new DataLoader(http://server/id.php", {name:"get_id", format:"text"})); function serverAnswer(e:LoaderEvent):void { trace(LoaderMax.getContent(e.target.name)); }
// id.php <?php echo "123456"; ?>
-
Yep, that works
- 1
-
Can't make playback listeners works.
SOUND_PLAY, SOUND_PAUSE etc. just don't shoot
import com.greensock.*; import com.greensock.events.*; import com.greensock.easing.*; import com.greensock.plugins.*; import com.greensock.loading.*; import com.greensock.loading.display.*; var queue:LoaderMax = new LoaderMax({name:"mainQueue", onComplete:completeHandler, onError:errorHandler}); var sound:MP3Loader = new MP3Loader("test.mp3", {name:"audio", autoPlay:true, estimatedBytes:950000}); queue.append(sound); queue.load(); function completeHandler(event:LoaderEvent) { sound.addEventListener(MP3Loader.SOUND_PLAY, soundStart); sound.addEventListener(MP3Loader.SOUND_PAUSE, soundPause); } function soundStart(event:LoaderEvent) { trace("> Start"); } function soundPause(event:LoaderEvent) { trace("> Pause"); } function errorHandler(event:LoaderEvent):void { trace("error occured with " + event.target + ": " + event.text); }
-
Hi!
Is there a way to check if mc has already started tween or not?
import com.greensock.*; import com.greensock.easing.*; addEventListener(Event.ENTER_FRAME, updater); function updater(e:Event) { var collision:Boolean = CDetector.checkCollision(); if (collision) { TweenLite.to(mc, 2, {alpha:0}); } else { TweenLite.to(mc, 2, {alpha:1}); } }
Tween in enterFrame is not good for CPU I think
-
trace(event.target.content.parent);
Oh, yeah! Thanx!
-
for(var i:uint = 0; i < 10; i++){ var temp_item:ITEM = new ITEM(); addChild(temp_item); dQueue.append(new SWFLoader("test_clip" + i + ".swf", {name:"file_name" + i, estimatedBytes:30000, container:temp_item.container_mc, autoPlay:true})); }
Guys, how can I get movieclips on upper level of "container_mc" using onChildComplete event listener?
Load echo answer
in Loading (Flash)
Posted
Yep, works