Actionscript 3 :: Flash - Passing Objects To External Swf
Aug 28, 2011
I have a object, called friends, It contains the url to facebook profile picture, ie friends.friend1 = "http:// etc"; I have a swf file called, master.swf, which is passed the information to create the object through flashvars. I need to get the object OR the flashvars info to the externally loaded swf, called pageOne.swf. I have seen and tried several different methods, but now seem to give me what I need.
[Code]...
View 1 Replies
Similar Posts:
May 12, 2011
Can you pass an Object into flash from a button click instead of a String?
View 2 Replies
Dec 27, 2010
So i a building a categorized menu of different foods. I have a class for "categories" (buttons) which essentially will return a string "salads", "drinks", etc. I now have another class "menuItems" for items within categories and this handles sizes such as "small", "med", "large", etc. My problem now is that when i return "salads", i want to invoke an array which contains all the elements of salads, send it to menuItems which will populate the menu. So far i have both the category objects and the menu object setup. I just cant seem to be able to send the data that the category object is returning and pass it to the menu object. Both of which are added to the stage as shown below:
If there was a way that i could say add all these classes to one class so that they can talk to each other that would be great but i dont know how to do this.
View 1 Replies
Nov 4, 2010
I've created a class that contains all of the movie clips from the stage. These variables are referring to the instance's name on the stage. Everything seems fine as long as I keep all of my functionality in a single class. However, when I try to use another class to manage the properties of a movie clip, I run into resource clean up issues.
//File (MainScreen.as)
import utils.Container;
class MainScreen extends MovieClip
[code].....
View 1 Replies
Apr 11, 2011
I got an object into a class (a public one) called "squaddie0", and when i try to call it back from another class dynamically with :the main_class is the passed class, i get the vars like this : main_class.var1r index:int = 0;var ob:Object = (getDefinitionByName(main_class["squaddie"+index]) as Object;I get an error as an undefined object...Why that ?
View 2 Replies
Jul 13, 2010
I'm passing a Javascript Array() to Flash via FlashVars but Flash complains. Can you guys point me what am I doing wrong here?
javascript code
// array with the user defined cities
var usercities = new Array(
[code]......
View 3 Replies
Mar 23, 2009
I am using PHP to save an AS3-generated XML document to my server. This works absolutely fine. Now, I'd like to be able top pass a filename along with my URLRequest under which the file would be saved.
When doing this in HTML it would be pretty easy and I would simply POST 2 seperate values, but how to do this in AS3?
View 2 Replies
Dec 3, 2009
is it possible to send native nested objects to flash via swfobject? i am trying this right now without luck:
PHP Code:
var flashvars = {event1:{eventid:"145",title:"event 1",toggle:["thistha","timestart"]},
event2:{eventid:"145",title:"event 1",toggle:["thistha","timestart"]},
event3:{eventid:"145",title:"event 1",toggle:["thistha","timestart"]}}
[Code].....
View 1 Replies
Feb 13, 2009
Is there a way I can pass complex objects like sprites or timers through LocalConnection? It seems like you can naively pass simple objects like String, Number, Array thru the LocalConnection. But I can't seem to send other data types.I read that you have to use the method "registerClassAlias()" within the receiving SWF file before that SWF file can accept complex objects. For example, when I attempt to send instances of Sprites or Timers, I get the following error:
"Error #2044: Unhandled AsyncErrorEvent:.text=Error #2095:flash.net.LocalConnection was unable to invoke callback sendState.error=TypeError: Error #1034: Type Coercion failed: cannot convert Object@b9210b1 to flash.utils.Timer."
How can I send complex data types or are some data types not send-able?
View 8 Replies
May 27, 2010
When invoking super() in my subclass, I can pass uints and strings as params to super, but passing a TextField instance that is on the stage of the library instance of the subclass fails. Why? Is there a workaround?
View 2 Replies
Mar 15, 2011
I'm trying to pass the stage display container too my Engine class but I'm getting the error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.olly::Engine()
at com.olly::MainControl()
Here's the code:
I'm creating the the Engine in the main document class here:
Code:
public var MainGame:Engine;
public function MainControl() : void
{
MainGame = new Engine(stage);
[Code].....
View 1 Replies
Jun 13, 2011
I have created a Component class and it's working fine .I want to pass an ArrayCollection of Objects to the Component .I have read in many articles , that we should use [Bindable] to make an ArrayCollection of Objects .What are the ways can we achieve that ?
View 2 Replies
Mar 29, 2009
So I try to send 1.the PDF 2. the message 3. the email-address to a PHP-Script. It works, but somehow my PDF always get garbled and is not a valid document.I transmit my things like:
Code:
var emailURLReq:URLRequest = new URLRequest('pdf/email.php');
var emailVars:URLVariables = new URLVariables();
[code].....
View 2 Replies
Jan 18, 2011
I wrote a code for handling google maps in a multi touch table. On the map itself, I have a sort of button that, if touched, makes a tool bar show up. On the bar I have a slider and a button, both of them activated by touch events. My problem here is that when I touch objects on the bar, the touch event pass through the bar and it is fired also on the map below, making my map move. Uff, this is very annoying.
View 1 Replies
Jun 2, 2008
Working on a site that uses external interface to control the appearence of a number of buttons, setting color and text. The whole deal works fine in Firefox and IE (after vigorous debuggging), but I can't seem to address the objects correctly in safari. The swfs are hard coded in and I'm using a function to find the reference to the object and then using an EI addcallback to set the values.Here some javascript for the main functions:
Code:
function getMovieName(movieName) {
if (window[movieName]) {
[code].....
View 2 Replies
Jul 11, 2010
im trying this every which way.creating global variables etc.I have a movie clip with a text area (lets call it txttest)there is text inside it which i want to send from this movieclip on the main frame to a text area (lets call that one txttestB) on the main frame. Whatever i try i get undefined in the text area on the main frame.I have tried this...
_global.selectedcompany = txttest.text;
_root.txttestB.text = _global.selectedcompany;
View 1 Replies
Jun 16, 2004
I'm having troubles activating the HitTest, passing the objects name as a parameter through a global function. Let's say there is the following function on the main timeline:
[Code]...
View 3 Replies
Jan 19, 2009
How do you load external library objects from an external swf? I want to have an external swf that only contains library objects that are exported for Actionscript, and load these from the master .swf file dynamically during the master swf execution. (I may have multiple external swf resource files)I want to be able to load the external swf, and then access it's library objects via actionscript in my main swf file.
View 6 Replies
Apr 5, 2011
I have a map of the US acquired from here (called U.S. Map). I am currently generating XML from inside an ActionScript file, and would then like to display this map using my generated XML as the argument. According to this, to do this in html would require the following declaration:world.swf?ata_file=pathname/filename.xmlHow can I replicate this behavior using the Loader from ActionScript? Right now I have:
var ldr:Loader = new Loader();
var url:String = "us/us.swf?data_file=senate.xml";
var urlReq:URLRequest = new URLRequest(url);
[code].....
View 1 Replies
Apr 20, 2006
i have a gallery that when any thumbnail is pressed it implements the following variable:[code] Now im trying to acces that variable "thumb" in ProjectFrame.swf but i cant seem to do it. Anyone know how I can pass the variable out?
View 14 Replies
Apr 10, 2011
I'm trying to have Flash execute a file, and I can get FSCOMMAND to work. Sort of. While I can use it to run a single batch file, what I really need to do is to pass a parameter from within Flash to the item being executed. I'm currently using Flash to allow a user to select some items, and I need to pass that selection out of it in order to kick off some other processes (Flash is basically just my GUI interface right now until I learn more about how to do things in it).
I don't care if it's a batch file or JavaScript or anything that's not uber complex (so no .NET or C++). I just need to find something that we can run internally for our company (either from an .HTML or a .EXE file output from Flash - not too picky there either).
View 4 Replies
Apr 14, 2011
I am loading an external child swf file into a MovieClip container in my main swf.I have a button in my child swf that when clicked, needs to be able to access a movieclip or variable that is in my main parent swf. How would I do this??
View 1 Replies
Jan 25, 2008
I am using a carousel with items in it...when the user clicks an item in the carousel, I want a new swf to load to _level0 and replace the carousel on the stage...the new swf reads an xml...however the xml should be different for every item on the carousel...is there any way to pass the xml file name to the loadMovie command so the new swf can use it?
View 2 Replies
Apr 18, 2004
I have a .exe file (it is a player) i need to pass a parameter to this player so it could play a specific file ( the parameter is the name of this specific file ).
now what i do in windows is
Start>run ( <full-path-to-.exe-file><space><parameter> )
now that works perfictly on windows.
what i need is to be able to start this application ( the player ) and pass the parameter to it, all through a flash button (from the flash player )
View 3 Replies
Oct 30, 2010
I'am trying to load an external swf file and passing it some variables. He is my code:
[Code]...
When i load a simple swf, it work fine, but when i try to give him some variable it does not work anymore.(i'am also muting sound)
View 1 Replies
Jun 5, 2011
I am working on a project where I have on the stage 8 movie clips, and when hovered, they are to shake. I have made this into a class, and placed the code as an external .as file.
Each movie clip is named shaker_mc - shaker_mc7
I have also gone in and changed all of the button movie clips base classes to ShakeButton.
Right now I am getting a couple of errors, and I believe all i need to do is pass the buttons names to the class in the external .as file, but I am not sure how to do that? I had everything working without the external script, but I did not want to have to create the effect for each button.
The erros are:
1120: Access of undefined property shaker_mc.
Here is my code for the ShakeButton.as file
ActionScript Code:
package{
import flash.display.Sprite;
import flash.events.MouseEvent;
[Code]......
View 3 Replies
Jan 19, 2008
probably a hugely embarrassing beginner question, but I can't seem to find an answer anywhere. I think it's probably (hopefully?) just a syntax problem I'm loading the content of a dynamic text box from an external .txt file and I'm trying to find a way to change the content from a link in the .txt file (if that makes sense). The code I'm using to change the dynamic text box at the moment is:
[Code]...
View 1 Replies
Mar 25, 2010
I want to create a MovieClip, pass this MovieClip to a function in another class where it will be modified.The problem is, when I pass the MovieClip as a parameter to a function and start making changes, the changes are only made locally. The "copy" of the MovieClip inside the function gets changed, but the "real" MovieClip back in my main game class remains unchanged. Here's the code from my Main class:
Code:
var resourceLoader:ExternalResourceLoader = new ExternalResourceLoader();
var myMovieClip:MovieClip;[code].....
View 4 Replies
Feb 21, 2007
i'm pulling my hair over this. i have sucessfully (verified) loaded an xml file and can trace the data i'd like to pass. i am loading the external swf into an empty mc called X. in the external swf i am loading is a mc and in there is a dynamic textfield. i give the content of the xml to the path to the dynamic textfield and nothing happens. trying to pass the variable with: target.text = content;
i listed the variables and objects in the test movie debug option (command+enter) and i can see the dynamic text box variable. then i took copied the path from the output window to my actionscript, replaced _level0 with _root but still to no avail. what am i doing wrong? do i have to publish the swf being loaded in a certain way? why am i able to look at the variables in the debug list variables and objects option, but not in the actionscript?
View 1 Replies
Jan 12, 2010
I wonder if it is possible to pass values from external .swf files to the main projector (.exe) file.? I would also like to know how a button of an external swf file can control the playhead of the main .exe file.
I have this map of tasks. and each map have these houses which when clicked will take you to a certain task(external swf). and when accomplished should have a button to take you back to the map(main swf), and also the button to send a value to the main swf that the task is accomplished.
View 2 Replies