actionscript

How to access dynamic text field on stage from within the document class

末鹿安然 提交于 2020-01-07 05:24:09
问题 I'm trying to access a text input that I've already placed on the stage (inside a movie clip) but with no luck. I've defined an instance name for this dynamic text field which is currentUserCount I've got something like this set up in the document class actionscript file: package { import flash.events.Event; import flash.net.URLLoader; import flash.net.URLRequest; import flash.display.Sprite; import flash.display.DisplayObject; import flash.display.MovieClip; import flash.display.Stage;

Updating an actionscript xml object directly in one line using e4x?

十年热恋 提交于 2020-01-07 04:57:13
问题 Given the following xml: <form> <personalDetails> <name>John</name> </personalDetails> <financeDetails> <income> <salary>1000000</salary> </income> </financeDetails> </form> I know that is it possible to create the above xml as follows (which is very cool): var xml:XML = <form />; xml.personalDetails.name = "John"; xml.financeDetails.income.salary = 1000000; However, what if we do not know the names of the nodes or how many levels exist? We can accomplish this using the method below but it

I need a flash effect like this http://www.contempo.org.mo/Online%20magazine/ISSUE21/index.htm

徘徊边缘 提交于 2020-01-07 04:47:13
问题 Please refer to http://www.contempo.org.mo/Online%20magazine/ISSUE21/index.htm Is there any open source or other tools can accomplish this ? If I need to develop it by our own, what technology can we use? please give me more details. 回答1: Here is an open source version: http://pageflip.hu/ Here are two more pay-for versions: http://page-flip.com/ http://www.flashpageflip.com/ The code behind the page-flipping technique is all very similar. You ca read about how it is accomplished in the book

Flash / Actionscript: How to insert images in dynamic text (In line image)?

余生长醉 提交于 2020-01-07 03:15:11
问题 I want to insert images in dynamic-text-box(s) which should be inline. Detail: I am preparing an application using flash CS4; The application is just like a chat room which will show conversation the only difference in this; it will show stored messages (stored in XML file). I want to insert smiling faces (emotions) in text body (using html tags) but the problem is that image is not inline (like in chat room [yahoo, hotmail, etc.]). I have no idea what to do...... 回答1: Please paste your code

Random Errors in ActionScript - Memory overflow?

戏子无情 提交于 2020-01-06 21:21:23
问题 We're developing an InDesign CS6 Extension with Adobe Flash Builder 4.6. I got strange errors in a JavaScript Injection, so I converted the JavaScript to Action Script and put it directly into my code. But the errors continue to appear. This is the code: var pageItem:PageItem = (component as BaseComponent).pageItem; var frame:Frame = new Frame(pageItem); var itemIsHidden:Boolean = !pageItem.visible; var tempFile:File; var container:Rectangle = InDesign.app.activeDocument.rectangles.add

Flex 4.5 How do you check for JSON child node key existence (using hasOwnProperty or other methods)

筅森魡賤 提交于 2020-01-06 19:50:28
问题 How do you check for JSON child node key existence using hasOwnProperty (or other methods) in Flex 4.5? The hasOwnProperty method can check for JSON key existence but this seems to only work with top level nodes in a JSON, and not the child nodes. For example, if you have JSON structure like this (in a readable form, sans the JSON syntax), you can check for the existence of callresponder.lastResponse.hasOwnKey("Location") , but there seems no way to check for Location.VenueName for example or

Mouse Over in whole Stage?

人盡茶涼 提交于 2020-01-06 17:14:22
问题 I want to run an Actionscript function when a user has his mouse in my flash stage. Not in a specific button/image on the stage but just in the stage. But when trying to use mouse over action on stage i get this message: "This action requires an object to be selected on stage." So, how can i use mouse over in the whole stage? 回答1: In AS3 there's an event for when mouse leaves the stage so you could do something like this to get if the users mouse is in the stage. var _mouseOnStage : Boolean =

ActionScript 3.0 - Dispatch event class to class

拥有回忆 提交于 2020-01-06 14:38:10
问题 I'm working in Action Script 3.0 and I have a question in DispatchEvent class. following code is standalone class. I want to dispatch event to 'main' class and 'sub' class when event occured. I'm stuck on this issue. please help me. package com { import flash.events.*; import flash.display.MovieClip; import com.sub; public class main extends MovieClip { public static const BTN_CLICKED:String = "btn_Clicked"; public function main():void { if (stage) init(); else addEventListener(Event.ADDED_TO

MOUSE_OUT events not firing on child when parent is mouseEnabled=false, mouseChildren=false

大兔子大兔子 提交于 2020-01-06 11:19:08
问题 I make a sprite, then add a child sprite. I add a listener to the child for MOUSE_OUT events. If my mouse is in the child sprite when I set the parent sprite mouseEnabled=false and mouseChildren=false, MOUSE_OUT is not fired on the child. But then, when I move the mouse, MOUSE_OUT is fired on the child. MOUSE_OUT is also fired if I click. MOUSE_OUT is not fired if I mousewheel. So, what's going on here? This is a related question. After studying back2dos' code, I discovered what I am doing

MOUSE_OUT events not firing on child when parent is mouseEnabled=false, mouseChildren=false

血红的双手。 提交于 2020-01-06 11:18:25
问题 I make a sprite, then add a child sprite. I add a listener to the child for MOUSE_OUT events. If my mouse is in the child sprite when I set the parent sprite mouseEnabled=false and mouseChildren=false, MOUSE_OUT is not fired on the child. But then, when I move the mouse, MOUSE_OUT is fired on the child. MOUSE_OUT is also fired if I click. MOUSE_OUT is not fired if I mousewheel. So, what's going on here? This is a related question. After studying back2dos' code, I discovered what I am doing