JSFL - Detecting When Element Has Been Flipped

Oct 3, 2011

I'm writing an exporter in JSFL, to export Flash animations into a format that can be replayed in a custom player. The exporter basically iterates through the timeline and through all the elements at each keyframe, and writes out the element's name, position, rotation, scale and a local offset. These are read into the custom player which feeds the data to a sprite engine to recreate each frame of the animation. What I want to be able to do is detect whether a given Element has been flipped (i.e. in Flash you Select the element (a symbol), then Modify->Transform->Flip Horizontal) so that the exporter can include that information too, allowing the sprite engine in the player to flip the UVs of the texture to replicate what's happening in Flash.

This would be useful for (say) using one symbol for a character's right hand, and just flipping it to be their left hand, rather than having to create a whole new symbol. Unfortunately I can't see any way of finding this information out. None of the information I have available for the Elements seems to imply that any kind of flipping has occurred. How can I detect flipping? If it can't be done algorithmically, I'd settle for the animator having to manually indicate that a symbol had been flipped (by creating some kind of plugin that gives them a tick-box which writes a value into the Element with setPersistentData(), for example), but I don't know how to make that sort of plugin either.

View 2 Replies


Similar Posts:


Flash :: Detecting A Movieclip Has Been Flipped Horizontally On Stage

Sep 28, 2011

If two movie clips instances of the same movieclip are placed on the stage and one is flipped horizontally in Flash.. Is there a way I can detect which one has been flipped horizontally in code? ScaleX seems to remain unchanged.The MovieClip has been flipped horizontally using the Flash UI (Edit->Flip Horizontal), not via code.

View 2 Replies

IDE :: Execute A Jsfl Function From A Jsfl File Instead Of A Full String With MMExecute?

May 25, 2009

Is it possible to execute a jsfl function from a jsfl file instead of a full string with MMExecute? And above of that how can i change the base class with jsfl? i created a panel to create certain displayobjects but i really need to change the base class instead of the normal class name.

View 1 Replies

IDE :: Keep Sprite Flipped / Stopped Frame When No Key Is Down

Aug 7, 2009

if i press right/left, he goes to the movement frame. i want him to go to the stopped frame when no key is down, but the frame shows him facing right.how can i make it 'remember' his direction?

View 1 Replies

Flex :: Adobe AIR: Controls Flipped (mirrored) In Certain Build Environments

Aug 18, 2010

I'm having an issue where certain controls are flipped, depending on the machine that I'm building my project on. On my development machine, when I build it, everything is okay. However, when I build it on our build server, some things are flipped. It seems to be things that are on a higher layer - for instance, options in the select control (see first image below), alerts/overlays (see second image below), etc. It's not just the text, either - the entire content is flipped, images and all.

I have verified that the code is exactly the same in both instances, so it must have something to do with settings or the flex SDK version. On my development machine, the Flex SDK version is 4.0.0.14159, and on the build server, the Flex SDK version is 4.1.0.16076. I can downgrade the SDK on the build server if needed - but could it really be an issue with the SDK?

View 3 Replies

Actionscript 3 :: Get Element Inside Another Element Just Having It's Id In Dynamically Created String Form?

Mar 18, 2012

I know that there is no such function as getElementByName in Flex but I also now that you can do this["object_id"] to get the element of the application u're in.What about getting an element inside another element?I've tried making element["id"] ? But in my try-catch it always runs the "catch" part..how do I get an element inside another element just having it's id in dynamically created string form?

View 2 Replies

ActionScript 3.0 :: Render Value To One Element Of Flash On Basis Of Other Element?

May 10, 2010

I have flash where there is a link for song download. And, at the bottom of the flash I've a count, loaded thorugh flash vars which should increment everytime donload button is hit. Please let me know what approach should i take to do that. can i call a Java method on donload button which will insert a row in the table and and then get the count and render it to the count variable in my flash?

May be this extremely confusing. Here is a very similar example on how it is done. This is actually very similar to what i want to do. [URL] on this link there is count below which increments you hit the download button.

View 1 Replies

ActionScript 3.0 :: Element Is ITooltippable Vs Element['tooltip']

Oct 25, 2010

I've built a rather robust tooltip class recently that attaches and draws a single tooltip sprite to the root, then uses MOUSE_OVER to detect when it is over a tooltippable object, and shows the appropriate tooltip text. At the moment, I'm ensuring that any elements in my application which wants to take advantage of showing tooltips implement the ITooltippable interface, and expose a public getter, get tooltip().

[Code]...

View 0 Replies

ActionScript 2.0 :: Hiding An Element If Another Element Is Undefined

Apr 13, 2006

Basically I have 14 text boxes, each box draws its content from an external txt file. Next to each text box is a button. I want the button to be either visible=true or visible=false depending on weather or not the text box has content or is "undefined" Here is what I have so far, and it's not working:[code] I would like a FOR loop to just run through the variables and check to see if any of them are undefined. if it is, then make the correct send button invisible.

View 8 Replies

Xml :: Select Element Containing Other Element With Attribute Value In E4X?

May 23, 2011

<root>
<function name="lala">
<metadata name="foo" />

[code].....

View 1 Replies

IDE :: Unable To Access 2nd Element And 3rd Element

Feb 23, 2010

I am unable to access 2nd element and 3rd element (I can acces 1st element.[code]

View 1 Replies

ActionScript 3.0 :: Create An Element - Get "nodeValue"+i From My Element And Change That?

Dec 3, 2010

when I create an element  with this method :
 
this["nodeValue"+i] = new TextField();
(surely in dynamic class )
 
then I want to change instance name of that element.when I trace this["nodeValue"+i].name.I got a different name for that element !  f ex : instance8 .how can I get "nodeValue"+i from my element and change that .is it read only ? I want to swap tow element's instance name !
 
for example :
this["nodeValue"+i]  to this["nodeValue"+i+1]

View 4 Replies

IDE :: Getting The _root Via JSFL?

Mar 2, 2009

I an trying to get the _root node of an FLA via JSFL. A co-worker wrote a script that uses _root via actionscript. I was trying to wrap that code into a panel. I have all the trace functionality running and everything running accept I can't seem to access the "_root". I have tried _level0, and almost everything I can think of... I am looking to have JSFL return the _root object from the current file the same way can can hand "_root" to a function. (IE: myfunction( _root ); ) here is my current attempt:

Code:
var doc = MMExecute( "fl.getDocumentDOM()._root;" );

View 1 Replies

CS5 :: JSFL Commands Slow In It

Jun 13, 2010

The execution of JSFL files seems to have slowed down in Flash CS5. Or, at least, the updating of the display has been severely slowed down.  I have a command I use all the time -- so much that I don't even think about it -- that worked fine in CS4 and earlier, but in CS5 it seems to execute too slowly. My command is a replacement for the "Step Forward One Frame" and "Step Backward One Frame" commands in the control menu (the "<" and ">" keys). I wrote them so that the selected symbols remain selected when going to a new keyframe.  Of course, I use this all the time just like I did with the original "<" and ">" keys, and they need to run fast enough that I don't notice their execution time. They don't do that much processing at all, so it really shouldn't be a problem.

I also wrote some functions for profiling, and they indicate that the command is actually running in a reasonable amount of time (around 50ms). When I run it again immediately, though, the execution time balloons to about 300ms. Not only that, but in both cases the display takes its sweet time updating itself.  It seems to wait until all activity is finished, and then updates. This means that when I execute the command repeatedly (keyboard-scrubbing the timeline) I don't get to see the current state of the stage until I stop completely and wait for it to update.

As I said before, I never had trouble with this in CS4 and earlier. So my question is: is there any way to tell Flash to update its display in a command, so that I don't have to wait for Flash to get around to it? Relatedly, is there any way to give the javascript interface a higher priority so it'll execute commands faster? keys). I wrote them so that the selected symbols remain selected when going to a new keyframe. Of course, I use this all the time just like I did with the original

View 6 Replies

AS 3.0 :: AddChild Functionality In JSFL?

Apr 8, 2011

Is there a way besides pasting frames inside a layer to add an element into a timeline? I'd like to replicate the addChild functionality from actionScript into JSFL. So basically, I'd like to add a bunch of movieClips instances into another movie clip, does anyone know how to do this in JSFL?

View 1 Replies

ActionScript 2.0 :: Run JSFL Command Through It?

Jan 13, 2008

To issue a command from an ActionScript script:

Use the following syntax (you can concatenate several commands into one string): MMExecute(Javascript command string);

I wanted to know if this opends the possibility of having a swf file, that when run, can execute jsfl script that will create a folder on the user's computer?

View 4 Replies

IDE :: Jsfl - Save The File As CS3?

Jun 8, 2009

So a major problem I have been having is that I run CS4 on my laptop, but the people i work with run CS3 and its quite a nuisance to have to constantly remember to save the file as CS3 every time i want to save. Does anyone have any quick-fix ideas that don't involve forcing my coworkers to buy CS4 or me downgrading?

View 5 Replies

Add Ruler Guides To Stage With JSFL?

May 21, 2009

Since Flash doesn't allow you to specify exact coordinates to place guides, I wanted to create a command to "fit guides to stage". When manually dragging and watching the "Info" panel, you always end up skipping pixels, causing you to zoom way in for precise coordinates.
 
I can't seem to find (and it's possible it doesn't exist) a way to place guides on the stage using JSFL.

View 1 Replies

Delete A Shape For Real In JSFL?

Sep 24, 2009

I have this big JSFL project I'm working on that involves deleting a raw shape (ungrouped) and then replacing it with another one. The problem is that the original shape doesn't always actually get erased (I haven't figured out the precise circumstances where this happens yet though).  Even if it does get deleted, though, when I draw the new shape on the stage (using Path.makeShape), the new shape has extra vertices where its edges cross those of the original shape. So even if I end up with the correct-looking shape on the stage without the one that was there before, my shape I just created is likely to have extraneous vertices (and I need the vertices to be unchanged).

View 2 Replies

Professional :: Adding Frames With JSFL?

Mar 29, 2010

I have a bunch of fla files with a sequence of frames that need to be readjusted due to a change in frame rate requirements. How can i add frames to specific frame numbers using JSFL script? Or at least what API can i use? Is there one in one of the properties and methods of the DOM object from fl.getDocumentDOM?

View 2 Replies

Ant - JSFL Delete Flash Aso Files?

Nov 25, 2009

I'm using FDT 3 and Ant to make a jsfl file that is then executed to compile fla's and I'm trying to figure out how to get the jsfl to remove the aso files. I've tried storing the path to the aso files in a property in Ant the is then added to the jsfl when its created and it works to remove the aso file but it means that everyone must edit that property to fit their machine, we are using Macs and Windows.

My question is, is there a way to have jsfl find and delete the aso files?

View 2 Replies

Flash :: Fill Figure With JSFL?

Feb 14, 2010

I draw figure in Flsh ID with JSFL methods, for example

// draw rectangle
doc.addNewLine({x:0, y:0}, {x:2000, y:0});
doc.addNewLine({x:2000, y:0}, {x:2000, y:500});[code]....

how can I fill it, because this way doesn't work doc.setFillColor('#0000ff');

View 1 Replies

Create And Save .as File Using JSFL?

Mar 14, 2012

Is there a way to create and save .as file using JSFL?I know that you can save and rename Fla documents, but what about .as classes?

View 1 Replies

IDE :: Repositioning Everything On The Stage (across All Frames) With JSFL?

Dec 16, 2011

I have a bunch of old FLAs with one set of dimensions, including a 60 pixel offset along the y axis. I'm writing a jsfl script to resize the stage (works), delete some unneeded layers (works), and reposition everything (doesn't work) What I'm using is:

fl.getDocumentDOM().selectAll();
fl.getDocumentDOM().moveSelectionBy({x:46, y:-60});

When I run my script, the items do in fact get moved, but on tweened clips, they get "doubled dipped," it seems: if I compare the new x and y values of, say, the end keyframe of a clip (only tweened for alpha, for example) is exactly 46 pixels farther right and 60 pixels higher up than it should be.Is there a better way to reposition everything that avoids this "double dipping" among tweens? I'd love to know! There's got to be a way, and I feel like I'm so close, but not quite there. (Of course, I'm probably way offEdit: I've performed the steps manually by turning onionskinning on for multiple frames, selecting all frames, then dragging a selection rectangle across everything on the stage, then moving everything by the desired amount, which works: when I look at the history and view the js for those steps, they look exactly like what I've typed into my script.

View 1 Replies

JSFL For Automatically Import Ai File To Flash?

Nov 18, 2009

Is there a way to use JSFL to import ai file to flash and automatically create all shapes from illustrator as MovieClip? I want all of them to be in movieclip but amount of illustrator layers are too much to handle with manual hand-tick. Is there anyway to do this?

View 5 Replies

Professional :: [JSFL (fl Cs5)] Fl.selectElement Is Not A Function. Same With FindObjectInDocByName?

Jan 6, 2011

What am I missing ?

// adobe's exemple
var nameToSearchFor = "test";[code]........

View 25 Replies

Professional :: JSFL Parser Converting To Bitmaps

Sep 19, 2011

I am evaluating the possibility of developing a JSFL script to parse a FLA and need to know first if it would be able to do what i want to do. I need the script to parse through all the library's linked assets, recursively go through their children, replace all the children of type "Group" with a bitmap and then save that FLA as a new file. I haven't received an ok to develop this yet at work, but i'm trying to evaluate the possibility for a proposal.

View 1 Replies

Flash :: JSFL - Reading Metadata OnDocumentChanged?

Mar 24, 2011

I am building a flash panel that reads metadata from a .fla when it is active in the Flash IDE. This panel is also storing metadata in the .fla and that is no problem. What is problematic is that I do not know how to stop the event listener from listening for onDocumentChange.

I want it to listen for it as long as it is open, but when it's closed it should clean up after itself because trying to read metadata every time a new document is selected is not a very nice thing to do.

I have tried to listen for all kind of events in the panel to detect when the user closes it, but with no success.

View 2 Replies

C# :: Stalling Program Until JSFL File Finishes

Sep 6, 2011

I am trying to run a JSFL script from within a C# project, where the JSFL script opens up a .fla file, modifies it n times, and exports n .swf files before closing. From the C# project, I am starting up the JSFL script through the Process class. I try to wait for the JSFL process to finish through the myProcess.WaitForExit() command, but it doesn't work. The remainder of my code C# executes before the JSFL process finishes exporting its .swf files. Is there any way I can throw something that the C# project can catch from the JSFL file or some other solution?

View 2 Replies

Flash - Import Video Through JSFL Without Wizard

Sep 16, 2011

I'm trying to have a jsfl script import a video into my .fla project and export the entire thing as a .swf automatically Is it possible to disable the video wizard when importing videos? I'd hate to have to manually confirm all the options every single time. The video is in .flv format if that makes any difference

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved