ActionScript 3.0 :: Accessing Mc Farthest From Z?
May 10, 2009I've loaded 5+ instanced movie clips, each of which play 48 frames simultaneously once and then stop (mc1,mc2,...mc5)
These mcs were added via addChild.
[Code]...
I've loaded 5+ instanced movie clips, each of which play 48 frames simultaneously once and then stop (mc1,mc2,...mc5)
These mcs were added via addChild.
[Code]...
Here is a snippet of my XML
Code:
<stores>
<store floor="sport" shop="02">
[code].....
I have a series of swfs that I've connected via loadmovie. This works well with I press the NEXT button, but not the PREVIOUS button. The PREVIOUS button starts at the beginning of the called movie. I need it to start at a specific location. Is that doable? If yes, how? I tried adding the gotoandplay after the call to the swf, but no luck.
View 2 RepliesI'm fairly new to XML and Flash, and am having some trouble accessing some deeper nodes in the XML feed that I'm using for my project. See details below. I can access the headline fine, but it's anything below that - the timestamp and the excerpt that I'm having trouble accessing. For now, I'm just starting with the timestamp.[code]...
View 2 RepliesSo this is a nuanced version of a lot of posts that I found...
If I have an XML database with a line like this:
Code:
<pizza>pepporoni</pizza>
...and I want to get the name "pizza" when I'm looping through a database, how would I go about doing that???
I have tried to access it by using .name or .label, but to no avail.
DocumentClass is a class that is also my document class for my fla (hence the name) and I have a movieclip on the stage with the instance name "player" which means that the player "belongs" to DocumentClass.
Without extending DocumentClass to CollisonDetection, how would I be able to access player from the CollisonDeteciton class?
How to access the timeline of a movieclip from inside ANOTHER movieclip (both MCs are placed on the root timeline BUT in different frames)
(if not possible, AS3 instead?)
I have a Flash movie written in Flash 8 with AS2 that is attempting to access a webservice on a server that is https.
I can't get the webserviceconnector to even load the WSDL file.
I have a crossdomain.xml file at the root of my http/https server that allows the domain the swf is being served from to get in and it has the secure attribute for that domain set to false, but it still can't get through.
Not sure what I am missing at this point.
I have a quick update. I figured that since my webserver is serving the secure site up under a different Website in IIS that I needed a crossdomain policy file at the home directory of the site. I have placed it there and when the movie loads I am using loadPolicyFile to get the crossdomain file which still loads into flash without issue but I still get a WebServiceFault when I try to load up the WSDL.
Can anyone point out a crossdomain example where a flash movie on an http domain is accessing a webservice on an https domain?
I have one .swf file inside a second .swf file. How do I have one .swf access variables from the second?
View 3 RepliesI have 2 AS files. One is my main file which i have as the Document Class. The other I am trying to get to be a "sub as. file" that will load when the main one loads. The main Class loads pictures through xml. The subclass, (I guess it would be called), loads all of the elements that I need on the stage, such as the forward and back buttons etc.
My main class is
Public Class Slideshow extends Sprite {
//I then put a var within this with as the name of my subclass:
public var stageElements:StageElements;
Now, at first when I published the flash it gave me some errors that were in StageElements class so I fixed them and it loads all fine now without errors and the pictures come up but the stage elements do not. I know that my StageElements class works because I have tried it out as the Document Class the .fla uses.
I have a button instance mc "mcBtn",inside this instance i have the actual Btn graphic symbol and AS layer.inside the AS layer i have defined onRollover, onRelease, onRollOut methods.if i rollOver/Out/Press Btn it works fine and Btn animates in some way.
I needed to access mcBtn from _parent timeline AS WELL, so i defined a method mcBtn.onPress [one which is not defined inside mcBtn yet], and inside onPress told mcBtn to animate some other content.... What happened is, that onPress works fine and after pressing Btn, requested content is animated, BUT all other methods defined inside mcBtn stopped working! [no animation when rollOvered, rollOut-ed, onRelease-d]
Q: how to make all those methods work?
I'm using this code to bring in another swf into a movieClip called "movieLoader":
var myLoader:Loader = new Loader();
movieLoader.addChild(myLoader);
var urlMovie:URLRequest = new URLRequest("movie1.swf");
myLoader.load(urlMovie);
The movie loads just fine, but how do I access it?
I tried:trace(movieLoader.totalFrames);
and it just gave me "1". I know the movieclip has more than 1 frame.What do I do to access the swf called "movie1.swf" I just brought into that movieClip?
The issue I am having is that I have no idea how to access the Children of another MovieClip. I have 2 MovieClip's, storeFront, at frame 25, and reviewPage, at frame 60. storeFront contains a vector, cart, and I need to access it from reviewPage.
I have tried...
var appRoot:MovieClip = parent as MovieClip;
buff = appRoot.getChildAt(30);
review = buff.cart;
[Code].....
I've got a Flex 3 project that uses xml. It works great in Safari or Firefox. But it blows up in IE. I access the xml using the lines below.[code]How can I access the xml in a way that IE will accept?
View 1 RepliesI have the following PHP file with a variable I am trying to access to place in a dynamic text box on my flash stage.
PHP code:
$returnVars = array();
$returnVars['username'] = "test";
$returnString = http_build_query($returnVars);
//send variables back to Flash
[code].....
The code was adapted from a tutorial using a class. However I do not get on with classes so wont be using any.
I'm loading an external AS3 SWF using the Loader class but i need to access a method inside the loaded SWF. how can i do this?
View 1 Repliestrying to export a very large image from flash for days now and my latest approach has lead me to AS3. (I usually use AS2). AS2 was causing endless problems with the PHP server timing out (the raw pixel data was over 8MB) but I have the save function working thanks to this great class. The problem is, this function only works on local movieclips.
I have imported my whole AS2 project swf into an AS3 swf at runtime and now I need to find a way to send one of the AS2 movie clips as a parameter to Mark Knol's "save to jpeg" function from the class above. I've tried gSkinner's SWFbridge class but the flash LocalConnection method only seems to allow calls to a remote function, rather than call a local function on a remote movieclip.
So I want to access another loaded SWF. How can I have ChildA talk to Child B? All are external SWFs.
[Code]...
I'm having a problem accessing the XML nodes contained in the trace statements below. I've included a portion of the XML for clarity. I'm able to trace out the entire XML but not individual nodes of interest. I presume the problem is namespace related but the values I want appear to be in the local namespace.
ActionScript Code:
function parseXML(e:Event):void {
e.target.removeEventListener(Event.COMPLETE, parseXML);
[code].......
I have several swf files imbedded in a main swf ( I know nothing special) One of the swf files (call it map.swf) was created with Adobe Illustrator and is map of the world as an import. Each country is in its own layer. Thru a movieLoader the map.swf file is loaded into my main swf into a layer called base. I know I can access it as _level0.main.base for example. From a web page I want to pass the name of a country to main.swf which intern hilights the country in the map.swf. I use a LocalConnection() to receive the country's name and this part works fine. However, I'm not sure how to either pass the country name to map.swf or create and call a function that resides within map.swf. Or is this even possible?
View 3 RepliesI have 12 instances of a movieclip. These are arranged on the stage in three columns. I would like to populate three different arrays, one array per column, with mcs from each column. In other words "all mcs._x == 60 go to array 1, all mcs._x == 130 go to array 2, etc.
View 1 RepliesBut I have a serious problem. Someone has to help me before I lose my mind. That's the project I've sent before. I've just returned from holiday and I'm stuck in focusing between mc's. My .fla file is included. I want my app to jump to the next movie clip after entering a letter to the current one. But there I have the problem : accessing mc inside mc. You'll see the details on the .fla file.[URL]..
View 2 RepliesHow can I set "_visible = true" for one item in an array, and "_visible = false" for all the others?
View 14 RepliesSo I have a "blog" db setup on my server. I have the proper tables setup because you can test the entries by going here.url...You will see 3 different entries with text, date, time etc ..How I have a very very basic flash movie calling this data. It'll change when i complete the site, but at the moment I'm trying to make this work.url...With the following code, it's suppost to call and get the data from the most recent blog entry, and post it in the appropriate text box, along with date and time.Next it also calls previous entries, and posts it in the 'entries_txt' box.I know it's on the flash side of things because when accessing the .php file I can clearly see the entries, time and date. Well when exporting it out of flash, the only thing that shows is the most recent entry. No time, date, or previous posts. This happens 'online', and on my local machine. I get a "undefined" post because it can't find the blog.php file—which is expected.[code]This code is not my own, as I am/was following a tutorial. Any help would be greatly appreciated. I don't want to setup a blog for my client through a 3rd party because I want to keep the whole site flash-based, and don't want users to travel out of the site. I could also set this up just by calling dynamic text etc .. but I'm having fun learning to use MySQL and php.
View 1 RepliesI have finally started with AS3 and flip-'eck its a different animal that AS2
I have a swf called login.swf and in it have declared the variables var total:uint=0; and loginState:Boolean=false
All my scripts for logging in sending/receiving variable from/to server scripts are all working!
So... when a user supplies a correct password another swf (userLogged.swf) is loaded (note: in AS3 this process is seriously different than in AS2) swf dont seem to be loaded 'into' another movieclip anymore... and this leads me to the puzzle!
How do I access variables declared in the project.swf, from within the userLogged.swf!
the old AS2 way = trace (_root.loginState);
or trace (_root.project.loginState)!
I am stumped by this new approach of AS3 of loading in other swf files. The _root. options is no longer available in AS3 (that much I've descovered, some tuts say use root. but I cannot get that to work)
trace (root.loginState)
or
var userLoggedIn=root.loginState
gives me the error
1119: Access of possibly undefined property loginStatus through a reference with static type flash.displayisplayObject.
when I try to publish the userLogged.swf
So this should be easy, but my actionscripting is pretty rusty.i have a series of movie clip buttons that I am enabling through a for-loop. The problem is, when i try to access these mc's, it isn't recognizing that they even exist.[code]
View 2 Replieshow can i access for example, the text of a Input text on the stage, from a movieclip?I need that value from the input text inside my movieclip's actionscript.(Actionscript 3)
View 8 RepliesI have a button, inside an mc1 which when clicked it plays
[TweenLite.to(mc2, 2, {frame:1});]
inside mc2 -which located back on the stage.
Currently I get the error of "access of undefined property)".
I'm trying to write a class that somehow emulates the old AS2 gotoAndPlay(); function, but i'm failing to find a way to reference the timeline that is calling the Class Constructor.
this is what i am using to call the class, i'm placing this code in the frame of the timeline i want to control. but it always gives me a null error.
I Know senocular adressed the timeline issues in one of this forum's post, but i can't figure out what to do in order to register this class in the specific timeline in order to control it.
the frame goes like this:
[Code]....
Trying to get from AS2 to AS3 and the simpliest things are taking too long.I have some movieclips on the main timeline named...
btnSm1_mc
btnSm2_mc
btnSm3_mc
[code].....