Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








GET Variables Into Flash Movie


I'm building a flash movie that needs some state information passed to it- like a username. When the flash opens, I need this variable available to the flash.

I'm using a get statement in the html (mymovie.swf?user=eddie) which works in explorer, but not netscape. It has to work for all browsers, so no javascript.




FlashKit > Flash Help > Flash ActionScript
Posted on: 07-30-2001, 01:14 PM


View Complete Forum Thread with Replies

Sponsored Links:

Passing Variables From Loader Movie To Loaded Movie, Flash Satay Method
I like the Flash Satay method for its clean integration and standards-compliance, however there are still some things I can't manage the way I want to... I'm trying to implement a working method to pass variables from the loader movie to the loaded movie. As you may know, the Flash Satay method uses a small SWF file which uses a bit of code to load the desired movie, all in order to allow IE browsers to retain streaming capabilities when rendering Flash content through the <object> tag. Basically it's just a small file with the following AS2 code in the first frame:

loadMovieNum(path, 0);

This means the c.swf file is ENTIRELY replaced at level0 with the desired movie, and any variables that were passed to the loader movie turn to smoke.

I'm trying to generate a querystring using all other variables the loader movie receives, and pass that along with the filename for loadMovieNum. This seems to be working very well in most cases, but whenever there's a URL in the querystring (even URLEncoded), BAM, everything turns to lowercase... EVERYTHING... here's an example:

c.swf?path=banner.swf&myLifeSUCKS=true&Icantbelieve=ITSNOTBUTTER

this successfully loads banner.swf in place of c.swf, with the following correct querystring appended

banner.swf?myLifeSUCKS=true&Icantbelieve=ITSNOTBUTTER

If I try:

c.swf?path=banner.swf&clickTag=http://www.myurl.com/&ANOTHER=variable

this successfully loads banner.swf in place of c.swf, but I end up with lower-cased querystring (all of it!!):

banner.swf?clicktag=http://www.myurl.com&another=variable

what happens to my capital letters?? I need these to remain case-sensitive as there is no saying how the loaded movies are programmed. The generally accepted convention for "clicktag-enabled" banners is to use _root.clickTag as the link button's URL...

Even URL-encoding the URL doesn't change this

For reference, here's the HTML snippet and ActionScript 2 code I use:
---- html ----

<object type="application/x-shockwave-flash" data="c.swf?path=banner.swf" width="728" height="90">
<param name="movie" value="c.swf?path=banner.swf" />
<param name="FlashVars" value="clickTag=http://www.google.com/" />
</object>








Attach Code

----c.swf----

var queryString:String = "";

for (var i in _root){
if (i != "path" && i != "queryString" && i != "$version"){
if (queryString) { queryString += "&"; }
queryString += i + "=" + _root[i];
}
}

if (queryString != "") {
loadMovieNum(_root.path + "?" + queryString,0);
} else {
loadMovieNum(_root.path,0);
}

























Edited: 10/01/2008 at 10:40:48 AM by Inzoum

View Replies !    View Related
ASP Variables Into Flash Movie
Hi,

I have an ASP script that finds all html files in a folder. At the moment it reads the file names and outputs them as hyperlinks in html; what I would like to do is have the variables fed into Flash (e.g. file1 = \serversharedefault.html). How do I accomplish this?
Also, once I have the variables available to my flash movie I would like a dynamic listbox which can accomodate a varying number of variables and automatically accomodate but keep the same viewable area. And if that wasnt enough, each item in the list would act as a hyperlink!

Thanks for reading.

Rhys.

View Replies !    View Related
Get Variables Inside Flash 9 Movie With Action Script 3 Using Flash Selenium And Sele
Dear All,


I use Selenium RC and I want to do automated flash testing. I am using Flash Selenium.


Web Application has Flash content (SWF file) and is Version 9.0 and uses Action Script 3.0.


I cant use the functions like flashApp.Getvariable(varName) or flashapp.TotalFrames() as mentioned http://code.google.com/p/flash-selenium/


