ActionScript 3.0 :: Importing One Swf Into Another And Then Scanning The Children Types In The Imported SWF?
Sep 28, 2009
I'm importing one swf into another and then scanning the children types in the imported SWF. When I do the following, the bitmaps return as Shapes.
Code:
for(var i:Number = 0; i<importedSwf.numChildren; i++) {
trace(importedSwf.getChildAt(i));
}
What I need to do is evaluate the bitmaps in the imported SWF file and see if they have their smoothing property on or not.
View 3 Replies
Similar Posts:
Jul 22, 2010
Im trying to wrap my head around data types and phrasing them from xml. From what I gather variables that come in from XML are always treated as a string - even if you declare them as something else before hand? Im not seeing that myself as everything else other then the Boolean is behaving as expected. For example in the code below, if I declare FGFILLCOLOR as anything other then an int, or Number, I get an unrelated type error. So why just Boolean and how can I convert them so they behave properly without declaring all of them as a String? Though I've seen a few related solutions posted around but I wan't able to sort them out.
[Code]....
View 9 Replies
Jul 22, 2010
Im trying to wrap my head around data types and phrasing them from xml. From what I gather variables that come in from XML are always treated as a string - even if you declare them as something else before hand?Im not seeing that myself as everything else other then the Boolean is behaving as expected. For example in the code below, if I declare FGFILLCOLOR as anything other then an int, or Number, I get an unrelated type error. So why just Boolean and how can I convert them so they behave properly without declaring all of them as a String? Here is what I've got:
the xml
Code:
<VARIABLES>
[code].....
View 6 Replies
Jan 23, 2011
There is a Shell and a Module. The Shell loads the Module. Module is never run without the Shell. Because there will be more modules, I decided to put common classes to Shell.
1. Compiled Shell with -link-report objShell_Extern.xml
2. Compiled Module with -load-externs obj<ShellProject>_Extern.xml Module size shrank from 90 KB to 2,05 KB.
3. Added 5 filters to Module:
import flash.filters.*;
tf.filters = [new GlowFilter(), new GradientGlowFilter(), new DropShadowFilter(), new BevelFilter(), new BlurFilter() ];
Module size grew to 2,15 KB.
4. Added 5 filters to Shell (same code as above), recompiled it, then recompiled Module.Module size still at 2,15 KB.
5. Tried getDefinitionByName
//import flash.filters.*; commented out
var GlowFilter:Class = Class(getDefinitionByName("GlowFilter"));
var GradientGlowFilter:Class = Class(getDefinitionByName("GradientGlowFilter"));
[code]....
Error #1065 GlowFilter not initialized, Module size grew to 2,19 KB. Deleting some, but not all filters is decreasing size, so it's not the getDefinitonByName that takes 0,14 KB (2,19 - 2,05 without filters).
1. Do I understand the idea of load externs, or does it work only with specific classes? Why it doesn't work with filters?
2. What did I screw up with getDefinitionByName and is it a new feature because of it's use like in link below?
View 1 Replies
May 15, 2011
I have a swf named garage. When you click the garage door it opens and a tool chest emerges. You can either click on the gargage door again to close it or click on the top of the tool chest to close it. The drawers on the tool chest represent buttons that will bring up a contact form to be sent to the perspective person. These buttons are a secondary navigation. The main movie that is importing garage.swf has navigation for the contact forms. I need to code the buttons on the tool chest to match the code on the main movie so if you click the buttons on the tool chest they will respond as if they were the buttons in the main movie that it has been imported by.
[Code]....
View 1 Replies
Jan 24, 2012
Consider the following function:
Code:
public function foo(bar1:int, bar2:uint, bar3:String, bar4:Boolean):void{}
What I want is to have the different types of data represented by custom named types which are essentially representing the original data types. I other word, I would like to proxy the data types and have a valid function as following:
Code:
public function foo(bar1:PAR_Bar1, bar2:PAR_Bar2, bar3:PAR_Bar3, bar4:PAR_Bar4):void{}
so PAR_Bar1 would proxy the `int` data type, PAR_Bar2 would proxy the `uint` data type, so on and so forth.
The reason I need this is because I'm using a debugger with a GUI that can run methods and allows changing function parameter values in real-time, the issue is that the debugger can't tell me what parameter I'm changing, it only displays the data type of a parameter. So if I need to change 10 different parameters all of type int, the debuggers display all of them as int and not by their names.
I think that if I use proxy types I can easily differentiate between parameters.
So, my question: Is it possible to proxy data types? I mean map specific data types to custom data types that would represent the base data types?
View 2 Replies
Nov 11, 2009
I have an swf file, MyRoundButtons, which is a set of radio buttons I built (not components). It works fine, but if I import it into a parent it won't work anymore. I have to write a script to load it into a movieclip, (which I hate, because I'll have a several different swfs to assemble on my final stage. I really want to see them all on the stage together, not just at runtime.)Even when I load it into a clip and the buttons work, however, it doesn't seem to have a separate timeline when double-clicked ,and: I can't make the imported buttons control the timeline of the parent. I defined a test function:
Code: Select allfunction goToNirvana() {gotoAndPlay("nirvana")};
Frame "nirvana," in th parent, has a Trace instruction in it.goToNirvana works on its own in the parent. Now to call the function from within the child:
Code: Select alltv_btn.onPress = function(){
gotoAndPlay("TV");
// That last part triggers the button's down state and sound in the child timeline, in frame "TV."
[code]....
Whether I define that function in the child, the parent, or both, the instruction won't work. Now, I'd prefer not to do the loadMovie thing at all if I can avoid it, I'd rather have fully rendered button clips onstage at authoring for me to arrange and move about, with fully independent timelines right there. But you see what I'm trying to do. I just can't get it done.
View 2 Replies
Nov 18, 2009
I'm making a OSX-finder-type file browser in CS4.The Structure for the folder and files is being generated by a PHP in a XML, heres an example:(sorry the xml is not sorted, but the command i'm using in php doesn't sort it)
Code:
<root>
<dir name="images">
[code]....
View 2 Replies
Jun 23, 2011
Can I really do that with the phone? Perhaps I would have to call any of the native API's, but I am not really sure whether and what is possible. I am pretty sure that the camera is accessible, so at the worst case I could send the picture to the server, decode the QR code on the server, and get the results on the phone, right ?
View 1 Replies
Oct 15, 2009
I was wondering if there's any way to scan a document from a scanner using flash.
View 5 Replies
Aug 16, 2010
Does anyone know if it is possible to scan a document directly into flash using Actionscript 3?This would be a bubble sheet like a test sheet with multiple answers and such. Would it also be able to detect positions of the marked bubble to dynamically create the data in flash? I have some far fetched ideas and sometimes they are just not possible with the tools I would like to use.
View 1 Replies
Feb 13, 2010
I am developing an application in flex 3 using action script 3........I have some range of ip address in LAN(wired or wireless both).....i want to check which all the systems available...and also want to see their shared folders..
View 2 Replies
Mar 14, 2012
I have a USB barcode reader attached to my tablet (running Android 2.2), it seems to work, but how to read the date from it? And which event is triggered when it is scanning?
View 1 Replies
May 12, 2004
I have a box similar to a credit card scanning box. to enter the site, it requires the user to enter "566404663" (that is "long_gone" on the numerical/alphabetical keypad) then click the enter key. when the user clicks on the enter key, it takes him to the site. When the user clicks enter, regardless of what the user entered, it takes him to the site. I want it to only go to the site if the user enters "566404663" and clicks enter.
This is my actionscript for the button:
on (release) {
if (display = "566404663") {
getURL("[URL]", "_blank");
} else {
displayStatus ="0";
}}
What I want that when the user clicks "566404663" and clicks on enter that it takes the user to the site and if the user enters anything other than "566404663" and clicks on enter that it would reset the display to 0? Check out the link to see the credit card scanning box: [URL].
View 5 Replies
Mar 24, 2010
I am importing a picture in flash and i found out that there is a difference between importing to the stage, and importing to the library... [URL] I've placed both picture close of each other and if you look closely, you'll notice that one of them is losing some resolution. Both picture come from the same file, a png. The picture imported to the stage is sharper than the one imported to the library. is there a way to import that picture to the library without losing any resolution?
View 5 Replies
Mar 24, 2009
In this game attached I need the old Children (rats) to hurt the character when he walks into them, however only the most recently added Child is active in that way... also the rats seem to appear above the character instead of below, is there any way to resolve these issues??
View 4 Replies
Jan 12, 2011
I have a Sprite called pageContent. Inside pageContent are 12 more Sprites with unique names, a couple of Buttons, and some TextFields. Inside each of the 12 Sprites I have either one or two TextFields and one TextInput. My question is, since they are children inside a child of pageContent, how can I access them? Here is how I am trying to do it:
[Code]...
In my mind, this should totally work. But surprise, surprise, it doesn't. I have debugged it and it works fine for the first two lines, but when it tries to get numChildren of a Child of pageContent (line 3), I get this error: PHP Code: 1119: Access of possibly undefined property numChildren through a reference with static type flash.display:DisplayObject.
View 4 Replies
Jan 11, 2010
I want to have a rollover effect of a movieclip (mo1) inside a movieclip (mo) of another movieclip (popup1).Is it possible to do that? I try calling it using this code in the frame 1 of my flash, am i doing wrongly?
Code:
popup1.mo.mo1.onRollOver = function() {
popup1.mo.mo1.gotoAndStop(2);
[code]......
View 9 Replies
Sep 23, 2006
Newbie to XML here and I have what I *hope* is an easy problem, but I just don't know the answer. And as I have to try and show this by Monday, I'm sort of stuck. I am trying to pull in information about houses via an xml file. Each house has 1 address, 1 owner, 1 description, and about 6 photos. I have no problem accessing the address, owner, etc, and I can always access the first photo, but whenever I cycle through the photos, I seem to cycle through the first photo for every house, not every photo for each house.
Basically, I need the children <images> to go up by one, without the the parent going up by 1. I am hoping I am describing this well. My code looks like this:
[Code]...
View 4 Replies
Mar 10, 2010
I have a Canvas which has many components inside it and those again, have many components inside them.
getChildren() returns only the top level children. What is the best way to retrieve all the children (children of children of children and so on).
Well, I sorta know how to do this by iterating through the children, but the code is really messy. I'd prefer to use a nice recursive function. Has anyone written this before? Or is there a Util class to do this?
View 3 Replies
Jul 24, 2010
I am trying to pull in information about houses via an xmlfile. Each house has 1 address, 1 owner, 1 description, and about 6photos. I have no problem accessing the address, owner, etc, and Ican always access the first photo, but whenever I cycle through thephotos, I seem to cycle through the first photo for every house,not every photo for each house.Basically, I need the children <images> to go up byone, without the the parent going up by 1. I am hoping I amdescribing this well.My code looks like this:
total = xmlNode.childNodes.length;
totalb =
xmlNode.childNodes[0].childNodes[5].childNodes.length;
[code].....
View 1 Replies
Oct 28, 2011
I have an ArrayCollection that is read to generate containers in an accordion programmatically:
<s:ArrayCollection id="_ac_ps">
<fx:Object label="Block and lot" data="_blocklot" searchType="districtblocklot"
info="" />
[code].......
View 1 Replies
Jan 11, 2011
for some reason STORAGE[0].getChildAt(0) works whereas liner.getChildAt(0).getChildAt(0) does not. STORAGE is a movieclip and a child of liner. the error is something about not being able to use getChildAt on a display object. what's wrong? is there any other approach i could use? PS: liner.getChildAt(0) works and does indeed seem to refer to STORAGE[0]
View 2 Replies
Mar 16, 2009
I was looking for the difference between the different content types in Flash CS3/CS4 - Browser/Screen Saver/Application etc - especially it's capabilities and limitations. Of interest are Standalone player and Application.
View 3 Replies
Mar 19, 2012
Types like Movieclip , String, Object act as references when declared and defined, while types like int, Number are primitives. Why such difference has been made. Why not all of them can be primitives ?
View 1 Replies
Oct 16, 2007
I want to create a function that creates various types of MC. Lets say so:
[Code]....
Explanation: Create function that creates MovieClip, make for statment to create more Mc with that function.
View 5 Replies
Nov 24, 2009
I've been working on a cute game and I've hit a bit of a wall
It's a shooting gallery game and I want to add multiple target types (so far this has been easy) but I want to game to randomly bring them up as you play. There are four possible target spots and seven possible targets:
baddie1
baddie2
baddie3
baddie4
baddie5
baddie6
goodie1
View 2 Replies
Jun 16, 2010
In the past I embedded several (with makers permission) youtube clips into a html web page (with the file stored on my server - mainly because I think it looks nicer). It worked fine. Now these were the old plain .flv low quality ones. But now I am trying to embed the newer higher quality youtube version, again, with the file stored on my server, and the embed code I used previously doesn't work. Now the new higher quality file is still called flv but it has a codec: mp4a
My old coding:
<object type="application/x-shockwave-flash" width="704" height="546"
wmode="transparent" data="mediaplayer.swf?file=xxx.flv&autoStart=false ">
<param name="movie" value="mediaplayer.swf?file=xxx.flv&autoStart=fals e" />
<param name="wmode" value="transparent" />
</object>
View 1 Replies
Oct 8, 2009
A gentleman doing the sound track for the video I want to do on Flash has asked me what audio files Flash will handle? I have looked at Adobe and Macromedia and many other Flash websites and, of course, Flash itself, and cannot find any enumeration of what video files Flash handles, much less any mention of what audio files.
View 4 Replies
Dec 4, 2009
There is only simple type of button in Component - User Interface - Button. How to insert different types of buttons in flash document.
View 3 Replies