ActionScript 2.0 :: Passing Variables From Menu.swf To Viewer.swf?
Apr 16, 2006
So basically, I have a navigation.swf file with a large menu. I've set up a product_viewer.swf so that once a couple variables are defined, the viewer displays the correct images/descriptions.
I want a button in the navigation to set 4 variables and pass them to the loaded product viewer
This is what I THOUGHT would work:
Code:
//FROM THE NAVIGATION.SWF
on (release) {
_global.cat1:String = "hom";
[Code]....
So.. I was thinking I could set up each button so that they set these 4 global variables. If the variables are global, then shouldn't the product_viewer.swf read them? Do I need to add in any special code to the first frame of product_viewer?
View 1 Replies
Similar Posts:
May 12, 2010
So I have an animation I'm working on, its dialog driven and I want a vertical menu of questions the viewer clicks on. When its clicked it plays a specific sequence of animation, that part I have covered. Depending on the question clicked however, I want the menu to update with follow up questions.
-several menu items need to open up new menu items.
-the new menu items appear beneath the previous item.
-each new menu item needs to highlight text.
-each used menu item needs to dim text.
I'm mostly a script kiddy, I find stuff similar to what I need and take it apart and rebuild it to my needs. But I haven't found anything of this sort. The closest thing I have is creating a menu with an array.
I thought to assign the initial array values to questions as they would appear on a complete list. The idea is at the end of a string of dialog to run a check on a specific array value, if it comes up false, create that value and hence the new menu item is in it's proper place on the list (including appropriate highlight/dim text color). The problem is that when I run a trace I get a bunch of undefined values in-between. I don't want a menu with "undefined" text labels/buttons, is there a way to run a check for undefined during the menu loop and tell it to skip to the next value?
is this the best way to handle this project? I'd rather not create a complex movie clip of every possible menu configuration and run a ton of value checks with goto frames.
View 3 Replies
Jun 16, 2004
I have a button that plays a movie clip. that movie clip is a drop down menu. Is there a code that I can put on the button that will allow the viewer to rollover the button activate the menu and then when they roll off the "menu" part it plays the animation in revers. I made it already with very messy coding and placed a demo on this site. [URL]
[Code]...
View 3 Replies
Oct 13, 2011
I have a couple of questions with regards to video playback in Flash using AS 3. I'm not very good with flash coding so I've used the default video importer to import the video (file > import > import video). However I'm trying to put an event handler in that will detect when playback has completed and then take the viewer back to the main menu. I know it has something to do with NetStatusEvent but not sure how to connect it with the video.
Additionally when a viewer is watching a video, if they click a button below the video it takes them, say, back to the main menu. However the video continues to play in the background. I have put a 'video.pause();' on any button that takes the viewer away from the video, however the video is still loading in the background which isn't the ideal.
View 4 Replies
Feb 8, 2009
I have a swf with an input text box and a button. When the button is clicked, I need it to open another swf in a new window on a different domain and pass the variables to a dynamic text box in the new window. I looked at local connect but I wasn't sure it would work because the two windows wouldn't necessarily be loaded at the same time and they are on different domains.
View 4 Replies
Sep 9, 2009
I am loading images into a movie clip dynamically from an XML file. Based on what image the user clicks, I would like to be able to open a separate window, displaying a different image. Ideally, I'd pass the variable of which image was selected to the new open window.I've done some research online, and am thinking I'm making this harder than it needs to be.
Actionscript from main movie
Code:
chosenImage.onPress = function() {[code]......
I've also seen where I could possibly pass a variable through ASP.NET, but am experiencing the same errors when trying to pass the variable. I suppose I could embed the popup.swf file in a new .aspx page, that would probably be acceptable.
View 1 Replies
Jan 6, 2010
I'm using IE 8 and trying to open an HTML file. All files are either local or ran on a server. Problem is I use the URLVariables object, and they still won't get passed. for example:
Code:
var req:URLRequest = new URLRequest("Y:/htmlFile.html");
var urlVars:URLVariables = new URLVariables();
[code].....
View 14 Replies
Jul 21, 2010
I just want to show the contents of the input data in Movie Clip Movie Clip A into B which is still in one layer.
View 2 Replies
Sep 6, 2010
I'm trying to develop a site map, which draws a tick over the sections of my app that have been completed. I've figured out how to draw the tick and how to pass variables from root to the MovieClip that the function is in.
To make the tick appear only after an mc has been watched, I tried setting a variable equal to 1 ino the last frame of the MovieClip, and telling the function to run if that variable was 1.
I'm not getting compiler errors, but I'm also not getting the tick. And I'm definitely completing the Movie
Here's what I've got so far: In root
Code:
var xcoord = 125;
var ycoord = 300;
var WaterComplete = 0;
In WaterMovie
[Code].....
View 3 Replies
Nov 25, 2008
I am trying to pass value and string from AS3 main.swf to AS3 child.swf loaded in it. But, Nothing is working and i can't get the value from one to another. As Beginner in AS3, i was working for a long time and
still i face these problems and no output yet.
[Code]...
View 1 Replies
Nov 17, 2010
I am having some trouble in passing variables from AS3 to PHP. I am using flash and php both in the same file [try.php]. I've stuck with this for two days.. Here's what I have done. header.fla [Actionscript in the timeline]
[Code]...
View 5 Replies
Sep 4, 2010
Creating a flash project where users can visit the site, and turn off/on objects in a house (ie. lights, tv, computer, etc.) The next user who will visit the house in the website, will see what lights or house appliances were left on. Flash variables are passed to PHP, and those variables are saved in an XML file. (For testing to see what is being saved to the XML file, on each click --vars.xml opens.) In the vars.xml file, I see that the house objects that were last turned on--are saved in the XML file- But in the SWF file, only one of the objects that are listed in the XML are turned ON. Only the last object that was clicked on would show ON--not all the objects in the XML file.)
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.text.*;
import flash.net.*;
public class House extends MovieClip {
[Code] .....
View 1 Replies
Nov 19, 2010
I am having some trouble in passing variables from AS3 to PHP. I am using flash and php both in the same file [try.php].
I've stuck with this for four days.. Here's what I have done.
header.fla [Actionscript in the timeline]
Code:
stop();
import flash.events.Event;
import flash.display.Sprite;
[Code].....
View 5 Replies
Sep 4, 2005
I am using FLASHVARS to pass a variable (Status) from ASP to Flash.This piece of Flash (named Header), calls another SWF (named InOutPencil) using this command:[code]My problem occurs when I try to use the Variable 'Status' in the InOutPencil SWF (below).[code]I need a way of passing the value of the variable 'Status' from Header to InOutPencil.
View 3 Replies
Feb 24, 2006
I need to pass the following php information into flash...
<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$link = "<img src ="$mosConfig_live_site/images/comprofiler/tn";
$link_gallery = "<img src ="$mosConfig_live_site/images/comprofiler/";
[Code]....
This php script displays the top 20 users from a database based on their hit count. The script passes their avatar (image), username and link, as well as total hits.
I wanted to create a flash file with one movieclip that would parse the php file and display the results in an i++ fashion, so that I could make changes to only one mc instead of 20, when needed.
I have tried making a dynamic text field an mc, and assigning the loadvars object to that mc... but can't get any information to display... and I know the php file works like a charm.
View 10 Replies
Nov 21, 2007
in my main movie, i have done a survey, see my previous thread which collects data from a series of radioButton groups. i can display this data using dynamic text boxes no problem, however i also wish to display this data in a separate swf which has been loaded into the main movie via a movieclip using
Code:
_root.cm_handler.loadMovie("movie2.swf");
View 1 Replies
Aug 31, 2008
i got this working in AS2 and PHP, but i can't use the VAR option on the dynamic text ... so how would i do this in AS3 ?
here's the simple code
using AS2 and PHP 5.2.6
ActionScript Code:
//
// create an object to store the variables
varReceiver = new LoadVars();
// load the variables from the text file
[code]....
and the PHP Code in info.php
PHP Code:
<?php$fName = "nuno";$lname = "mira";$age = 24;// echo or print the variablesecho ("&fName=$fName&lName=$lName&age=$age&");?>
View 6 Replies
May 11, 2002
I'm trying to get one movie to send a variable to another movie. how to check the string that's being sent, and have the movie do stuff based on what string is being sent (if (string=="bla"){gotoAndPlay("bla");}.
View 5 Replies
May 21, 2009
I have a flash file that I made that displays a scrolling newsfeed (I'll call it newsfeed.swf)... I published it to an SWF. Now, I created a new flash file that I would like to use to show many instances of newsfeed.swf. In my new flash file, I have the following code:
this.onLoad=function(){
mcNewsfeed.loadMovie(http://www.whatever.com/newsfeed.swf?s=MSFT);
}
In theory, when newsfeed.swf starts up, the ?s=MSFT variable should be passed in at the _root level such that I should be able to reference it and build the newsfeed to be displayed dynamically. I've tried several different things, but no matter what I do, the following code (the _root.s part) in newsfeed.swf returns "undefined":
newsfeedURL = "http://finance.yahoo.com/rss/headline?s=" + _root.s
I would prefer to not have to pass XML files between the swf files or use system objects as that would add a level of complexity I'm not ready to deal with (I'm a total noob at this stuff)...
View 2 Replies
Aug 7, 2009
So, I read the tutorial about passing variables by changing the url of the .swf with the following code:
Code:
if (movie==1 or movie=="") {
trace("default");
}
[Code]....
My question is, is there anything special if I want it to respond to the url of a .php page? So, if I have a page that ends in "?page_id=2" could I do the same thing or does it have to be an .swf?
Code:
if (page_id==1 or page_id=="") {
trace("default");
}
[Code]....
View 2 Replies
Feb 25, 2010
i have even hardcoded in data and it wont pass through. i have 5 other variables that pass through and i cant get these other 2 to pass.
View 1 Replies
Jun 11, 2010
I have been trying to pass a variable to a SWF. From the research I have done it seems pretty straight forward, but I cannot seem to get it to work. I am wondering if it has something to do with the way the SWF is added to the HTML page. Would someone take a look at this for me?
[Code]...
View 2 Replies
Feb 14, 2008
I have a problem using a very simple URLVariables script with php.The thing is this sample do works on some servers and doesn't on other:Instead of having the correct values with trace, I get the php code itself.That means I get the following string in trace():[code]I know it comes from the php configuration on my server because I tested it on another server and it works, but I can't find what I must change in my php.ini file to get the good results in trace();
View 3 Replies
Mar 3, 2009
Ive got a script lined up:
Code:
onEnterFrame = function(){
if(aktiverPublisering == "true"){
function avpubliser(){
[code]....
Ive checked if "aktiverPublisering" traces "true", and it does (it declares "true" through a button)... So, here's the weird part...i cant get a trace inside the IF statement i.e. its not working...
View 2 Replies
Oct 20, 2009
how do I know if my flash form has sent its variables to asp? My code is:
onClipEvent (load) {
submit_btn.onRelease = function() {
emailform = new LoadVars();
emailform.var1 = var1.text;
emailform.var2 = var2.text;
emailform.sendAndLoad("form.asp",emailform,"GET");
}; }
I need to send the information as a query string to asp. Am I doing this correctly?
View 1 Replies
Dec 3, 2010
I've made [at least I'm trying to] a class that will make able to communicate flash with PHP [and MySQL].I've done this once before on the main time line and it worked perfect. This one is working as well but I get strange variables from PHP in Flash. Here are the codes:
[Code]...
View 1 Replies
Sep 14, 2008
What I have is a list of videos (FLV) and when I click on avideo name (button) I want the menu page to close, open anotherpage (the video interface page) and play the video that was chosen.I do not want the video to play on the menu page but on it's owninterface page. I am guessing I will need to save the String namein an outside file for the video class to grab. Once the video hasfinished playing I want to go back to the menu page.
View 13 Replies
May 13, 2010
I have a simple standalone application written in Visual Basic that I'm porting to a browser based application using PHP/javascript. The original VB application has some simple embedded flash games with token and point counters. The token and point values are being passed as variables between the application and the game.
I'm trying to achieve the same effect in my PHP port without modifying the actionscript code( using the variables in actionscript that already exist). Below is Visual Basic code that's loading a value from a database and posting that value to flash using FlashVars:
[Code]....
View 1 Replies
Aug 27, 2011
I have an image uploader that runs on a separate PHP script, and then updates the Preview Url after the file has been uploaded. But what I'd like to do is have a Flash SWF embedded in the same HTML that's running the PHP Uploader to get that Preview URL and display it in the Flash Application.
View 2 Replies
Mar 13, 2012
I am using UILoader to load a .swf file. My .swf file takes a querystring parameter, like myapp.swf?id=12344
Now, when I specify the source for the UILoader in the other project as "myapp.swf?id=12344", I am getting the following error: Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found.
I am trying to load an swf that takes some query-string parameters in another swf. I am loading UILoader to do that. How else can I do this so it will work?
View 1 Replies