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


Similar Posts:


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

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 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

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

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

ActionScript 3.0 :: Passing A Simple MovieClip Reference?

May 3, 2010

I loaded a SWF and passed the reference to a Class called Portfolio:

Portfolio.as:

ActionScript Code:
package
{

[code]....

Now I keep getting one error or another. Right now, it's telling me:

TypeError: Error #1009: Cannot access a property or method of a null object reference.

I tried extending the thing but then I got a: "1203 No default constructor found in base class" error I just want to pass a simple MovieClip reference from one class to another.

View 1 Replies

ActionScript 3.0 :: Simple Parameter Passing On Event Listener?

Oct 11, 2009

I'm new to ActionScript and have a fairly basic question. I want an eventlistener to call a function and pass it a parameter that will send the movie to a specific frame. My code generates and invalid parameter type error. It's as follows:
 
TL_AboutUs_btn.addEventListener(MouseEvent.MOUSE_OVER, DropSubMenu(10)); // calls a function to drop a sub menu
function DropSubMenu(sm:number)
{ gotoAndPlay(sm);}
 
Error is "1046: Type was not found or was not a compile-time constant: number."

View 3 Replies

ActionScript 2.0 :: Program A Simple Script Depicting The Passing Of Time?

Sep 13, 2002

Is it possible to program a simple script depicting the passing of time? Not necessary a timeline but rather a time code.My intention is to animate and integrate a 3D city (into Flash or Director) that is deteriorating/declining over time.I just might fake it in the end. i.e.Scrolling 24 hrs Days Weeks Months

View 4 Replies

IDE :: Load Panghat Spa.swf As A Variable By Pasing Variable From Html Page In To Flash

Sep 15, 2009

var loader:Loader = new Loader();
loader.load(new URLRequest("panghat spa.swf"));
addChild(loader);

want to load panghat spa.swf as a variable by pasing variable from html page in to flash

View 1 Replies

ActionScript 3.0 :: XML Can't Display Simple HTML In Flash

Feb 9, 2009

I am trying to load simple html text from xml using AS3 in flash. Here is my sample xml tag.[code]...

View 7 Replies

CS3 Dynamic Text Box Won't Render Simple HTML

Sep 11, 2009

I've done this dozens of time before but for some reason any new dynamic text boxes I make will not properly render the HTML in them even with the HTML control turned on.

I'm using CS3 with Actionscript 3, targeting player 9. I've tried AS 2, and different players all to no avail. I've tried embedding fonts, and not embedding fonts with no change in behavior noticed. I do want to use AS 3 (and wrote a bunch of code for it in a different file already), but even in a new empty file I'm still seeing this behavior.

I've made a real simple (one line!) file with a text box to demonstrate.

View 1 Replies

Javascript :: Dynamically Assign Variable From HTML To AS3 Variable

Sep 12, 2011

I have an HTML button that I need to dynamically assign to an AS3 variable when clicked (in order to load an .mp3). I am using externalInterface.call to collect javascript variables - I am just unsure how to change these dynamically when a button is clicked.

View 2 Replies

ActionScript 2.0 :: Way To Pass Simple Variable

Dec 26, 2011

I am trying to use a simple variable, but it won't work[code]...

View 2 Replies

ActionScript 3.0 :: Very Simple String In Variable?

Jan 27, 2012

I have a extremely simple problem here but my mind is not working at all today. I have the following code:

ActionScript Code: var myMessage:String = "Copy the notes "; on the main scene, but i want to change the text in the string when it loads a different frame or scene. I generated a new scene and in the first actionscript layer i used:

ActionScript Code:
myMessage = "Scene 2 loaded"
but it doesnt work.

View 2 Replies

HTML :: Simple Image Editing Within Browser On Page

Sep 22, 2010

I have a page that needs simple image editing within the page. It can be either in flash or Java. Are there any open source tools that you can recommend? I am looking for a flash or Java tool that can do the following:
Cropping
Resizing
Nothing else required but simple features like this will be a plus.

View 1 Replies

Flash :: Display Simple Html String With <img> <p> Tag In Builder 4?

Jan 12, 2011

Display simple html string with <img> <p> tag in builder 4?

View 1 Replies

CS3 Passing A Variable Through A URL Into A SWF

Aug 22, 2009

I have a flash file that has an XML driven menuing system to select and play various FLVs. I want to be able to craft different URLs to open the swf and start playing different FLVs. (The others will be accessible from the menu once the sfw is opened, but I am looking to control what plays on opening, dependent on what link a user click.) Not really sure about the best way to get the selection into the swf.

View 4 Replies

ActionScript 3.0 :: Passing Parameters Through HTML

Aug 13, 2009

What is the best way to send HTML custom parameters to the flash player?Here are some parameters and values I would like to pass:

- autostart: true/false
- column: 1/2
- mini: true/false
- shuffle: true/false
- repeat: true/flase

View 1 Replies

Actionscript 2.0 :: Passing URL Parameters From HTML

Sep 23, 2009

after 3yrs doing this stuff, i feel like I'm still learning the basics of .as and .html and am wondering how I can pass a parameter to another server using Flash. ... Man, how do I explain this? ... An html guy set up his server to display my content- ie: He setup his server..

[Code]....

View 4 Replies

ActionScript 2.0 :: Passing Variables From 1 Html To Another?

Oct 30, 2005

I was just wondering what would be the "best" way to pass a variable that's in a swf to another swf located in another html.

something like index.swf embed in index.html and sends a value to a variable to index1.swf embed in index1.html.

What I'm trying to achieve is have a user select the language he wants, plays the rest of the swf and when it reaches the last frame it does something like

Code:
//this is the last frame of splash.swf
if (language == "fr") {
_root.container.loadMovie("about.swf"); //_root is on index.swf

[Code]....

so that works perfectly when splash.swf is loaded into index.swf but now I want the same result but having splash.swf and index.swf on different html

View 6 Replies

ActionScript 2.0 :: Passing FlashVars To Swf From Html?

Mar 16, 2007

So I'm building a Flash/HTML hybrid website that uses a Flash navigation. Within the index.html file there is an Iframe that loads the different pages of content. I used this method so the whole page didn't have to refresh only the content being loaded.

Well I have some buttons on the inner pages that will redirect to other inner pages. The problem with this is the Flash navigation is still stuck on the old page. The Flash nav says you're on the home page while the content being displayed is the about page. Get it?

I've looked into some articles on using FlashVars but it doesn't really apply to my site because of the Iframe.

View 1 Replies

IDE :: Passing (URL) Variables Between Two Swf (html) Files?

Mar 22, 2009

how do I passing variables between two swf (html) files For instance how can I request the variable "var_1" in the file blikvanger.swf (or blikvanger.html).Here is my code of one as file (contact.as):

Code:
...
homelink.addEventListener(TextEvent.LINK, linkHandler);
homelink.htmlText = "<a href="event:../blikvanger.html">THUIS</a><br>";
homelink.styleSheet = myCSS;

[code]....

View 5 Replies

ActionScript :: Library For Turning Simple Wiki Mark Up Into Html?

Feb 28, 2011

a flash/flex application for turning wiki Google like mark up into html. In actionscript and mxml. Is there anything like that?When do you need such thing? - you need it when you create an app for some multiple editors at the same time to work on one document, probably on same line and share ideas while live wideo charting. Such app can be done using as3 and Red5 for exalmple...

View 1 Replies

ActionScript 2.0 :: Passing Variable To Url?

Aug 17, 2009

I have a site that uses an user id that needs to be passed from links with a flash banner. I have it working, but not the way I need it and could use a little assistance.

[Code]...

View 4 Replies







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