ActionScript 3.0 :: Passing Variable To A SWF On Separate HTML Pages?

Sep 3, 2009

i have a flash file created in AS3, let's call it file1.swf it contains a variable.. we will call this testVariable file1.swf is embedded inside file1.html file1.swf reaches a point where it needs to load a new swf file that we will call file2.swf file2.swf is done in AS2. file1.swf simply calls file2.swf by calling a new HTML file that embeds file2.swf

So file1.swf calls

var targetURL:URLRequest = new URLRequest("file2.html");
navigateToURL(targetURL, "_self");

I need file2.swf to have access to testVariable.

View 4 Replies


Similar Posts:


ActionScript 2.0 :: FMX: Passing Variables Between Flash Movies On Different Html Pages?

Feb 21, 2003

Does anyone know of a good way to pass variables between flash movies on different html pages? Should I use a flash cookie? pass the variables in the URL of the html file and then try to get them back out on the next page?

View 3 Replies

Professional :: Passing Input Text To Separate HTML Page?

Apr 1, 2010

I have a single text input box in a flash form that i would like to show up in a particular area on a separate html page.

View 3 Replies

ActionScript 2.0 :: Load Different Html Pages From A Swf File With Out Refreshing Html Pages

Oct 6, 2009

I have created a website with one flash animation banner.The banner .swf has 5 menus. Each menu goes to different movieclips inside the .swf file. and at the same time i want to load the corresponding html file when i click the menu button and place the html content into the bottom area of the main html page without refreshing the html page.

View 2 Replies

Php :: Passing Variable FROM Flash To HTML?

Mar 7, 2011

I have a rather simple flash application users can make a quick username when connected, and the username is created inside the flash swf.

Now, I have a cron job deleting inactive usernames every ten minutes (on my mysql database where these usernames are all stored and accessed by the other people online) which is fine. But it can still get cluttered up if a bunch of people sign off at once, there is still that 10 minute window before the cron job clears them.

The users have an option to click log out in the flash application which is fine and works great. But of course many choose not to click log off they just click the browser x.

I've looked into onbeforeunload and jquery's .unload but I still need a way to get the username variable that's IN flash INTO the HTML, then use a php script to run the delete username mysql query.

If not, any insight on how I might pass the username variable to the html to hold onto it after the user makes their username so it can be involved with the .unload function running the php script?

EDIT::::: Maybe is there a way to create a UNIQUE string of numbers with php then pass that var to flash to include with the mysql row then since i already have that var since it was created on the html side, just along with the unload, have it delete the row that has that unique id?

If anyone things this idea would be the best approach, and if i used something like md5(uniqid(microtime()) . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']) to make a random iD how could i go about storing the result in a var i could place in the flash vars param then again in the jquery unload or javascript onbeforeunload if that would be better .

View 2 Replies

ActionScript 2.0 :: FMX - Passing Variable From HTML To SWF?

Mar 18, 2004

I've been trying - with absolutely no success - to pass a variable from an SWF on an index page to an SWF on the next page (in this case home.asp). I am using the following method:

In the index page when a menu button is clicked I pass the value in the string
[AS]getURL("home.asp?jumpTo=aboutus", "_top", "GET");[/AS]
Then on home.asp I drop the value into the SWF link (both the object and embed tags):
myswf.swf?jumpTo=<%=request.querystring("jumpTo")% >

In the SWF I then attempt to use the value of "jumpTo" like this:
(this is on the first frame of the SWF)
[AS]if(jumpTo==aboutus) {
_root.button4.gotoAndStop(10);
_root.header.attachMovie("aboutID", "attachedAbout", 1);
getURL ("aboutus.html", "site");
}

There are 11 possible values for "jumpTo" and I have a similar "if" statement written for each one. i know the value is being passed from the original SWF to home.asp because when I request the querystring it gives me the correct value. it's obvious that the SWF embedded in home.asp is not receiving the value. Do I need to declare the variable first? Should I use a global variable? is it possible to set up a dynamic variable in the flash movie?

View 3 Replies

ActionScript 3.0 :: Passing A Simple Variable From Html?

Jan 23, 2010

I use an swf file to play short flv files on a web page. I write the embed/object tags into a dynamic web page using php and understand how to pass the relevent parameters to the swf file. As a complete flash scripting dummy, I don't know how to get the variable into the flash script or how to use it once it is there. At the moment I create a new swf file for each movie I want to display and write the file name into the script as below. how to get the file name into the script below using FlashVars or a query string in the html.

// Create a NetConnection object
var netConn:NetConnection = new NetConnection();
// Create a local streaming connection

[code].....

View 3 Replies

IDE :: Load Swf By Passing Variable From HTML Page?

Sep 14, 2009

I have a main swf movie.....in which i want to load another swf by passing variable from html page

.
.
.
.
.
in flash 8 in as2

my code is that....

var topnavigation = _root.topnavigation; // Will load top navigation.swf
drop.loadMovie(topnavigation);

View 4 Replies

ActionScript 2.0 :: [FMX] Difficulty With Passing Variable From HTML To SWF

Mar 18, 2004

i've been trying - with absolutely no success - to pass a variable from an SWF on an index page to an SWF on the next page (in this case home.asp). i am using the following method: in the index page when a menu button is clicked i pass the value in the string

[Code]....

View 3 Replies

ActionScript 3.0 :: Passing Dynamic Variable From Html To Flash

Jun 6, 2011

I know this is pretty simple but all that I have read doesn't make much sense to me. I have one swf calling another swf that I have embedded into an htnl. In other words just calling another html page in a seperate window. In one.swf (runing in broswer) I use the below to call another html page passing the variable NewLessonArray. This contains an array of completed chapters.

[Code]...

All that is returned that I can see is object Object. But since I am passing on a address line into another swf embedded in a html page I am unable to determine that correct syntac for retrieving the information.

View 6 Replies

ActionScript 3.0 :: Passing Variable From Flash To HTML Form?

Oct 16, 2009

An AIR application that load an html page which contain some forms. I want to pass values from flash to html and then submit data. Don't suggest other possible variants, i have experience using URLLoader, amfphp, blazeds e.t.c. Idea it's to pass that from flash to html form, and then submit that information to server using html page. How can be do that? Or maybe in an web application (not desktop)?

View 2 Replies

ActionScript 2.0 :: Add Flashvars - Passing Variable / File Name In Html / Php

Oct 9, 2009

I m passing variable/ file name in html/ php like this

[Code]...

View 2 Replies

ActionScript 3.0 :: Passing Html Text When Php Send Variable To Flash

Dec 5, 2010

i'm having a problem when php send variable to flash for example ("notlogged") , it's being send like that :

[Code]....

i know i need to convert it to htmlText but i can't find a way to do that

View 3 Replies

CS3 Loading New Pages From Separate .fla's

Jul 23, 2009

I am trying to do something pretty basic I think...I have attached a screenshot below of what the site looks like so far. What I want to do is always have the left hand side links showing on the site. I want to create a new .fla for projects and have that load on the window on the right when the projects link is clicked on. What I have done in the past is create the entire website within one .fla but that is getting too confusing. I assume some actionscript is required here which I am pretty useless with.

View 21 Replies

Flash Pages Given Separate Urls?

Nov 17, 2009

im trying to find info about giving sections of my flash websites different urls.[URL]How do i code it so that a url can take me to a section of a flash website?

View 3 Replies

ActionScript 3.0 :: Tweening Menu - Sliding MovieClips Instead Of Separate Pages

Dec 8, 2010

I'm making a menu system that uses sliding movie clips instead of separate pages - [URL]. But when you click on the 'study at UWS' button, the nested slider kind of goes nuts, until you press on of the side buttons.

View 1 Replies

ActionScript 3.0 :: Making A Menu System That Uses Sliding Movie Clips Instead Of Separate Pages?

Dec 8, 2010

I've been trying to find a solution to this for a while, but I haven't had any luck.I'm making a menu system that uses sliding movie clips instead of separate pagesbut when you click on the 'study at UWS' button, the nested slider kind of goes nuts, until you press on of the side buttons.

View 3 Replies

Html :: Flash - Play A Background Audio Across Multiple HTML Pages.?

Nov 17, 2010

Is there a solution to have the background audio/music play across multiple page on a website, WITHOUT restarting on every page load.The website currently uses a frameset, but I'm looking for an alternative.

View 2 Replies

Flash :: Html - Create HTML Pages Using AMFPHP (on Server)?

Jan 10, 2010

I have AMFPHP installed on my server. I have a flash app that can call it's methods. I want to create some HTML (on server created) pages which will contain HTML code and results of AMFPHP functions. How to create such thing?

View 1 Replies

ActionScript 3.0 :: Controlling Sound Of Separate Html Files Within Same Html Page

Sep 11, 2010

I need to allow users to preview audio files for purchasing. I have CF pages that return records form a SQL database. Each record contains the same swf file however, each swf file points to a different mp3 for previews of different audio examples. So far, everything is working fine. My problem is that I need to be able to stop the sound from one swf when I click to play a second swf .The only solutions I see in Flash forums deal with loaded swf files. These are not loaded files they are separate files within a page. The question is: How do control one swf from another swf in the same page.The following items have not worked: soundChannel.stop();,soundMixer.stopAll()

View 2 Replies

ActionScript 3.0 :: Defining A Variable As 2 Separate Things Depending On Other Variable?

May 4, 2011

I'm making a platform game where all of my level components (ground, background etc.) are within an array called 'levelArray' so I can move all the elements the same amount at the same time. I'm just starting to implement my second level, and I need to change 'levelArray' to contain different level elements. I've tried to put an 'if' statement to change the definition of the variable:

[Code]...

View 3 Replies

ActionScript 2.0 :: Passing Vars Between 2 Separate .swf Files?

Jan 6, 2007

- in the parent.fla i created a dynamic txt box and var String named 'txt', this initialises the dynamic text box content to say "parent value".

- in the child.fla i tried to assign and send a new string value i.e. "child value" to 'var txt' which in found within parent.fla. At this point if everything was to work fine the dynamic txt box in parent.fla should output "child value".

View 4 Replies

Flash :: Passing Arguments Into A Function Located In A Separate File?

Jun 24, 2011

I'm an AS3 noob who is trying trying to get more comfortable with passing arguments into functions.why when the following code is all in one AS3 file as seen below it works and draws the purple square...

package{
import flash.display.*;
public class Main extends Sprite{[code]............

Flash CS5 gives me an error message 1137 saying that it was expecting only 1 argument in the code line --> Fill(square_commands, square_coord);I need to pass the arguments square_commands and square_coord into the function in the second AS3 file?

View 2 Replies

ActionScript 2.0 :: Passing HTML Form And Hidden Variables From Flash To Html Page

Dec 3, 2003

I have a html/flash site now, [URL]. i access email from my site itself by giving the userid and pwd text box which i copied from the actual website hosting my email access. i copied the entire <form...></form> tag to my page and thus was able to put the name and pwd in my home page only and access the email in a separate window. now i have redesigned my webpage using only flash. i would like to know how i can implement the same using flash. as i have not much experience using action scripting i am a bit stuck about how you pass the hidden form variables. the below is the the exact form syntax:

[Code]...

View 1 Replies

Professional :: Flash Swf In Html Pages?

May 23, 2011

I have created a twitter API in flash using ActionScript 3.0 which loads the latest feeds from a user by using the screen name of the twitter user. When I test the swf locally it works fine. But the problem comes when I embed the swf in html page.The swf loads but does not show the content where it needs to access the TWITTER url to load the feeds.It doesn't load the feeds. It asks for the global settings to be changed.So, I have changed the settings and played the html page.I works fine.My question is when I will upload the files to a server the same problem will come and it will not load the feeds. How to solve this problem permanently?

View 1 Replies

Professional :: Linking SWF To HTML Pages?

May 26, 2011

I'm trying to use a .swf for a navagation button in a website I am creating but I'm running into a bit of a problem. I need to know how to code the button (In Flash) so that they link to my specific .html page. Is this possible to do with a realitive link?

View 7 Replies

ActionScript 3.0 :: Adding Links To Html Pages?

Apr 13, 2011

Here is my code for buttons(working)is there a way to add links to html pages to the buttons.// Catalogue Bottom Button//stop();//hide button on the stage
 
catBtmBut.visible = false;
var catBtmmenu_label:Array = new Array("Visit: The Grange Kitchen","Visit: The Bergerie","Visit: Badens ");var catBtmtotal:Number = catBtmmenu_label.length;var catBtmpage:Number;var catBtmmain_menu:MovieClip = new MovieClip();catBtmmain_menu.x = 35;catBtmmain_menu.y = 231;stage.addChild(catBtmmain_menu);for (var catBtmi:int = 0; catBtmi < catBtmtotal; catBtmi++){    var

[code]....

View 2 Replies

ActionScript 3.0 :: External .swf Not Loading On HTML Pages?

May 31, 2011

I'm having trouble and I was hoping someone could shed some light on what I'm doing wrong. I have a main .swf file from which external .swf files are being loaded through the use of buttons.When I preview the animation, everything works just fine. The problem occurs when I put the animation on the website where it needs to be. The main animation appears like it's supposed to, but the buttons are not successful in loading the external .swf files. I've made sure that all .swf files are on the server but still nothing.
 
Here's the AS:
 
stop();
var presentationLoader:Loader = new Loader();
addChild(presentationLoader);

[code]....

View 14 Replies

ActionScript 2.0 :: Local Connection Across HTML Pages?

Oct 9, 2006

I have three swf's using local connection to communicate. Basically a top and bottom navigation communicating with a main module. All this works fine and looks a little like this:

Top_Nav:
[AS]
Actions.LINKFunction = function(){
outgoing_lc = new LocalConnection();

[code]....

As I mentioned this all works fine. Where I am having trouble is that there is one link that takes the user to an eCommerce area of the site that lacks the main module. It only has the top and bottom navigation. So the navigation is basically broken once the user heads to this area. By putting a getURL into the top nav function I can easily get back to index.html, but I can't figure out how to send the functions once the page has loaded. Basically looking for a way for the functions to execute after the new html page has loaded. So the user hit's the LINK button, the page index.html is loaded along with the three swf's and instead on the default movie's loading in the main-module, the functions in the main module corresponding to LINK are run.

View 1 Replies

ActionScript 2.0 :: Once Again About Flash Navigation On HTML Pages

Feb 28, 2008

I'm trying to create a site with HTML pages and Flash based navigation, which basically means that the site content itself is standard in HTML/CSS format, but the main menu bar with the buttons and all is an SWF file. Needless to say, each lit-up button on the menu bar has to dim out on release and take to the corresponding page, e.g. clicking the 'Contact Us' button would cause it to dim out (as if unavailable) and open the 'Contact Us' page. Clicking a different button afterwards, would re-light the previous button and dim-out the newly clicked button and take to the page that corresponds to the newly clicked button, etc, you get the idea. There are 4 buttons for 4 pages.
Anyway, so far I've tried two methods which have failed:

Method A.
I exported four duplicate SWFs from the same FLA, with the only difference being the one unique button dimmed out and the other three lit up (a total of 4 combinations). Then, I put a different SWF on each page. This, the 'Contact Us' page would have the copy of the SWF with the 'Contact Us' button already dimmed out; the 'Home' page would have the one with the 'Home' button dimmed out, and so on. The obvious problem with this approach is that an SWF needs to load over again every time the page changes, which results in a brief, but, nonetheless, annoying enough blink. I hoped to combat this latency issue by loading all bitmap elements in the flash files externally, as opposed importing them to the library. I assumed that since all SWF copies accessed the exact same bitmaps from the exact same location, they would be cached in the memory somehow and not need to be loaded every time, so there'd be no latency. Then again, I was two days younger. This method failed. As Eric Bogosian's character said in the movie Under Siege 2, "Assumption is the mother of all" (you-know-what-ups).

Method B.
At a couple of other message boards, I was suggested another technique, which would require only one single SWF. A guy gave me a tiny peace of Java Script that would use a variable to inform flash about which page is called so it would know which button in the menu bar to dim out. Although this technique rid me of the necessity to use multiple SWFs, it didn't fix the nasty blinking problem AT ALL!!!

Method C.
I was also advised to "put info in a div and generate server requests to bring the appropriate info up". "You need to use ASP or PHP or some other server language" he said. Well, ASP is absolutely out for me, so I won't even consider it. As for PHP, unless there exits a very simple and straight-forward tutorial with source files, which I could very easily figure out, modify, and implement for my needs, I can't get into it because since I don't know PHP, it takes me a really long time to learn how to do a simple thing with it, which is something I can't afford right now with my deadline and all.

Method D.
I basically want to put the page contents into an iFrame window. Even all drawbacks of using iFrames considered, I still thing this is the optimal way for me. So here's where I currently am on this:I learned how to change the iFrame content using a function. Here's a simple test example, and here are the HTML and JavaScript codes for that example:[code]What I need now is to be able to call that JavaScript function and pass it the URL argument using action script instead.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved