Flash :: Pass Data Via Event From Swf1 To Swf2 Where Former Is Loaded In Later
Nov 30, 2010I have a swf(Swf1)that dispatches a CustomEvent
[code]....
I have a swf(Swf1)that dispatches a CustomEvent
[code]....
I have an interface file, which allows the user to drag mc's onto the stage and save their xy position in accordance to a position on a timeline. For example, mc1 is at x50, y50 at timeline position 1.I am using an array to save all parameters. When the user is finished they can click play to view an animation of the mc's moving about the stage.I want a button which will somehow save this animation into an external swf. This swf needs to be independent as it will be loaded onto a website.I have tried to figure this out in many ways. I am new to actionscript but slowlly getting there.I have looked into using a shared object, to save the xy positions etc which are then loaded into the swf2. The problem with this, is the swf2 is dependent on the SO plus the SO is temporary. I need to be able to hand swf2 over to the guy to put on his website.I have also looked into using an intermediate .as code file. I have worked out how to put an mc onto swf2 using the graphic held in the interfaces library. I started working out how to click a button on the interface swf which then attaches the mc into swf2.. but then I realised swf2 still isnt independent.
View 1 RepliesI have a flash banner1.swf (AS2) on [URL] (html-file)
How do I send 4 values from banner.swf to banner2.swf?
- banner2.swf is on another domain
- send the values to [URL] (php-file)
- And output the values into textfields on banner2.swf
- Inside banner2.swf I also want to make all the comparison and editing of the values.
I send the values in banner1.swf:
Code:
$envelope.carValue1 = value1;
$envelope.carValue2 = value2;
$envelope.carValue3 = value3;
$envelope.carValue4 = value4;
_root.$envelope.send("[URL]","_blank","POST");
Is there any way to only send the values directly to banner2.swf without using any PHP script in test.php? The problem I get is that banner2.swf doesn't catch any values. How do receive the sent values into banner2.swf? Do I have to have banner1.swf in php-file and banner2.swf in php-file? Is there any difference if both the swf:s are on the same domain or not?
I have an interface file, which allows the user to drag mc's onto the stage and save their xy position in accordance to a position on a timeline. For example, mc1 is at x50, y50 at timeline position 1.
I am using an array to save all parameters. When the user is finished they can click play to view an animation of the mc's moving about the stage.
I want a button which will somehow save this animation into an external swf. This swf needs to be independent as it will be loaded onto a website.
I have tried to figure this out in many ways. I am new to actionscript but slowlly getting there.
I have looked into using a shared object, to save the xy positions etc which are then loaded into the swf2. The problem with this, is the swf2 is dependent on the SO plus the SO is temporary. I need to be able to hand swf2 over to the guy to put on his website.
I have also looked into using an intermediate .as code file. I have worked out how to put an mc onto swf2 using the graphic held in the interfaces library. I started working out how to click a button on the interface swf which then attaches the mc into swf2.. but then I realised swf2 still isnt independent.
Now I am completely pulling my hair out. This thing is due soon and I am out of ideas.
Failing everything I thought I could just use a capturing software to record the animation as it plays... but with all the time I have spent on this and how far I have come in actionscript it is annoying that I cant work this out.
I am gonna connect two swf file on the same domain. I actually want to connect button1 on swf1 to frame1 on swf2 and then the same like that button2 to frame2... I think localconnection class is usable for that I am open to other ideas, it's very simple I guess but I am novice at this and this is my first job.
View 1 RepliesI am trying to pass custom event data from 1 class to another class...here is my codes..[code]
View 2 RepliesI am loading a URL , [ url is on another domain ]
it loads URL and then URL process and sends request to its server and returns data
loader1.addEventListener(Event.COMPLETE, onDataLoaded);
on onDataLoaded does not give me returned data , but this function triggers when it completes Loading URL
I want to trigger event , when loaded data is processed and returned , how I can acheive this ?
Which event is fired after the data is loaded into datagrid or combobox ? (Assuming the dataprovider is set to the datagrid).
View 1 RepliesI am experiencing an interesting problem...I have a URLLoader instance with a Event.COMPLETED listener. I can reproduce behavior such that when the listener is called, there is a discrepancy in the amount of loaded data.
[Code]...
I am trying to create a simple form using Actionscript 3 that will collect data from a form, then pass that data to an asp file. I have attached the following code to the submit button,but this is not working.I'm not sure if I have to add anything else and I don't understand why this is not working. I'm trying to load all the variable info into one variable called email form.
submit_btn.onRelease = function() {
var emailform:text;
emailform.email_txt = email_txt.text;[code]......
How to trigger a custom jQuery event from Flash, passing some data through event object?
View 2 RepliesHow can I pass xml data from php to flash, without using xml file?
View 3 RepliesI want to pass parameters when an event is triggered. My function:
private function keyChange(e:KeyboardEvent, setValue:Boolean):void
so that I can use the same function to set if a key is up or down. How would I write the event listener? I tried:
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyChange(,true)); however that didn't work.
I have:
Class my_class
{ public function my_class( an_mc )
{
[code]....
Could anyone redirect to the tutorial or post explaining how to save data from flash to SQL using c#/ADO.net?
View 0 Replieshow a ScaleX/ScaleY event propagates down to the children of display object? I want to step in at some point and "re-scale" one of the children of a display object that has just been scaled with it's parent. I can't find any event that is fired, and ScaleX and width setters don't seem to be getting called on the child objects. I'm working on an ActionScript Project (not Flex) in FlashBuilder.
View 2 RepliesWhat is the recommended way of passing objects into the eventhandlers of a Loader?
var l:Loader = new Loader();
var o:Object = new Object();
l.tag = o; // i imagine something like this
[Code]....
I have searched the forums and internet and nothing seems to work. It sounds so simple but the variables are not passing into flash. Here is the scenario:
On frame one of my flash file I have:
stop(); var sendLV = new LoadVars();
var recLV = new LoadVars();
[Code]....
Can any one provide me with an example of how to encode data and pass it to a php file using JSON and flash?
View 1 RepliesI'm trying to do a Christmas Calendar in Flash. I'm using buttons for the 24 days, that I want to activate depending on the date. Since I can't count on clientcomputers having the correct date set I want to use the date from the server and pass it into Flash. Now I found out on the Macromedia website, that you can use FlashVars as a ActiveX Parameter to pass values into Flash. So far so good. How do i address the variable in Flash then? Using a syntax like this [code]...
View 8 RepliesI have a flash application written in actionscript 2.0 that shows vector architectural maps and works perfectly on common web browsers. There are many interactions with javascript functions called by user events on the webpage, such as zooming to a certain x,y point. This event is usually accomplished via the mouse wheel.
Now I have to make sure that the thing works on tablet pc, in particular the Galaxy Tab. The first thing I have to fix is that, obviously, there is no mouse wheel and the user naturally tries to pinch zoom the flash application, with the result of zooming the entire web browser.
What I need is to listen to the multitouch gesture and, when a pinch zoom event is called, disable the default zooming event and call a javascript/flash function that allows my flash app to zoom only the objects that need to be zoomed: in few words, the browser stays still and only a part of the flash zooms in or out.
I already have working javascript functions to call flash object functions for the zooming purpose, so I just need to connect them to some android things that tell me when the user tries to pinch zoom in and when he tries to pinch zoom out (and possibly the x,y point of zoom).
this liveDoc covers getting a url variable into flash:http:/[url]....you can pass data to a flash movie by doing the following:[url]....this will create a variable: _level0. variablename with the data: thisisthedata.so far so good.you can then embed this in the published html doc by including your data string in the object/embed tags.like so:
<object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab# version=8,0,0,0"[code].....
not to bad, so now your html is loading the swf with the url variable. the problem is this data is hard coded into the html.now for the question. how do i get the html to pass the url variable it receives onto the flash?
For the life of me, I've tried everything: I've researched LoadVars on Adobe forum, used David Powers' books, googled 'flash to php', LoadVars, etc. and tried sendAndLoad, send, and using $_POST, $_GET, $_REQUEST. $HTTP_POSTVARS but I keep getting this same error.
I have a Unix server running Apache/PHP 4 - LoadVars worked to load name-value pairs into an array -see thread)
My goal with this simple app is to prototype being able to pass a variable from flash to a variable in php.
Parse error: syntax error, unexpected T_VARIABLE in flash_to_SQL.php on line 5
Actionscript 2.0 code:
var c :LoadVars = new LoadVars();
c.testing = "123FOUR";
c.send ("
[Code]....
I think this is fairly straight forward but my skills lie in JavaScript and Ruby rather than flash so I want to run this past a few other minds :) I have a flash file that will take pictures of the user via their web cam. I want to take that newly created image, base64 encode it then pass it to a JavaScript function. That JavaScript function will essentially take this data then embed it into a hidden form element on the page.
[Code]...
I'm giving it a try and it happens that I'm having a hard time figuring out how to pass data between ViewNavigator in a TabbedMobileApplication.
<s:TabbedMobileApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<fx:Declarations>
[Code]....
How can I pass data between nav1 and nav2? I know how to do it in between navigation views.
I wanna ask if its possible to pass flash input type data to xml file?
View 9 RepliesIs this possible ? If yes how ?Otherwise what's the alternatives ?
By dynamically I mean using
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading);
[code].....
My question is how to display Facebook logged in username and profile image into Flash by using Flashvar??Here is the php code please check whether it is correct or not?
PHP Code:[code]....
And for the Flash part i do not know how to write the code into it.The component i will be using is UILoader for the Image and Textfield for name.
Is there a point of creating custom event class if i dont need to pass custom property with that event?
View 3 RepliesI tried trial and error by tracing strings so I could understand the program flow of actionscript(or any similar language in general) but to no avail; I couldn't understand it at this point or maybe it because I didn't eat my breakfast. Please explain to me why the trace statements showed in the output first?
Here's the code of the first Frame
import flash.events.MouseEvent;
import flash.events.Event;
trace("I'm in line 3!");
[code]....
What I'm trying to do is to trigger an event when the stage is loaded; It generates some URL of images and inject them into an array then trace it back.It is very crucial for me to understand the flow, I don't want to move forward without understanding this.