ActionScript 3.0 :: Send Info From Loaded Swf To Parent?
Jul 17, 2009Making the move from AS2 to AS3 and need a little assistance/guidance.
In AS2 I have been using the below to send instructions to parent[code]...
Making the move from AS2 to AS3 and need a little assistance/guidance.
In AS2 I have been using the below to send instructions to parent[code]...
i am trying to load the variables from parent(flash) to child(flash).Its working fine,.
parent swf:(flash)
var parentMessage:String = "Hello";
var swf:MovieClip;
var l:Loader = new Loader();
[Code].....
I'm using Alex Uhlmann's flip card class (Distortion Effects). I've got a card that has 3 faces. When the user clicks the button, it fires a change event, and in the main application, the change event calls a function, flipTo, that flips the card. The component is below:
[Code]...
I have a get url code to activate a lightbox which works perfectly.
ActionScript Code:
sample_link.onRelease = function () {
getURL("javascript:openShadowbox('ww.example.com/video.flv','Player',Title','videos','640','360')");
}
I have several different videos I want to lightbox. Rrather than having several instances of sample_link for each video; I want just once instance, where the getURL is changed by a separate button .
ActionScript Code:
sample_link.onRelease = function () {
getURL("is equally to X");
}
[code]....
I am trying to get a .asp example file from an actionscripting book to work, but it keeps telling me that there is an error trying to open the .asp page on my server.I uploaded the .asp file, and the access file onto my server, but it is not communicating.Are there any browswer settings or web-hosting settings I should be aware of before I try to send and receive information from a database? Also, I eliminated one variable. In another document, I was able to pull information from a text file from my web server without any problems.
View 3 RepliesI've been using flash vars to send info (such as numbers) into a swf file. I need to send info back to the webpage. something as simple as a interger (maybe, send as a "GET", like in a forum) if you could give me some sample code, or some keywords to look up
View 9 Repliesi have about 10 fields most input text boxes and then about 4 check boxes...i have no clue how to use as3 and php together to send the form info to an email.
View 1 RepliesI have two swf files that I would like to communicate back and forth. Currently, I am able to get the LocalConnection to work one way.
But I'd like to have the 'Receiver' send info to the 'Sender' and back again and again.
I have a submit button created in an Actionscript file. I want to send data when user clicks the submit button(never mind how the data is sent-I just need to check the event listeners). I tried placing an event listener for the button in the AS file like so: I'm getting an error about undefined method,blahblah so I tried going through the main timeline. Go to frame 146(labeled "this"). myform creates instance of class formtest; subbtn is the name of the button created in the formtest.as file. how the heck do I remove this form when user exits frame?
View 2 RepliesI am trying to get a .asp example file from an actionscripting book to work, but it keeps telling me that there is an error trying to open the .asp page on my server.I uploaded the .asp file, and the access file onto my server, but it is not communicating.Are there any browswer settings or web-hosting settings I should be aware of before I try to send and receive information from a database?Also, I eliminated one variable. In another document, I was able to pull information from a text file from my web server without any problems.
View 3 RepliesI'm trying to finish off a Flash menu that was done for my website & I'm a bit stuck - New to this game. Basically I have a menu made up of 5 items, each item leads to another list which has a "datefield", "nemericstepper" & "order" button. what I am trying to achieve is when the "order" button is pressed the "date" & "number" information is sent to my existing order page, customers details are then entered in the required fields & this is sent including the "date" & "number" via my existing PHP script to my email.
View 0 RepliesHow can i make form in flash to send info to php by post or get ?[code]...
View 7 RepliesI am trying to send info using USLStream from flash client to JAVA server.Some of the info is Chinese so i have to use Unicode.
View 1 RepliesI created a funky mail form and i can't seem to send the info from the input boxes in my flash file... to the PHP script, stuff it into an email, and then send back a success or error response. I am attaching the FLA and PHP files as well as the external .as files that are needed for the FLA's effects to work. [URL]
View 1 RepliesI have a shell swf that is loading a swf. How do you have the loaded swf tell the parent loader to unload itself after the loaded swf finishes playing?
View 4 RepliesIm working on a project that has a main swf file associated with the document class. It loads XML that provides the text content for the project, then it loads a swf that contains a font in its library, then it loads the first of several content module swfs. When the font swf has inited, I'm registering its library font with Font.registerFont(), and using it in a TextFormat object. After everything is done, I can add code to the document class to create a text field on the stage of the main swf and format it successfully with the TextFormat object, but when I try to do the same thing inside the loaded content module swf, the text doesn't show up there at all.
View 1 RepliesI'm working on a project that has a main swf file associated with the document class. It loads XML that provides the text content for the project, then it loads a swf that contains a font in its library, then it loads the first of several content module swfs. When the font swf has inited, I'm registering its library font with Font.registerFont(), and using it in a TextFormat object. After everything is done, I can add code to the document class to create a text field on the stage of the main swf and format it successfully with the TextFormat object, but when I try to do the same thing inside the loaded content module swf, the text doesn't show up there at all.
View 7 RepliesI have a as3 movie which loads an as2 in it.
I create a movieclip in as3 and i want to pass this created movieclip to as2.
There are some problems:
1 - How to send it from as3 to as2?
2 - How to create a movieclip in as2 with this received data? ( the loadMovie function has just a url parameter, not data )
In my document class I have the following.
var mainBoards:LoadXMLData = new LoadXMLData("Main_boards.xml");
var test:XML = mainBoards.getXMLData;
In the LoadXMLData class I have an event listener and a getter that will return the XML data.
_urlLoader.addEventListener(Event.COMPLETE, onDataLoaded);
_urlLoader.load(new URLRequest(file));
//and
[Code]....
is there a better way to wait until the data from the XML is loaded into the LoadXMLData object before the mainBoards.getXMLData is assigned to the test variable in my document class?
I am making one flash project for online shopping. When the "Order" button is pressed the info is send to php file which sends info to the owner e-mail address, so he can review the order and confirm it. So he problem comes when the client types something in cyrillic and in the received mail it comes as "?
View 4 RepliesSay I have an object call "Mother". Inside this Mother object is a function called "Come back all my children" And all my Child Objects extends Mother.
Is there a way one of the Child could call the function "Come back all my children" and this function will be evoked in ALL Child objects ?
I tried creating a "Come back all my children" function as static in the Mother object but I am unable to use the "this" keyword for this.
iam trying to move forward and learn as3 i am converting complex project i worked on last year using AS2 , now i have problem in dispatchEvent command i have class extends MovieClip that need to fire Event to sub sub childs i can send from the child to the parent using
[Code]
I'm trying to populate an array with info loaded in from an xml file. I've got the xml loading fine and I can trace everything but cannot seem to access the info outside of the function...here's my code:
Code:
myXML.onLoad = function(success) {
if (success) {
populateNav(myXML);
} else {
[Code]...
My trace inside of the populateNav function works great...all the info is there and image_path returns all of my...image paths. So my XML is fine...what I can't seem to do is pass that info outside of the populateNav function. My imageholder trace returns undefined. I think it's got something to do with the fact that the imageholder trace is being performed before the xml is fully loaded...not sure what to do about that though.
I'm workin' on a cool project for school. I'm loading up some text from an external XML doc, and bringing it in to a flash textField.
It's working great, but I want to do a little formatting, first off, apply a bold tag or a bold font to some headings.
Here's the .text field as I have it now:
Actionscript Code:
motorcycleInfo.text = "Make: " + bikeMaker[evt.target.selectedIndex] + "
" + "MSRP: " + bikeCost[evt.target.selectedIndex] + "
" + "Ride Category: " + bikeCategory[evt.target.selectedIndex] + "
" + "Engine Size:
[Code]....
(ps I finally figured out how to wire up my mp3's so they play, and pause, I just haven't loaded that swf up to my server... so if you press the music buttons and they don't play, that's the reason.)
Im sorta beginner at AC3 and i've made a little FLA file wich i a want to compile and upload to a host for load it to my website.However, before i compile it i would like to put restrictions for it not to be loaded from other sites it might be requested by flash insert methods or whatever.Is there a way to retrieve info about the site or location the flash (swf) is being requested to be loaded/run?
View 2 RepliesI have a child class that is loaded into the parent class when the swf begins, like so: var myvar = 'hello'; public function Parent() { this.child = new Child(); }; How can I retrieve the variable 'myvar' from within child?
View 1 RepliesI have some scrolling content (info). I've also made my own scroll bar.I want the scrollBar dragger to be positioned in relation to the info._y as the user scrolls info.I have created two vars: one that worsk out where info._y is as a percentage and the other that works out where the scroll._y dragger should be as a percentage...
Actionscript Code:
var scrollBarPercent = Math.round(scrollBar.dragger._y / [code]........
also onMouseWheel working too.I need a small bit of code that takes the % of info._y and moves the scrollBar dragger to the same % but in relation to the Stage.height...so if projectGalleryPercent = 50%, make dragger._y 50% of Stage.height using scrollBarPercent.
I started learning the basics of as3.0 a year ago by doing a lot of experiments.. I never read a book or took lessons or something.. I guess i'm still missing important logics when i'm programming. I'm creating my personal flash imagegallery but I can't figure out how to communicate between a loaded swf and its parent swf.
I have a main.swf file with document class main.as which loads external swf files into a movie container. I am also loading a background sound like[code]...
The only work around I was thinking about would be to keep showing the stop/start sound button from the main.swf when a slideshow instance is called.. but then I'll screw up my design I want a second button inside the slideshow that can also stop the main bg sound.
I load an external .swf file into a Loader. There is a button on the main timeline which is supposed to send the Loader's Child to frame 4.
View 3 RepliesHow can I send data to a loaded SWF? I just need to send some text from a few text fields.[code]...
View 1 Replies