I see documentation and functions listed at ( http://www.adobe.com/support/flash/p...h/scriptingwit hflash_03.html functions for Flash 5 ), i cant use them . I get exception all the time.


I am trying to access the varibales in the flash movie which is loaded using GetVariable but Selenium throws an exception but no information message.


I want to ask can I use functions listed on above adobe site with Flash 9 movie with Action Script 3.0 ? If not is there any way to get variables inside Flash movie using Flash External Interface and Selenium RC ?


Best Regards !


/ Yogesh

View Replies !    View Related
URL Variables In Flash Movie Links
I have a flash movie on a cfm page. I passed URLvariables to it by
concatenating the string like this...
<EMBED src="trackingflash.swf?ID=#URL.ID#"

My problem is this...
I have links on the flash movie to which I have to append ?ID=#URL.ID#

eg.This is what I would do on a regular page
<cfoutput><A
HREF=http://localhost/nbtools/about.cfm?ID=#URL.ID#</A></cfoutput>

How do I get the variables(like shown above) on to the URLs within the flash movie?
I tried this and it did not work...
<A
>HREF=http://localhost/nbtools/about.cfm</A><CFOUTPUT>&?ID=#URL.ID#</CFOUTPUT>
>PS: I have a good knowledge of cfml but I'm a novice with flash.

Thanks in advance!

View Replies !    View Related
Variables - Persisting Across The Flash Movie
How do you persist variables within Flash?

I set a variable to a value within a timeline frame action.

I then want to use this variable value when clicking a button to decide what to do next.

Using the trace command to check the variable value just comes back to me with nothing. It does enter a blank line into the trace window but not a value.

Thanks

View Replies !    View Related
Storing Variables In A Flash Movie
To store a variable in Flash 4, is it a necessity to put it into a text field??

Will the movie just store the value *there* in the movie, rather than me having to create god knows how many text fields to hold them?

If that doesn't make sense, think of it as ASP or PHP scripting or something. You can have variables flying about but they aren't actually STORED anywhere - they just exist as abstract objects. Does Flash do this, or do I need a text field?

Ta,

Nick

View Replies !    View Related
Passing Variables From One Flash Movie To Another.
I'm sorry if this question has been asked before - I need to send 5 variables set in one flash movie, to another flash movie that will be viewed after it. Could someone point me to a tutorial or start me in the right direction to get this done?

Thanks much!
adam
http://www.thebadlans.net

View Replies !    View Related
Opening Flash Movie With Variables
Greetings All,

I'm working on a web app using flash for the user interface :cool. To get data in and out of the interface I'm using XML and that works sweet. My only problem is that I don't want to log the user in from inside flash, I want that to happen first, and then the users opens the interface. Can anyone suggest how I can pass the username into the flash movie when I open it?

Awesome and thanx heaps,
Zitan

View Replies !    View Related
How To Pass Variables To Flash Movie
I want to load movie with some variables
how can i do it by loadMovie("mymovie",0); command ?

Thank you

Eldar52

View Replies !    View Related
Pass Variables To A Flash Movie
1st, I'm not sure if is is really concerning ActionScript (maybe it is silly HTML)

How can I load a page with a flash movie, passing a pair of variables to the movie?

In other words, I've an ASP page, that get name and age, and put them in variables. After that, I'll jump to a page with a flash movie, and I want to get the two variables inside the flash.

Any help will be pleasant


ray

View Replies !    View Related
Sending Variables To Another Flash Movie?
Hi,

I need to be able to get some data entered by the user into a format for easy printing.

ie. five different input boxes with text in each.

I need to get the information into a page in portrait format.

Can i popup another flash movie in another window and send the variables to that?

or even send them to a html page?

If so, any help would be greatly appreciated.

Thanks in advance,


Ian

View Replies !    View Related
Saving Variables Outside The Flash Movie
I have a button which will set a variable.

But I need that variable to be set permanently so that even if the flash movie is reloaded into a new browser (because the flash movie is being used on many different html pages) the movie can access that variable and "reset" itself to whichever choice the user made.

Any ideas?

View Replies !    View Related
Pass Variables From One Flash Movie To Another
Hi,

I need to find a method of passing a single variable from one flash movie to another, I have read up briefly on this subject but have only found methods of retrieving variables.

Basically, I have a swf with a number of buttons which call upon the corresponding URL containing the new swf when pressed. The problem is, I want a standalone preloader swf before the new swf loads, and rather than create lots of separate preloaders for each new swf, it would be nice if i could create just the one preloader, with the variable of the desired swf being passed to the preloader.

I'm sure this is possible, but if someone could get me started I would be very grateful!

Thanks, Steve.

View Replies !    View Related
How To Pass Variables To A Flash Movie?
Hello guys, I have a question regarding work with variables.

Now, the base of what I'm doing is php scripting. Among other things I want to pass some variables to a flash movie. So I have a script A that passes some variables to a php script B that has a flash movie included. I want that flash movie to pick up values of those variables.

I'm not sure what's the best way to do it and how it should be properly done to exclude any possibility of an error. Is the best way to do it, passing the variables through the URL? So I call "scriptB.php?somevariable=somevalue" in my script A or are there other options?

I'm really not sure how to read those variables in flash. I know functions like loadVariables, but that's loading an entire URL, ain't it? What I would like is for flash just to receive the variable & value pairs that were send to the script B that's holding the flash movie?

I hope it makes sense. Thank you for help.

Regards,

Airnine

View Replies !    View Related
How I Can Get The POST Variables In My Flash Movie
Hi everyone, i need to get the POST Vars in my Flash Movie.
I have 2 frames:
1. topFrame (topFrame.htm) = Contents a Flash Movie called MENU
2. mainFrame (mainFrame.htm) = Contents de Flash Movie called MAIN

I Call a MENU Movie by MAIN Movie like this...
getURL("topFrame.htm?myvar=abc", "topFrame");

In the MENU Movie I want to detect the variable MYVAR an use the data ABC, how can i do this?

Regards.

View Replies !    View Related
How I Can Get The POST Variables In My Flash Movie
Hi everyone, i need to get the POST Vars in my Flash Movie.
I have 2 frames:
1. topFrame (topFrame.htm) = Contents a Flash Movie called MENU
2. mainFrame (mainFrame.htm) = Contents de Flash Movie called MAIN

I Call a MENU Movie by MAIN Movie like this...
getURL("topFrame.htm?myvar=abc", "topFrame");

In the MENU Movie I want to detect the variable MYVAR an use the data ABC, how can i do this?

Regards.

View Replies !    View Related
How I Can Get The POST Variables In My Flash Movie
Hi everyone, i need to get the POST Vars in my Flash Movie.
I have 2 frames:
1. topFrame (topFrame.htm) = Contents a Flash Movie called MENU
2. mainFrame (mainFrame.htm) = Contents de Flash Movie called MAIN

I Call a MENU Movie by MAIN Movie like this...
getURL("topFrame.htm?myvar=abc", "topFrame");

In the MENU Movie I want to detect the variable MYVAR an use the data ABC, how can i do this?

Regards.

View Replies !    View Related
Passing PHP Variables Into Flash Movie?
I created a mysql database which stores page content.
Then created a php page for a user to change that page content.

My next step is to get that page content from the database into a textarea of a Flash movie (page)

So I have a php page that reads the database and takes an array passing the data into a variable.

I need to pass the variable into my flash movie now and have the textarea display its string content.

Any help would be greatly appriciated.

Patrick

View Replies !    View Related
Passing Variables To Flash Movie
i discussed this in another forum that went dead and off topic, i still haven't solved my issue.

i have a movie with is loaded with a preloader, an animation, and last frame is the final layout with a menu. what i'm trying to do is on the index page i want the movie to play from start to finish. on pages after that other links of the website, i want it to go straight to the last frame, WITHOUT reloading the movie into cache again.

So far i've done this with a variable passed to the movie, (movie.swf?isIndex=1), the movie checks if this is set to value 1, if so gotoAndPlay(lastFrame);

and this works, because on index it plays the whole movie when, on pages i've given it that isIndex value, it goes to the lastFrame frame label, BUT it reloads the entire movie again. (because it detects another variable value and things it needs to reload the whole movie)

my problem: how do i tell it different? how can i make this movie load once, and on different pages, make it play from last page.

PS: anchor doesn't work.

View Replies !    View Related
Passing Variables From A Flash Movie
I was wondering if any one knew how to pass variables from a Flash movie to an HTML page or PHP page. I am looking for that code.

View Replies !    View Related
Passing Variables From A Flash Movie
I was wondering if any one knew how to pass variables from a Flash movie to an HTML page or PHP page. I am looking for that code.

View Replies !    View Related
Passing Variables From One Flash Movie To Another..?
Hi there,

I have two flash movies, both are timelines one is the full version of the timeline and the other is a small timeline movie that only has a few dates on it.

I want to be able to allow a user to click on a date from the small timeline and be taken directly to the information for that particular date in the main timeline.

Is this possible? Can I use variables or something along those lines.

before you ask, NO the two movies cannot be combined into one movie because of the need to embed html and static content around the mini timeline!

Any help would be appreciated!

Thanks everyone!

View Replies !    View Related
Passing Variables To A Flash Movie - Possible ?
HI

this is prob. a stupid question but here it is:

is it possible to pass variables to a flash (5.0) movie ?

the task is to have a flash movie that does a fade-in of some kind of sub-head for a web-site. for 50 pages, i dont want to make 50 flash movies - only one wich takes the text to display as a variable , and displays it fading in.

thx in advc, red.z

View Replies !    View Related
Passing Variables From A Php Script To A Flash Movie ?
Hi all,

I am trying to pass a variable from a php script to a flash movie without success. Can anyone help ?

the php script retrieves the variable from a database. When I 'echo' the contents of that script the variable has been successfully retrieved from the database.

At the end of the php script I have the line:-
print "text=$text";
this outputs:-
text= whatever the content is

In the flash movie I have the following action attached to the first frame:-

loadVariables ("http://www.whatever/Anthony/received.php", "_root.text", "GET");
stop();

I have a dynamic textfield called text.

WHY WILL IT NOT LOAD THE VARIABLE TEXT INTO THAT FIELD????
When I use a textfile the variable passes accross no problem.

Any help would be greatly appreciated. thanks.

View Replies !    View Related
Passing Variables From Html To Flash Movie
Hi,

When I load my game I want certain variables to be automatically passed to it. The movie is embedded into a html page created by asp, so the variables will be passed into the html easily. I just don't know how to get them from the html to the Flash.

I realise that once loaded I could use loadVariables to make an asp call, but in this case the asp has created the html page containing the variables to start with and I just want to read them in.

Hope this makes sense and somebody out there can help!

Thanks

Andy B

View Replies !    View Related
Permanently Storing Variables In Flash Movie Possible?
is it possible to permanently store variables in a flash movie, so even though someone writes them, everyone that goes on the page will be able to see then? I'm trying to create an updatable news section in my flash movie.

View Replies !    View Related
Problem Loading Variables In Flash Movie
I used both Flashvars and the older method (file.swf?var=myvariable) to use variables in my flash movie. The variables are passed correctly to my movie. Depending on the variable given, the flash movie displays a specific frame. Sometimes this doesn't work out, because the swf loads faster than the html containing my variable, resulting in displaying the wrong keyframe. Any ideas for solving this problem?

View Replies !    View Related
Help With PHP Variables Sent Back To Loaded Flash Movie
Hi,

I'm trying to get a guestbook in flash working, and I currently have my guestbook.swf file load into a target in my main flash movie. Then, guestbook.swf uses loadVariablesNum to talk with a PHP script. This all works fine, but when the PHP script tries to print back to Flash, the variables go to my main flash movie, and not guestbook.swf

I can't figure out any way to get the variables to guestbook.swf. Any suggestions?

-Laura

View Replies !    View Related
Loadinv Variables Dor Customize Flash Movie
I am a .Net developer and i have to implement a Socket conexion in a flash page. I dont know S... about flash and my web designer knows nothing about programming so it kinda hard.I already make the socket work like a charms but i I have two problems now..
1) I dont know how i can pass value to the flash from the page , i dont know if flash can read info from the http header (like querystring or form in asp and stuff) or if its there another way.
2)it seems that i have to include something else into the swf cause the xml socket it only work if the machine have the Flash installer and not in machines with the flash player only..
Anyone can help me on this one??
thanks
VJS

