ActionScript 3.0 :: Access Native Code From It?
Jan 21, 2009Is there a mechanism by which native code can be called from within ActionScript?
View 4 RepliesIs there a mechanism by which native code can be called from within ActionScript?
View 4 RepliesI would like to tak emy existing AS3 or Flex project and compile it to run on native C++ code. Is there a way to do this? What sort of solutions exist? I do not want to change my AS3 code.
View 3 RepliesAs stupid as my question might sound, i have spent the last 2 weeks reading oop books; but could use some guidance. I have a flash project that is basically a supped up slide show. On the stage i have the following: main_mc (instance name = images_mc) = movieclip which holds "pictures" ui1 (instance name = ui1_mc) = user interface that allows user to draw on picture (when drawing is enabled) ui2 (instance name = ui2_mc) = activates invisible hit areas (buttons) on select pics, when hit area is clicked, we jump to another pic in the main_mc.
I accomplished all of this on the timeline, but am updating the code to OOP. I am having A HELL OF A TIME trying to figure out how to store references to the instances (images_mc etc..), so i can control them from varying class files. I have found it is easy to control the instances from the documentclass, but not from unrelated class files. Example: images_mc.stop(); works in document class; but ovieclip(Parent).images_mc.stop() doesn't seem to work from any class file.(ui2 class file for example);
[Code]...
I need to know how I can access the images in this XML code (per image):
Code:
<?xml version='1.0' encoding='UTF-8'?>
<component name='XMLSlideShowV3'>[code].....
I just don't know how to access this type of xml code.And I can't change it to something else because I have a component that reads only this type of code.
Can anyone explain me how you access a component code in flash CS3?
View 1 RepliesI already made some buttons that I was planning on using as a menu for difficulty, easy,medium, hard. The buttons are already made with all the states and graphics, so I wanted to add an event listener so that when you click a button for example easy, if the medium button was at its hit state I would revert it back to up, eg:easyButton.addEventListenere(MouseEvent.CLICK, function(e:event) { mediumButton.gotoAndStop("up") or mediumButton.up
but then I realized there is no propertie or function in the simpleButton class to change the state of the button, I know I can make a movieclip, and do gotoAndStop at the up frame, but is there a way to make it work as a button???
I want to access a clip that I dragged onto the stage , claed it mcBlocker and I am trying to access it from another clip thats in another layer but same frame and the code is inside that second clip: this is the code:
Code:
trace("::"+(this.parent as MovieClip).mcBlocker);
for(var i:int=0;i<this.stage.numChildren;i++){
[code].....
Hi, is there anyway to access the 3d centerpoint property by code? I´m rotating some movieclips with the rotationY property but they always rotate around their center point... i wanted them to rotate around the edge to create a page-flip effect... but i cannot find the 3dcenterpoint property that it´s on the flash transform menu...
View 1 RepliesonClipEvent(load){this._alpha = 0;}A lot.And I always find myself writing it out...and it's a pain in the ***. I wish there was a way you could save commonly used snippets of code and just easily access them whenever.
View 2 RepliesI can't seem to access the sound duration value in my code, I am not sure what I am doing wrong.
Code:
var directory:String = "Voices/";
var noOfSongs:Number = 100;
var aSongs:Array = [];
var currIndex:Number = 0;
[code]....
I always find myself writing it out...and it's a pain in the ***. I wish there was a way you could save commonly used snippets of code and just easily access them whenever.
View 3 RepliesI know in AS2 I could do this pretty easily .. But am unsure of the syntax approach of AS3.
I want to have a main movie which will load in an external swf, which has AS code in its timeline. Then I wish to access the functions inside this external swf and control them from the 'controller' swf (the main movie).[code]...
I have figured out how to add tabs to text by makinginvisible buttons and using the accessibility panel, but haven'tbeen able to get access keys to work (there is a place to add theshortcut on this panel). I have read that I need to enter somethinglike "Control+I" in the field for shortcut, but I don't know whatcode to add to the frame to get it to work.
View 1 RepliesI am trying to build a click through gallery with small buttons that you click on and it switches the larger image out as you click through. I copied over a gallery I had successfully built with 10 images. The new gallery has 20 images. Basically the movie just runs continuously without being able to click on the thumbnails.
I am getting the following compiler errors Scene1 Layer 'actions', Frame 1, Line 42 1120:Access of undefined property btn11_btn Source - btn11_btn.addEventListener(MouseEvent.CLICK, showimage11); I get this for image 11 through 20
[Code]....
I can see that when I set htmlText in a textarea control, the text property contains the html free version of the text. So there is a parser somewhere that is ripping of html from the content, which would be very usefull for my purposes.
However, based on the flex source code, the setting of html is done in UITextField.as, which is the type of the textfield member of TextArea. The line that does the work is:
super.htmlText = value;
in function override public function set htmlText(value:String):void Trying to follow the class hieararchy, I end up in FlexTextField class, which extends flash player's textfield class. It appears the functionality I am after is in flash player. So is there any way of accessing this html cleaning function?
The following class works fine when calling it through document properties panel.
How can I access the same by writing code (to call the class) in first frame of my project?
The following is the Class (Code):
[Code]...
1061: Call to a possibly undefined method init through a reference with static type Snow.
is there any way, to hide the source of a flash in the sourcecode, so that the movie itsself is not downloadable, or better not to copy?
View 1 Replieshow to access the stage from within component code. (I am very new to ActionScript)
Here is the cut down code of the main application entry point:
Code:
package {
import flash.display.Sprite;
public class Main extends Sprite {
[Code]...
I need to access the main stage to add a mouse up event listener.
i finished air application and it is need a local permission for the installed folder ( C:Program FilesAppName ) as i am generate xml ( desktopFileStream.writeUTFBytes(newXMLStr); ) from the application and its need local permission.first time i run the application i got ( error 3001 indicates a file or directory permissions issue ); when adjusted the permission for the current user ( manually ) to fullcontrol, its work great and perfect. how to give my application folder FullControl access by code ( AS3Flash )? as i can't ask each user to give my app folder manual permission.
View 5 Replieswith this code I get the following errors:
"Access of undefined property stage.
Access of undefined property pressHandler
Access of undefined property myTimer
Access of undefined property timerHandler"
I didn't get these errors when I had the code in an actions frame.Just now that I have them in a seperate document class they come up.
I've been trying for hours to make sense of this problem. When I run my code through the Flash IDE, everthing is fine. However, when I run it through the command line compiler or Flex itself t doesn't work. This is after setting up all the required Flex bits to create a Flash stage and display content. it keeps giving me an "Access of undefined property" error though I've clearly defined those properties in question a line or two before.
[Code]...
What the heck is going on?? I'm stumped. Embed seems to work fine, but I'd prefer to change it this way. I think there's something about XML dynamism if you use embed instead.
I have two MC's on stage,
MCmenu is a button array,
MCtext is a collection of text with frame labels. It's labeled as MCtext
The menu buttons tell MCtext to play the frame label as the button clicked. This *used to work*, but Flash was laggy as hell so I updated it. Now the same code returns #1009: Cannot access a property or method of a null object reference. at MCmenu/itemClicked()
Code:
function itemClicked(butn:Event):void {
parent.MCtext.gotoAndPlay(SomeArray[butn.currentTarget.label);
}
I've tried just using a frame number, but still the same #1009
I've tried the Script Assist to target the MC on the stage:
using root.MCtext... still the same #1009
using this.MCtext... returns a #1010
post the code for a working cross-domain securityfile that allows access only from the same domain as all the flashfiles and xml files are in?used to be easy in as2 but i think i dont know what i need to know about it in as3..
View 3 Replieshow I access variables in a frame on the stage with code from a frame within a movieclip?(basically passing variables from a stage frame to a movieclip frame)
View 4 RepliesI've seen some discussion on how to load a child swf using swfLoader and accessing it's variables but I am wondering if it is possible to do this without adding any code to the child swf.Either accessing public vars or listening for funciton calls would work fine
View 2 Repliesthis will be the preloader code what i put initial frame of my flash file.
[Code]...
Say you were importing flash.events.KeyboardEvent and you wanted it to extend the MovieClip class, is this possible? Where you dont have access to the class to just type "extends XXX"
View 14 RepliesI'm developing a multi monitor fullscreen application with Adobe Air 2.6. I can create a window for every monitor, and put those windows to fullscreen.
theWindow.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
The problem comes when interacting with those windows. If I click the window on the main monitor (the one with the dock and menu bar) no problem, but when I click any other window the system menu bar becomes visible. I've tried resizing the main window to match the monitor size and moving it to a negative coordinate but it always stays behind the bar. Is it possible to do this in Air?
I'm working on a native Objective-C iOS app and I'm wondering if it is possible to embed an animation created in Flash into my app. The animation doesn't have to be interactive, all I need is a couple of animated screens (intro screen, loading screen). Is this posible?
View 2 RepliesI'm trying to add an event listener to a window that pops up (to the whole window) that will close that window when clicked on. Basically it's your typical about window that would be found in any program by hitting help, then about this program. I am using no chrome on it so I'd like to just be able to click it and have it close.
On a less important note I'd like to center the window on the stage when it pops up. Right now I'm just using the x and w properties to get it close to center on my monitor but obviously that won't work for everyone. Below is the code I've tried. No luck whatsoever. Window pops up but stays up if I click it. Any help as always would be AMAZING!
[Code]...