External Swf And External Variable Problem
I have been working on a website that loads an external movie for each of the seperate pages of the site. This is no problem. However, I have set up the external swf's to have scroll bars and load content from text files. I can not get these to work together. I can use the content movie with the scroll bars on its own and the text loads, I can use the main navigation movie to load the content movie, but I can not get the main navigation movie to load teh content movie and then have the content movie load the text at the same time. *Wheew* I hope that's not too confusing.
Main Navigation movie - Seperate page of the site -Text content
the script i use to load the external swf is : on (release) { loadMovieNum("bio.swf", 2); }
the script i use on the external swf to load the text is : loadVariablesNum("bio.txt", 0);
If I need to explain it more thoroughly please ask me to do so. Remember i can get these two elements to work seperately but not when both used together. :-(
FlashKit > Flash Help > Flash General Help
Posted on: 08-26-2004, 02:31 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Put External Variable's From PHP Into Variable's In A Function
I already echo my variable's the right way. I want to make it possible to adjust collors trougout my database. This is what my PHP file echos:
&homecolor=33ff33&newscolor=000000
this is how my PHP file looks:
PHP Code:
<?php
require("connection.inc.php");
$query = "SELECT name, color FROM outlinecolors";
$result = mysql_query($query);
while(list($name, $color) = mysql_fetch_row($result)) {
print("&$name=$color");
}
?>
This way of using PHP also works for the text I use in my movie, which I let flash put in a dynamic textfield. So I tought that it should be possible to have the variable colors above being used in the next function:
code:
home_btn.onRelease = function() {
outline.fadeColor(homecolor, 100, tweensspeed, test);
};
"homecolor" is the place where the value/echo from php must come (&homecolor=33ff33) so "33ff33" must be in the function in stead of homecolor.
Can anybody help me?
Greets..
External Variable
I have a News Section on my flash website. How do i set that equal to a news.txt variable so i can edit it from outside of flash and make my life easier
PLease Help
External Variable
I'm trying to load an external variable to run my loop but it not working, the name of the variable is exNumber the flash file is getting the value just fine, I think that my problem is on the syntax, but I'm not sure. Any suggestions?
Thanks,
Fabio
count = 1;
do {
setProperty("_root.b"+ count, _visible, "1");
setProperty("_root.name_"+ count, _visible, "1");
count++;
} while (count <= exNumber );
External Variable
What is the best way to define an integer variable on
a external text file?
I had something like this:
&numero= 5
The only problem is that I can see it just fine on my flash file as a string. but when I tried to use this variable as a parameter to my while loop is does not recognizes the value 5
any suggestions?
Using External Variable
hi peeps,
im having trouble using the value of a variable contained in an external text file in a computation/calculation. to give you detailed idea of my problem, say i have 'myvar=13' stored in 'data.txt' file. on my flash stage, i tried to issue a loadvariables command to call up the variable 'myvar' contained in the 'data.txt' file to an MC (instance name=myloader). inside the MC i wanted to use the value of 'myvar' in calculation, but everytime i tried to issue a trace command on the resulting calculation output(say sum=myvar+10::trace(sum)) it returns 'undefined' on the trace output window. if you can come up with a sample .fla to demonstration your solution to this one, would be highly appreciated, if you could email it at netserv_inet@yahoo.com
thank you very much guys
External Variable
how to assign external variable to a flash movie hosted in html document without using query string after movie's name
i did it using
<PARAM NAME=movie VALUE="jadmin.swf?myvar=value">
is it possible to use another way
thanks
Using An External Variable
hi all,
I am basically trying to get a number in an external text file to influence the background color of my flash file... the number displayed in the file is correct but when i try to use that number in an if statement it all falls apart:
Code:
var externalData:LoadVars = new LoadVars();
externalData.onLoad = function() {
color_txt.text = externalData.colorCode;
}
externalData.load("colorCode.txt");
var myNumber:Number = Number("color_txt.text");
if (myNumber==1) {
var myColor = new Color(backgroundColor_mc);
myColor.setRGB(0x828238);
}else if (myNumber==2) {
var myColor = new Color(backgroundColor_mc);
myColor.setRGB(0x105788);
}else if (myNumber==3) {
var myColor = new Color(backgroundColor_mc);
myColor.setRGB(0x369636);
}else if (myNumber==4) {
var myColor = new Color(backgroundColor_mc);
myColor.setRGB(0x654884);
}else if (myNumber==5) {
var myColor = new Color(backgroundColor_mc);
myColor.setRGB(0x000000);
}
could anyone point me in the right direction?
External Variable
Hey all,
I have a question - how can I pull an OUTSIDE variable into my flash program.
For Example
<param name="test" value="test1">
How can I then read that in my actionScript?
Or is there a better way to do this?
ANY advice is greatly appreciated!
Get Variable From External Txt
I'm want to get a variable from an external txt-file and pass this variable
to an existing script.
This is part of the existing script (it's a slideshow-script, not written by
me):
this.pathToPics = "/animation/";
// fill this array with your pics
this.pArray = ["image0.jpg", "image1.jpg",
"image2.jpg","image3.jpg","image4.jpg"];
loadMovie(this.pathToPics+this.pArray[0], photo);
However, instead of defining this.pathToPics in the fla, I want to load this
variable from an external text-file (because I would like to change it
sometimes, and I don't want to edit the fla file each time it changes).
In the txt-file I have:
URLToImg=F://www.mywebsite.com/somefolder/animation1/
I already tried:
var externalVars = new LoadVars();
var URLToImg:String;
externalVars.load("URLPath.txt");
externalVars.onLoad = function() {
URLPath = externalVars.URLToImg;
}
and then referring to this variable with:
this.pathToPics = URLPath;
but that doesn't work....
Does anyone know how to do this correctly?
External Variable
Hi,
I have a hard time finding help on what I'm looking for (sorry for my english this is a second language for me)
I'm really not a programmer so I will try to explain waht I need as clearly as possible:
I have a Flash (index.swf) that loads differents Flash (6 swfs) with 3 buttons. It's a scientific web site on the brain Called "Le cerveau à tous les niveaux"...and it uses three different levels of explanation (beginner, intermedaite and advanced) to talk about different aspect of the brain...There is 12 different subject on the brain you can read on for each level..
When you click on a subject, it goes to a basic HTML page.
But my problem is that when you are on this HTML page and you whant to go back by either pressing the Back button or clicking on the "Back to main topics" that appears on every page, you will always go back on the beginners page by default even if you were on the intermediate or advanced page......
Is there a way to set an external variable that will remember on wich level (example "intermediate") when I press the BACK button???
I assume that the answer is yes but can anyone explain to me how to do this??
thanks!
External Variable
Hi,
How can I get a variable from an external domain. So not the one the flash is on.
So basically the page would have &status=1 and I need to get the 1
Bryce
External Variable From URL
Does flash can read variable from url?
Let's say that movie is located on age
http://www.example.com/index.php?var1=x&var2=y
Can i access values from var1 and var2 ?
Via-Net - web directory
Sending A Variable To An External Swf
I am trying to send a variable to an external swf file which loads into my movie, is this possible?
At the moment, I have an actionscript in my movie. which reiures a value from my main movie.
so all i want to do is to tell the movie that the
index = 1 , 2 , 3 , etc b4 when the movie loads, so that it know which number to use in the script...
It may sound simple, but 4 some reason, i just cant work it at the mo...
anyhelp would be great!
External Text Variable
slight dilemma-
How do I bring in a variable from say, a text file, into a flashtyper movie so that the value of the variable is the text it displays? My actionscript was
loadVariablesNum ("mode.txt", 0);
the text file has
&text=Content
The movie only displays the "C" in Content, and stops!!
Calling External Variable..
Hi.. I really need some help please..
I am loading a variable from an external text file, the variable is called text. I can set this as the variable for a dynamic text field and it will work ok, but I can't access it elsewhere. I want to access it in a for loop like so and find it's length:
for (i=1; i < length(_root.text); i++)
but it won't access it, let alone find it's length..
I can't even assign a variable like
test = _root.text or test = _level0.text , this is on the 1st frame of the main scene so I don't see why there should be any problems.. any ideas?
Any help would be really appreciated..
Thanks
Variable Between Main And External Swf
I've got a main movie with an empty mc that load external movie.
But inside this external movie, i want to tell the main movie to set the empty mc visible=0. I also want to change a varible (ran) that is on the main movie.
External Variable Help Please Another Question
thanks for the code earlier worked great sorry for being nuisance
but i got another question
i am trying to load a variable txt file in to the main time line in flash and i want to also set a variable in the txt file that will change the document color in my flash file is this possible can you help please
thankyou in advance
Button + External Variable
I need help with this photo gallery I'm making. I have a variable in a text file which is going to be the total photos in the gallery.
Total.txt
&Total=15
From that variable, I want to load into the flash document like this..
Text = new LoadVars();
Text.load("Total.txt");
//assign a function which fires when the data is loaded:
Text.onLoad = function(success) {
if (success) {
trace("done loading" + this.Total);
_global.a7 = this.Total;
TotalImgs.text = _global.a7;
} else {
trace("not loaded");
}
};
Then when the user press the next button, the next button will disable or enable depending how many more pictures there are to go...
_global.Next = 13;
if ( _global.a7 < _global.Next ) {
_root.next._visible = false;
} else {
_root.next._visible = true;
}
Now when I use trace("done loading" + _global.a7), it says that _global.a7 is equal to 15, but when I put it into the If statement it doesn't work. Any suggestions or comments?? Thank You
Variable And External Txt File
Hello there, can someone help me with this problem,
i've a swf that contains 2 scenes, in the first scene i make a choice for different languages, when the visiter click on english, it loads a specific txt file that contains english text, (txt file is external), know i want to load in the second scene in a empty mc a external swf, that has to contain txt from that first txt file that i load in the first scene. how can i use txt variable from that file and load it into that swf that i load into an empty mc in the second scene??
thx
Load Variable From External URL
I have made a movie in which I want the mc "holder" to load variables from an external movie. I have written the script for it, however, it is not working. Could somebody please check it out? If instead of the loadVariables action I use the
getURL action
holder.getURL("http://redbone.us/announce/data/12345.txt","_blank","get");
the file gets loaded in a new window.
I want the above file to load in the mc holder.
Thanks a lot!
External Text Variable
Hi,
I have two text fields that are displaying dynamic text when a function is called. The thing is that when I click a button it does not always have two variables to display. Some have two some only have one variable.
My function is this
function buttonRollover(me) {
_root.state = eval(me+"_name");
_root.evotes = eval(me+"_evotes");
}
So my issue is that sometimes evotes may not be a variable I need for a specific button rollover but state does have a variable specified.
I understand what is going on, flash does not see a variable present so it fails by displaying undefined. What I would like, though, is to have nothing appear if there is no variable present. Can this be done, can a dynamic text box display nothing if there is no variable defined for it?
Thanks
-brian
Trying To Load An External Variable
I have the actionscript
Code:
var myLV:LoadVars = new LoadVars();
myLV.load("vars/totalItems.txt");
trace("totalItems = " + Number(myLV.totalItems));
and I have a folder named "vars" with a text file inside it that contains the line
Code:
totalItems=6
Why is it, when I run the SWF, the output is this:
Code:
totalItems = NaN
Variable To Load External SWF?
Im breaking my had but i just cant make it work, pls guys help me.
Im making a Web Site to a Car Dealer Company, and they want a little system where they can input cars to sell. Im using asp to work with flash mx, and its going very nice.
The problem is, i want, that the logo of the car (porsche, ferrari, etc) appears with the line of text that discribs it.
Im, using 6 holders (because thats the bigger number of cars that can be displayed in the window) an then trying to call inside it the logo that corresponds to each car.
Im using this code, something like:
Code:
car1_holder.loadMovie(car1_logo);
car2_holder.loadMovie(car2_logo);
//etc......
the asp page send to flash that car1_logo = Ferrari.swf and car2_logo = Porsche.swf but the image doesnt appear. if i go directly and type
Code:
car1_holder.loadMovie("Ferrari.swf");
it works just fine, but i need it to be dynamic. Maybe some problem with the (") ??? pls somenone help me, im starting to panic
Insert A Variable In External Txt
Hi guys...
i load a external file into flash, then i want change some part of text with flash variables
example:
in data.txt
text=Hi "+name+",
in flash
name = "Joe";
then, the result in dynamic box is "Hi Joe,"
its possible or flash cannot write this ?
Getting Variable From External Txt File
I am able to get a variable to come in to a dynamic text box, but can not seem to access the number even just to trace it. How do you access this number? My code looks like this:
myPics = new LoadVars();
loadVariablesNum("pics.txt",0);
trace (myPics);
Please help!
Thanks,
Brian
Change Value Of Variable On External Swf?
I have intialized a variable on the main timeline:
_root.currMC = emc1;
is their a special code that u need to use to set that variable on an external swf? I run some if statements on the external swf and will need to reset the variable to a different value. I am using this to reset it:
_root.currMC = emc2;
It seem that the maintimeline doesn't read the new value. Any ideas
Trace An External Variable
Hey all,
I have a variable named = iterator
iterators' value is 1, so
iterator = 1;
...and is in my external movieclip.
I want to trace that variable in the parent/holder swf.
Any tips?
Thanks.
I Want To Load An External Swf, Using A Variable.
I think i am screwing up the syntax. let's say I have a global variable, like...
_global.something = mymovie
And then, the code to load in the external swf....
loadMovie((something)+ ".swf", _root.ec);
Well, it doesn't work, and I'm just not sure where to put the quotes, and how many parenthesis are needed.
How do I use a global variable and access it for this loadmovie code?
Thanks.
[f8] Loading A External Jpg Using A Variable?
Hi,
I'm trying to load external jpg images, however I only want to specify one at a time using a text file, which I have named data.txt.
However, I cannot seem to get the syntax correct is AS2.0 - I keep getting operand errors.
Here's what I have..
PHP Code:
image_mc.loadMovie("fals_back_"+ "/" + (var fals_num) + "/" +".jpg");
What I want is if the value fals_num = 01 then import image 01, etc - I am controlling this variable within a data.txt file. Can anyone tell me where I'm going wrong?
Thanks.
Trace An External Variable
Hey all,
I have a variable named = iterator
iterators' value is 1, so
iterator = 1;
...and is in my external movieclip(named empty_mc).
I want to trace that variable in the parent/holder swf.
The code in my parent/holder swf is:
ActionScript Code:
trace(empty_mc.iterator);
...which does not work. Any tips?
Thanks.
I Want To Load An External Swf, Using A Variable.
I think i am screwing up the syntax. let's say I have a global variable, like...
_global.something = mymovie
And then, the code to load in the external swf....
loadMovie((something)+ ".swf", _root.ec);
Well, it doesn't work, and I'm just not sure where to put the quotes, and how many parenthesis are needed.
How do I use a global variable and access it for this loadmovie code?
Thanks.
Load Variable From External URL
I have made a movie in which I want the mc "holder" to load variables from an external movie. I have written the script for it, however, it is not working. Could somebody please check it out? If instead of the loadVariables action I use the
getURL action
holder.getURL("http://redbone.us/announce/data/12345.txt","_blank","get");
the file gets loaded in a new window.
I want the above file to load in the mc holder.
I am on Flash MX.
Thanks a lot!
Using External Variable With Components?
hi all,
I am using a component "Hierachical Menu" with a component parameter that loads a xml file by "dir/dir/load.xml"
(http://www.flashcomponents.net/ and then under Menu's)
Now i want to use a language var in the parameter how would i do that. I am trying "dir/dir/" +lang+ "load.xml"
Is this the good way?
Load External Variable
I am trying to do with the function that Flash read the variable from external file (txt) with loadVariablesNum(). However, right now I am only success make it read variables from external file (e.g. myRotation=45&mySize=150). How can I make the external file store a multi-Array?
Get A .as Class To Use An External Variable
hello,
i have an AS 2.0 class file which is associated to my FLA project. all working fine. there is, however, a *hard-coded* IP address INSIDE the class definition (.as file). i need to make this a dynamic value (so that i can change the IP address at runtime). i am already loading and using the value dynamically (from a config.txt file) within the larger FLA file. but i do not know enough about class definitions to be able to refer to that variable from within the .as file (everything i tried was silly and gave errors).
so basically, how do i reference the value of a dynamicly loaded variable from within a class definition?
there is something called dynamic classes in AS 2.0, does the solution involve that?
any help appreciated, thank you!
Flash To External Variable
I want to be able to track how many times a set of links in my flash doc is clicked and I want those 5 variables to reside somewhere on the server in ASP form so they do not get reset.
Variable Substitution In External XML
I'm loading an external xml file using the Loader class, and then assigning the loaded content to a variable when the loading is complete, like this:
function x_loaded(e:Event) {
var rotation_value:String = "-180";
mc_xml = XML(x_loader.data);
}
If I include in my xml file a value to be substituted, for example <image rotation={rotation_value}/>, the parsing of the xml fails when assigning to the mc_xml value.
Is it possible to substitute values in externally loaded xml?
alternatively, is there a way to simply SET the values, something like image.attribute("rotation")="180";
thanks in advance
Changing A Variable In An External Swf
Hello!
I am working in Flash cs3 with actionscript 3.0.
I want to create a swf that will act as my client's control panel. What i'm looking for is something with a few textboxes or whatever that is able to change those variables in another swf permanently.
Is this possible?
if so, can you point me to something that will help me out?
Thanks!
John iv
Loading An External Variable
Hello all,
I am having a little difficulty loading an external variable into my flash movie.
The principle of the movie is to load some XML data and display expected data in loop. This all works fine and as it should.
My problem starts when I remove the internal variable used for testing and try and insert the same variable externally, as this will be changing depending upon the teams displays. I have tried adding in the variable like
<param name="flashVars" value="teamName=teamA" />
and
<param name="movie" value="flash/plasma.swf?teamName=teamA" />
And then tried using a variety of methods in AS3 to display the name. Just getting it to trace "teamA" would be all I need, but it is having none of it.
Any help would be greatly appreciated.
Kind Regards
Tim
Edited: 07/10/2008 at 07:38:57 AM by timbronze
Another External Variable Issue
Good day all,
Attach Code
In spite of the fact that the following AS3 and PHP code posts the variable values to the Flash Player, initially, that is:
<?php
$returnVars = array();
$returnVars['lname'] = "LastName1";
$returnVars['fname'] = "FirstName1";
$returnVars['email'] = "Email1@test.com";
$returnVars['category'] = "pro";
$returnVars['subscribeDate'] = "2008-07-31 14:07:34";
$returnString = http_build_query( $returnVars );
echo $returnString;
?>
...produces the following output in a browser (Firefox):
lname=LastName1&fname=FirstName1&email=Email1%40test.com&category=pro&subscribeDate=2008-07-31+14%3A07%3A34
...and the following actionscript:
var url:String = "http://localhost/site61/php/phpCode.php";
var reqURL:URLRequest = new URLRequest(url);
reqURL.method = URLRequestMethod.GET;
var loader:URLLoader = new URLLoader(reqURL);
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, handleComplete);
function handleComplete( event:Event ):void {
var loader:URLLoader = URLLoader(event.target);
var variables:URLVariables = new URLVariables(loader.data);
trace("lname is " + variables.lname);
trace("fname is " + variables.fname);
trace("email is " + variables.email);
trace("category is " + variables.category);
trace("subscribeDate is " + variables.subscribeDate);
}
...produces the following output in Flash' Output panel:
lname is LastName1
fname is FirstName1
email is Email1@test.com
category is pro
subscribeDate is 2008-07-31 14:07:34
...there is still an issue that is absolutely maddening me.
That is, my variable values are behaving as constants!
For example, changing the values in the PHP script to, let's say,:
<?php
$returnVars = array();
$returnVars['lname'] = "LastName2";
$returnVars['fname'] = "FirstName2";
$returnVars['email'] = "Email2@test.com";
$returnVars['category'] = "intern";
$returnVars['subscribeDate'] = "2008-08-01 06:23:59";
$returnString = http_build_query( $returnVars );
echo $returnString;
?>
Does reflect the changes in the browser, producing the following output:
lname=LastName2&fname=FirstName2&email=Email2%40test.com&category=intern&subscribeDate=2008-08-01+06%3A23%3A59
But does not reflect any changes in Flash CS3's Output Panel. In other words, the output produced is still:
lname is LastName1
fname is FirstName1
email is Email1@test.com
category is pro
subscribeDate is 2008-07-31 14:07:34
...instead of:
lname is LastName2
fname is FirstName2
email is Email2@test.com
category is intern
subscribeDate is 2008-08-01 06:23:59
as one would logically expect it to!
I really, truly need an explanation as to why this is occuring, so I can circumvent this issue in the future.
A working solution/resolution to this issue would certainly make you my hero ... as well as I, your biggest fan ... for the week!
Have a fantastic weekend all!
Troy
Loading Variable Into External Mc
Here's what I'm trying to go for:
I have a base movie where three buttons are stored. when one of them is clicked I need some variables to be sent to the new external mc.
first variable is the title of the section, second is a brief description of the section and the third is the name of the movieclip to load.
on(release) {
empty.loadMovie("section.swf");
empty.test.text = "section I";
empty.desc.text = "blahlkl;aksdjf;laksjdf;lskjdfa;lskdjf";
empty.mc = "base.swf";
}
test is the name of the field. I get nothing when trying this. Any help would be greatly appreciated.
Passing A Variable To External .swf
Hey guys i have a gallery that when any thumbnail is pressed it implements the following variable:
on (release) {
set (_global.thumb, dream1);
_parent._parent._parent.blank.loadMovie("ProjectFr ame.swf");
}
Now im trying to acces that variable "thumb" in ProjectFrame.swf but i cant seem to do it.
Anyone know how I can pass the variable out?
Trace An External Variable
Hey all,
I have a variable named = iterator
iterators' value is 1, so
iterator = 1;
...and is in my external movieclip.
I want to trace that variable in the parent/holder swf.
Any tips?
Thanks.
The External Variable Issue
hello all... I know that there is quite a lot of external loading discussion going on... but I cannot seem to find a solution to my problem.
I can load an external txt file, and I can get the many variables from it... but, what I want to do is load ONE text document and have the multiple variables populate ONE text field dynamically based on the users choice. The best example I can give is a photo gallery where there is a title of the photo gallery.
I do not want to use XML (yet) but had wanted to understand how to request a changing variable rather than specify exactly which variable I want...
so rather than saying load "variable1" I want to say load "whatVariable" and then define "whatVariable" I want outside of the actual text file loading script.
do I make any sense? probably not.. my appologies...maybe this helps:
loadText = new LoadVars();
loadText.load("infoPacs/" + _root.Section + ".txt");
loadText.onLoad = function() {
DETAILS.htmlText = this.variable1;
}
-note: the text file is loading great.. and loads a different text file based on which section the user is in.
Meanwhile... the loading of the single variable also works.. but I want to make it dynamic the way the actual text file load is dynamic.
any help would be great.
I Want To Load An External Swf, Using A Variable.
I think i am screwing up the syntax. let's say I have a global variable, like...
_global.something = mymovie
And then, the code to load in the external swf....
loadMovie((something)+ ".swf", _root.ec);
Well, it doesn't work, and I'm just not sure where to put the quotes, and how many parenthesis are needed.
How do I use a global variable and access it for this loadmovie code?
Thanks.
Creating Variable For MC In External .FLA
I have got a AS3 Dock Menu script from http://www.reloc.org/2008/2/23/os-x-...n-as3-and-flex
And I am trying to get it to Load content in to a Movie Clip when an icon is pressed but I am having some serious trouble doing it. I had it sugested to me that I try using cases so I did but then I needed to create a Variable in the .AS file(below) but I am totally lost.
Would some one tell me what I am doing wrong or what I could do to get it working.
My movie Clip that I want to load images in to in the .Fla is called "ldr".
original code:
Code:
package
{
import flash.display.MovieClip;
import org.reloc.dock.*;
public class DocumentClass extends MovieClip
{
private var items = [
{ icon: new finder(128, 128), id: 'finder' },
{ icon: new safari(128, 128), id: 'safari' },
{ icon: new mail(128, 128), id: 'mail' },
{ icon: new itunes(128, 128), id: 'itunes' },
{ icon: new ichat(128, 128), id: 'ichat' },
{ icon: new search(128, 128), id: 'search' },
{ icon: new help(128, 128), id: 'help' },
{ icon: new trash(128, 128), id: 'trash' }
];
public function DocumentClass()
{
stage.scaleMode = 'noScale';
var dock:Dock = new Dock('bottom', 128, 32, 128, 2, 0, 0, items);
dock.x = stage.stageWidth / 2;
dock.y = stage.stageHeight;
addChild(dock);
addEventListener(DockEvent.CLICK, onClick);
}
private function onClick(event:DockEvent):void
{
var icon:DockIcon = event.target as DockIcon;
trace(icon.info.id)
}
}
}
My changes
Code:
package
{
import flash.display.MovieClip;
import org.reloc.dock.*;
public class DocumentClass extends MovieClip
{
private var items = [
{ icon: new finder(128, 128), id: 'finder' },
{ icon: new safari(128, 128), id: 'safari' },
{ icon: new mail(128, 128), id: 'mail' },
{ icon: new itunes(128, 128), id: 'itunes' },
{ icon: new ichat(128, 128), id: 'ichat' },
{ icon: new search(128, 128), id: 'search' },
{ icon: new help(128, 128), id: 'help' },
{ icon: new trash(128, 128), id: 'trash' }
];
public function DocumentClass()
{
stage.scaleMode = 'noScale';
var dock:Dock = new Dock('bottom', 128, 32, 128, 2, 0, 0, items);
dock.x = stage.stageWidth / 2;
dock.y = stage.stageHeight;
addChild(dock);
addEventListener(DockEvent.CLICK, onClick);
}
private function onClick(event:DockEvent):void
{
var icon:DockIcon = event.target as DockIcon;
var ldr:MovieClip
//trace(icon.info.id)
switch(this.DockIcon) {
case 'finder':
this.ldr.source = "clip1.swf";
Break;
}
}
}
}
External Variable Into Flash Through PHP
Hya Guys,
This is the deal
On this Clan site i got a lot of php.
There's a tagg called <yapp title> wich becomes the title of the site. Wich is on the start page : Vortex Community.
I'd like to get this variable into Flash,
how can i do this ?!
Also i've got a MySQL database,
does any1 know how to acces that database through flash (probably through php wich gets included into the flash right?)
Thnx in advance
One n00b of the flash scene:
WoDkA WoLF aka WkA aka Wim Grootveld
|