View Replies !    View Related
Pass Variables Into Flash Movie Via Javascript
Hi,
I'd like to know of any (if any) way for me to pass 2 values into a flash movie (actionscript variables). My flash movie is supposed to generate some slogan based on the 2 variables passed by Javascript. Thanks.

View Replies !    View Related
Passing Variables To A Flash Movie, Without Embed Tag.
Can someone help me? I would like to pass a variable to a flash movie. Back in the day using the embed tag you could pass a variable to a movie easily (relativily) eg:

<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase=""http://macromedia.com/cabs/swflash.cab#version=6,0,0,0""
WIDTH="250" HEIGHT="250" id="flaMovie1" ALIGN="CENTER">
<PARAM NAME=movie VALUE="flaMovie1.swf">
<PARAM NAME=FlashVars VALUE="imageFilename=image.jpg">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<embed src="flaMovie1.swf" FlashVars="imageFilename=image.jpg"
quality="high" bgcolor="#FFFFFF" WIDTH="600" HEIGHT="800"
NAME="flaMovie1" ALIGN TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</OBJECT>

Unfortuantly i can't use that any more because IE will block it as "Dangerous Active X content --- Danger Will Robinson DANGER!"

Fortunatly Kirupa, and his wonderfull web site were able to lend a hand (http://www.kirupa.com/developer/flash8/flash_fix.htm)

producing the following code:

<script type="text/javascript" src="flashobject.js"></script>
<div id="flashcontent" style="width: 800px; height: 600px"></div>
<script type="text/javascript">
var fo = new FlashObject("/flash/ImageHolder.swf", "animationName", "800", "600", "8", "#FFFFFF");
fo.addParam("allowScriptAccess", "sameDomain");
fo.addParam("quality", "high");
fo.addParam("scale", "noscale");
fo.addParam("loop", "false");
fo.write("flashcontent");
</script>

How in the name of chunky cheese am i meant to pass a variable to a move clip in that? can anyone help me?

View Replies !    View Related
Passing Variables Via POST From A Flash 9 Movie
How would I do this? ANY tips or explanations appreciated.

View Replies !    View Related
Loadinv Variables Dor Customize Flash Movie
I am a .Net developer and i have to implement a Socket conexion in a flash page. I dont know S... about flash and my web designer knows nothing about programming so it kinda hard.I already make the socket work like a charms but i I have two problems now..
1) I dont know how i can pass value to the flash from the page , i dont know if flash can read info from the http header (like querystring or form in asp and stuff) or if its there another way.
2)it seems that i have to include something else into the swf cause the xml socket it only work if the machine have the Flash installer and not in machines with the flash player only..
Anyone can help me on this one??
thanks
VJS

View Replies !    View Related
Pass Variables Into Flash Movie Via Javascript
Hi,
I'd like to know of any (if any) way for me to pass 2 values into a flash movie (actionscript variables). My flash movie is supposed to generate some slogan based on the 2 variables passed by Javascript. Thanks.

View Replies !    View Related
Flash Movie Showing Variables From The PHP File Containing It
I want a Flash movie to use PHP variables that exist in the very same PHP file that also displays the movie. In the same way PHP can produce HTML to display variables, I want it to show a Flash movie with variables.

So it's the opposite of using loadVars with loading a PHP file inside the Flash movie. I want it to use variables in the PHP file that contains that movie.

View Replies !    View Related
Passing Variables To Flash Movie Without Reload?
Hi All,

Is it possible to pass variables into a Flash movie, and have the movie recognize this passing and do something, without reloading the page?

Specific example:

Let's say I have a simple Flash movie that displays a static logo, and then next to the logo there's a dynamic text field that displays some text - for simplicity let's say a city name.

So when you first load the HTML page, there's the Flash logo and a default value in the dynamic text field.

Then somewhere in the HTML portion of the page there's a link/Javascript/AJAX bit which, when clicked, passes a new value for that text field - in our example, a new city name.

Is there a fairly straightforward way to do this? Any help/guidance would be awesome!

Thanks.

View Replies !    View Related
Returning Variables From Perl/cgi To Flash Movie?
Does anyone have a clue as to how this is done? I know that perl is a preprocessor, so it will run through the program and get all the variable values before it loads the flash movie, but how would I go about passing the variables from the perl script to the flash movie?

Is this a question more suitable for the perl forum? I'm thinking of posting it in there as well.

View Replies !    View Related
Sending Variables To Active Flash Movie
I have a webpage with two frames, the swf in the left and the php page in the right. i need to send a variable to the swf so that future url calls from the swf are encoded with specific variables. Basically I need the swf to load different variables depending on the variables it is sent.

Can this be done. I can do it with sessions and just get flash to call a generic page and include different files by calling session variables. The problem is I cant carry variables via URL encoding because the flow is:

Load PHP page>load next page from Flash (this page needs to load from variables sent from the initial php page)

Thanks

View Replies !    View Related
Sending Paired Variables To Flash Movie From HTML
Hi,

Is there a limit to the number of paired variables you can send to a flash movie from HTML using this code:-

<embed src="nav.swf?start=0&goto=3"> </embed>

????

The flash movies don't seem to pick up the variables!!
Although if I only have one named pair then the movie picks it up....

Any help please???

Cheers.....;-)

View Replies !    View Related
How To Send Variables From A Link In A Browser To A Flash Movie
I want that every time i click a link in a html page send me to a specific frame and scene in a flash movie.

Thanks

View Replies !    View Related
Can I Resize A Flash Movie To User Defined Variables?
Hi Everybody,

I'm using Flash MX. I'm looking for a way to resize a flash movie from within flash, using a X and Y variable. So far I can figure out how to scale a movie to fit a screen, but not to a specific number. Anyone have any idea as to how I would go about doing this?

-Plasnid

View Replies !    View Related
Load Query String Variables Into Flash Movie
I am trying to load a variable from an HTML query string into my flash movie to load the appropriate movieclip. However, everything I've tried to do is not working... I must be doing something wrong.

My query string in the HTML file looks like this:
<param name="movie" value="components/flash/Navi.swf?navi=home" />
<embed src="components/flash/Navi.swf?navi=home"></embed>

Now, I placed a dynamic text field (temporarily) to make sure my variable was loading- which it does; I just can't seem to use the variable the way I want to.

My goal is for the variable 'navi' holding the data 'home' to control a movieclip in my movie. So if it was "Navi.swf?navi=about" then the movieclip would goto the "About Us" section of the movie.

I tried using this Actionscript:
if(navi == home){
_root.movieclipMC.gotoAndPlay("home");
}
}

if(navi == about){
_root.movieclipMC.gotoAndPlay("about");
}
}

if(navi == home){
_root.movieclipMC.gotoAndPlay("contact");
}
}

What am I doing wrong? Thanks!

View Replies !    View Related
Flash Movie, Microsoft Visual Basic And Variables?
Hi,
we have been using flash animation running in the flash OCX in applications created in Microsoft Visual Basic for a while.

We set variables in the movie with VB.
Can we read the from the movie with VB?

its kind of urgent, any tips or links to resources greatly appreciated

Using Flash 8 pro, flash8 ocx, VB6

mark

View Replies !    View Related
Help, Trying To Pass Variables From A Flash Movie To Html Using GetURL
here's an example of the code i am using (it's for a banner that lets you select a few dropdown options):

//concatenates the variables in my movie to the url
_root.urlvar=("http://www.examplesite.com/page.html?var1="+_root.variable1+"var2="+_root.var iable2);
//opens the url in a new browser window
getURL (_root.urlvar, "_blank");


The problem i am having is that IE and Firefox block this. Is there a way of getting around the security without changing browser settings?

View Replies !    View Related
Load Query String Variables Into Flash Movie
I am trying to load a variable from an HTML query string into my flash movie to load the appropriate movieclip. However, everything I've tried to do is not working... I must be doing something wrong.

My query string in the HTML file looks like this:
<param name="movie" value="components/flash/Navi.swf?navi=home" />
<embed src="components/flash/Navi.swf?navi=home"></embed>

Now, I placed a dynamic text field (temporarily) to make sure my variable was loading- which it does; I just can't seem to use the variable the way I want to.

My goal is for the variable 'navi' holding the data 'home' to control a movieclip in my movie. So if it was "Navi.swf?navi=about" then the movieclip would goto the "About Us" section of the movie.

I tried using this Actionscript:
if(navi == home){
_root.movieclipMC.gotoAndPlay("home");
}
}

if(navi == about){
_root.movieclipMC.gotoAndPlay("about");
}
}

if(navi == home){
_root.movieclipMC.gotoAndPlay("contact");
}
}

What am I doing wrong? If anyone is able to IM I would appreciate the help... my AIM is barabics. Thanks!

View Replies !    View Related
RE: Part 2: Sending Variables From A Flash Movie To A PHP Script, And Then Using That
Can anyone tell me how to get a line break on the $Message variable so that the $Name and $Email will appear on different lines?

<?

// Recieving and Creating Variables...
$Name = $_POST['name'];
$Email = "josh@williamsfp.com";
$Message = "$Name" ./n. "$Email";
$Subject = "New Web Lead";
$Header = "From: $Name <$Email>";


//Performing Mail script...
mail($Email, $Subject, $Message, $Header);

?>

View Replies !    View Related
Part 2: Sending Variables From A Flash Movie To A PHP Script, And Then Using That PHP
I'm having trouble with this previous posted tutorial. I followed the instructions step by step but it just didn't work for me.

In the PHP Script I replaced this line:
$Email = $_POST['email'];

With this line:
$Email = "my@email.com";

So I know the problem isn't there. I have recorded 1min.11sec screen shot video of exactly what I did. If anyone can check it out and let me know what I did wrong I would greatly appreciate it. Click her for the screenshot video.


************************************************** ****************
Part 2: Sending variables from a Flash Movie to a PHP script, and then using that PHP script to send an e-mail.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Ok, this is basically a combination of the post above, and this thread that I created the other night about using the mail() function: Click Here!

Since most of this is already explained in those two posts, this section of the tutorial is going to be small because it serves only as a link between those two. Here we go!

Flash Set-up

The only difference between this file and the file before is the script for the button. You set everything up the same way. Create the input text boxes and give them a suitable name. I gave my three input boxes the names "name", "email", and "message".

The code on the button changes a little because now, we don't want to open another page. We just want the e-mail to be sent when the user clicks the Flash button. So, we won't be using getURL() but instead we will use loadVariablesNum(). The code looks like this:

ActionScript Code:
sendButton.onPress = function(){
loadVariablesNum("mailTut.php", 0, "POST");
}



this takes the variables from level "0" and sends them to the script contained in "mailTut.php" using the "POST" method.

PHP Set-up

Now, if you read thru those other two posts that I showed you, then you should have no problem understanding the rest of this post. If you didn't read thru them, then you still won't have a problem because its very simple. Here is the code:

PHP Code:
<?

// Recieving and Creating Variables...
$Name = $_POST['name'];
$Email = $_POST['email'];
$Message = $_POST['message'];
$Subject = "Test E-mail Tutorial";
$Header = "From: $Name <$Email>";


//Performing Mail script...
mail($Email, $Subject, $Message, $Header);

?>
The first 5 lines of code are "Recieving and Creating Variables". This recieves the variables from the Flash movie and then creates the Subject and Header variables to be used in the mail() script.

The mail() script is then executed. I already explained all of this stuff in the other tutorial that can be found here: Click Here

Ok thats its for this one.

[edit]Sorry, I had to take out the script in action link because the server that the script was set up on was taken down.[/edit]
Cheers,
Jubs

View Replies !    View Related
Flash MX Problem Addressing Variables In Duplicated Movie Clips
Help!

I'm having problems sending variables into duplicated movie clips. I'm using Flash MX.

The source variables are in the main timeline, as is the original source movieclip, which is not an external swf, it is inside the main movie. The data loads in from a textfile, and has a variable at the end to prevent anything happening until its finished loading.

e.g.
totalpeople=3&
&
entry1name=derek&
entry1age=34&
&
entry2name=steve&
entry2age=32&
&
entry3name=johanna&
entry3age=34&
&
loaded=yes


Now here's the catch

I have a loop which generates copies of a movieclip, these are called person1, person2 etc

after creating each - the script then needs to set variables within each one based on the text file values already loaded (see above).

Each duplicated movie clip has variables inside it called;
name
age

so a sub loop attempts to set the values within the duplicated movieclip

for (item=1;item<_root.totalpeople+1;item++){

//address mc object first to have its variables set
thetarget="_root.person"+item;

//what is value from _root to put into mc?
thevalue="_root.entry"+item+"name";

//change the variable
changeitc.(eval("thetarget.thevalue"));

// and so on for the other variables

}


It seems to have problems with the . after the "changeitc.(eval" part of the code.


I have even tried to address the whole thing with one eval statement:

thevalue= "_root.person"+item+".name="+"_root.entry"+item"+" name";
changeit=eval(thevalue);

But still nothing happens... and before you ask - yes, the characters are embedded in the dynamic text fields inside the original "person" movieclip that is duplicated.

Anyone have any ideas why either of these approaches arent working?

Regards

Derek

View Replies !    View Related
Xml Variables' Paths In A Loaded Movie Via Movie Cliip Loader
Okay, I found 3 different .fla files:
1] an XML photogallery [including image, thumbnails and title & description]
2] a Navigational type file [when a button is pressed, the screen moves to that section, set by x & y coordinates, with friction]
3] a file featuring loading multiple external .swf's into specific movie clips [movie clip loader, instead of loadMovieNum]

All the files work fine independently.
I put the actions of the movie clip loader into "navigation-1.swf".
The movie clip loader calls "gallery4.swf" and places it in a movie clip deep navigation-1.swf.

Gallery4.swf loads almost loads fine in navigation-1.swf; the images and thumbnails show, but the title and descriptions do not.

a] It might be the paths in gallery4.swf. I read the tutorials in paths/advanced paths from actionscript.org. I tried applying it in the code. Still I'm not sure if this is it. So, I went to investigate the movie clip loader script and thge navigation-1.swf file.

b] I was thinking the problem was the navigation-1.swf. I tried something to test that out. I called the gallery4.swf using loadMovieNum into level1. Everything in the gallery showed up, images and text. So now, I'm thinking it's not the navigation-1.swf that's giving me a problem. I think it's the movie clip loader script that might be playing games with me.

The only reason why I'm set on using the movie clip loader to load gallery4.swf into navigation-1.swf is because I like the effect of everything on the stage moving; this is accomplished when gallery4.swf is loaded in a particular movie clip in navigation-1.swf.

Can anyone help me out with this one? I'm okay with flash [that's stretching it], but you guys/gals are the gurus!!!!

Here's a link to view navigation-1.html, the file that calls gallery4.swf

Here's a link to just view gallery4.swf

Here's the .zip of the files involved.

Mind you the visuals aren't done yet, I'm still trying to figure the functional part, hopefully!!! AAAAA

Hope your brains' are sharp tonight because I think mine has worn as my eyes tonight!!!

Thanks,
upp'ed to motrin5xaday for tonight...

View Replies !    View Related
Swapping Movie Clips With Variables And Just Playing A Friggin' Movie..
Ok i am trying to do 2 very simple things..

i just want to jump to frame 2 of this movie called solotab just when the movie first runs..

Then i want the clickable tabs to enlarge - move to the edge and replace each other and for this there are the variables current and currenttab to store the respective instances to be targetted.

I don't know why it doesn't work as the target path is correct and the variable is correct - the trace action shows this..

with your help i could become cleverer..the file is on this thread - http://www.kirupa.com/forum/showthread.php?t=217591

Si

View Replies !    View Related
Xml Variables' Paths In A Loaded Movie Via Movie Cliip Loader
Okay, I found 3 different .fla files:
1] an XML photogallery [including image, thumbnails and title & description]
2] a Navigational type file [when a button is pressed, the screen moves to that section, set by x & y coordinates, with friction]
3] a file featuring loading multiple external .swf's into specific movie clips [movie clip loader, instead of loadMovieNum]

All the files work fine independently.
I put the actions of the movie clip loader into "navigation-1.swf".
The movie clip loader calls "gallery4.swf" and places it in a movie clip deep navigation-1.swf.

Gallery4.swf loads almost loads fine in navigation-1.swf; the images and thumbnails show, but the title and descriptions do not.

a] It might be the paths in gallery4.swf. I read the tutorials in paths/advanced paths from actionscript.org. I tried applying it in the code. Still I'm not sure if this is it. So, I went to investigate the movie clip loader script and thge navigation-1.swf file.

b] I was thinking the problem was the navigation-1.swf. I tried something to test that out. I called the gallery4.swf using loadMovieNum into level1. Everything in the gallery showed up, images and text. So now, I'm thinking it's not the navigation-1.swf that's giving me a problem. I think it's the movie clip loader script that might be playing games with me.

The only reason why I'm set on using the movie clip loader to load gallery4.swf into navigation-1.swf is because I like the effect of everything on the stage moving; this is accomplished when gallery4.swf is loaded in a particular movie clip in navigation-1.swf.

Can anyone help me out with this one? I'm okay with flash [that's stretching it], but you guys/gals are the gurus!!!!

Here's a link to view navigation-1.html, the file that calls gallery4.swf

Here's a link to just view gallery4.swf

Here's the .zip of the files involved.

Mind you the visuals aren't done yet, I'm still trying to figure the functional part, hopefully!!! AAAAA

Hope your brains' are sharp tonight because I think mine has worn as my eyes tonight!!!

Thanks,
upp'ed to motrin5xaday for tonight...

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved