Search Results

Search found 2242 results on 90 pages for 'actionscript 3'.

Page 29/90 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • What does the JS function 'postMessage()' do when called on an html object tag?

    - by Stephano
    I was recently searching for a way to call the print function on a PDF I was displaying in adobe air. I solved this problem with a little help from this fellow, and by calling postMessage on my PDF like so: //this is the HTML I use to view my PDF <object id="PDFObj" data="test.pdf" type="application/pdf"/> ... //this actionscript lives in my air app var pdfObj:Object = htmlLoader.window.document.getElementById("PDFObj"); pdfObj.postMessage([message]); I've tried this in JavaScript as well, just to be sure it wasn't adobe sneaking in and helping me out... var obj = document.getElementById("PDFObj"); obj.postMessage([message]); Works well in JavaScript and in ActionScript. I looked up what the MDC had to say about postMessage, but all I found was window.postMessage. Now, the code works like a charm, and postMessage magically sends my message to my PDF's embedded JavaScript. However, I'm still not sure how I'm doing this. I found adobe talking about this method, but not really explaining it: HTML-PDF communication basics JavaScript in an HTML page can send a message to JavaScript in PDF content by calling the postMessage() method of the DOM object representing the PDF content. Any ideas how this is accomplished?

    Read the article

  • Controlling Movie Clips from the main time line instead of using their individual time lines?

    - by Jess
    I have a Flash website template (four pages) that I made using AS 3.0 and Flash CS4. It is for an assignment involving movie clips. Currently on the main time line there is only one frame, and three layers: actions/menu/content. The actionscript on the main time line is simply: content_mc.stop (); There is a movie clip on the stage called “Content” that contains the content for each of the pages. Inside of that there is a “Menu” movie clip that contains and controls all of the navigation buttons. The actionscript for the Menu movie clip is: function homeBtnPress (event:MouseEvent):void{ //comments here //comments here MovieClip(parent).content_mc.gotoAndStop("home"); } function aboutBtnPress (event:MouseEvent): void{ MovieClip(parent).content_mc.gotoAndStop ("about"); } function servicesBtnPress (event:MouseEvent): void{ MovieClip (parent).content_mc.gotoAndStop ("services"); } function contactBtnPress (event:MouseEvent): void{ MovieClip (parent).content_mc.gotoAndStop ("contact"); } function portfolioBtnPress (event:MouseEvent): void{ MovieClip (parent).content_mc.gotoAndStop ("portfolio"); } home.addEventListener(MouseEvent.CLICK, homeBtnPress); about.addEventListener(MouseEvent.CLICK, aboutBtnPress); services.addEventListener(MouseEvent.CLICK, servicesBtnPress); contact.addEventListener(MouseEvent.CLICK, contactBtnPress); portfolio.addEventListener(MouseEvent.CLICK, portfolioBtnPress); So everything works fine, but my instructor wants me to control the menu/content from the main time line by using the target path tool. What exactly would I target – just the “menu” and “content” movie clips, and what code would I use? Sorry if I'm not explaining very well, I'm pretty confused. Here is the feedback from my instructor: “While we learned how to control the main timeline and the timeline of another movie clip from within a movie clip, this is not the most intuitive way to script and makes for difficult debugging. So you will need to explore how to target your buttons inside of your menu movie clip and the frames within the content movie clip from the main timeline. “ Thanks so much in advance!

    Read the article

  • How do I produce a screenshot of a flash swf on the server?

    - by indignant
    I'm writing a flash app using the open source tools. I would like to load a data file in to the app and capture a screenshot of the stage on the server. The only part that seems mysterious is running the app on the server. In fact, I don't even care if it's the same app running on the server and in the browser--if I can use the flash stage and drawing routines to produce an image server-side, I'm happy. If I have to delve in to flex, fine. Right now I'm having problems finding any starting point at all. I gather Adobe has some commercial products that may fit the bill, but I'd like to stick with open source, apache, and linux. I know this is probably possible with haxe/neko, but I'd like to use more mainstream tools if possible. Am I asking too much? EDIT/CLARIFICATION: Many thanks for the responses so far, but I think I've been a bit muddy in my description. I've already written the actual stage-grabbing stuff using the same PNGEncoder class as was suggested. The problem is in actually running the swf on the server side. I don't want to let the client take the screen shot itself, because this opens up the possibility of the client maliciously submitting a screenshot which does not correspond to what is on the stage, that is, I don't want users uploading porn. If I could run the the actionscript code on the server, then I could generate the screenshot from my data files and be sure that the screenshot matches the data, but I have no idea how to run the actionscript or swf on the server.

    Read the article

  • Pixel bender shaders with multiple outputs in flash?

    - by sold
    According to the pixel bender specs a shader can have one or more outputs. The pixel bender toolkit, whose "export to flash" option tends to be preety strict about the flash specific do's and dont's, would even compile such a shader without complaints. However actionscript's shader related classes seem to be geared toward single output shaders. Is there any way to have multiple shader outputs in flash?

    Read the article

  • Breaking a concave polygon into convex ones.

    - by Bart van Heukelom
    I'm using a game physics library (Box2D) which only supports convex polygon shapes. However, I'd like the level builder to be able to just specify concave polygons without having to worry about that. So, how can I automatically break apart a concave polygon into convex ones (or even all triangles). Speed would be cool, but ease of implementation is more important. The breaking apart will only be done on game initialization. (My language is Flash/ActionScript 3, but that shouldn't matter)

    Read the article

  • Test existence of xml attribute in as3

    - by matb
    Hi, What is the best method to test the existence of an attribute on an XML object in ActionScript 3 ? http://martijnvanbeek.net/weblog/40/testing_the_existance_of_an_attribute_in_xml_with_as3.html is suggesting to test using if ( node.@test != node.@nonexistingattribute ) and I saw comments suggesting to use: if ( node.hasOwnProperty('@test')) { // attribute qtest exists } But in both case, tests are case sensitive. From the XML Specs : "XML processors should match character encoding names in a case-insensitive way" so I presume attribute name should also be match using a case-insensitive comparison. Thank you

    Read the article

  • Encrypt parameters passed to a swf

    - by 23tux
    Hi, does anyone know how to encrypt the parameters that are passed to a flash movie? The case is, that the user should not be able to read the parameters in the source code in plaintext. And of course, I have to able to decrypt the parameter in actionscript 3 ;-) thx, tux

    Read the article

  • added Effects and removed Effects start almost together.

    - by Ravz
    Hi, I have run into a problem where I am removing a component and adding another one. I have set addedEffect and removedEffect for corresponding component. But the addedEffect starts before the removedEffect completes. How can i make them in order ?? I am doing this in actionscript.So, in this case i'm not using state and transition. Any help would be really good. Thanks.

    Read the article

  • Testing for undefined and null child objects in ActionsScript/Flex

    - by dbasch
    Hi Everyone, I use this pattern to test for undefined and null values in ActionScript/Flex : if(obj) { execute() } Unfortunately, a ReferenceError is always thrown when I use the pattern to test for child objects : if(obj.child) { execute() } ReferenceError: Error #1069: Property child not found on obj and there is no default value. Why does testing for child objects with if statements throw a ReferenceError? Thanks!

    Read the article

  • Trouble cross-referencing two XML child nodes in AS3

    - by Dwayne
    I am building a mini language translator out of XML nodes and Actionscript 3. I have my XML ready. It contains a series of nodes with two children in them. Here is a sample: <translations> <entry> <english>man</english> <cockney>geeza</cockney> </entry> <entry> <english>woman</english> <cockney>lily</cockney> </entry> </translations> The AS3 part consist of one input box named "textfield_txt" where the English word will be typed in. An output text field for the translation called "cockney_txt". Finally, one button to execute the translation called "generate_mc". The idea is to have actionscript look through the XML for key English words after the user types it in the "textfield", cross-freferences the children then returns the Cockney translation as a value. The trouble is, when I test it I get no response or error messages- it's completely silent. I'm not sure what I'm doing wrong. At present, I have setup a conditional statement to tell me whether the function works or not. The result is, no it's not! Here's the code below. I hope someone can help. Cheers! generate_mc.buttonMode=true; var English:String; var myXML:XML; var myLoader:URLLoader = new URLLoader(); myLoader.load(new URLRequest("Language.xml")); myLoader.addEventListener(Event.COMPLETE, processXML); function processXML(e:Event):void { myXML = new XML(e.target.data); } generate_mc.addEventListener(MouseEvent.CLICK, onClick); function onClick(event:MouseEvent) { English = textfield.text; cockney_txt.text = myXML.translations.entry.cockney; if(textfield.text.toLowerCase() == myXML.translations.entry.english.toLowerCase){ //return myXML.translations.entry.cockney; trace("success"); }else{ trace("try again!"); // ***I get this as a result } }

    Read the article

  • Extracting thumbnail from .flv

    - by mana
    Hi, i was wondering, how can i extract thumbnail from a flash-video file, then display it in a listbox. the listbox is suppose to have many videos which i need to extract thumbnails from programatically with actionscript. the flash-player is going to be on the web, and the extraction must happen when the swf file is loading, therefore, the method must not be too time-taking. how do i go on about doing so? is this even possible? tnx in advance

    Read the article

  • SWF only working in debug folder.

    - by Fahim Akhter
    If I copy all the files from the debug folder and paste it somewhere it stops working gives me a sandbox error. ( I am not using any absolute paths) and everything seems to be fine in debug folder. Any Ideas? It's a actionscript project in flex builder.

    Read the article

  • Multilingual Flash

    - by Will
    How do you make a Flash movie (using Haxe, or Actionscript code rather than the IDE) that supports multiple languages? Can you detect the browser's language? Are there utility classes for managing the strings and selecting the appropriate one based on language?

    Read the article

  • Simple Hexadecimal color question

    - by M28
    I have a number between 0.0 and 1.0, I would like to convert it to a grayscale color. White = 0 Black = 1 You can show me how in any understandable language (I prefer actionscript 3) Please, don't just give a name of a function that a language have to do this, I want to know how it does.

    Read the article

  • Package SWF into an EXE or APP

    - by Jeremy White
    I am trying to adjust my Flash development workflow so that I am using Flash Builder for all of my coding and multiple FLA files for the user interfaces. I will be creating an ActionScript project in Flash Builder and then having each FLA export a SWC into a resources folder. It is important that I retain the ability to export PC and Mac -- EXE and app, respectively -- projector files. Is there a way of doing this with the Flash compiler or any 3rd party tools?

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >