Generic Button
i have a movieclip that is basically a slide show. What i need to do is program a button once to go to the next marker or go back to the previous one. These markers aren't spaced evenly. I need a button that can look for the last marker or the next one coming up so i don't have to program 200 one off buttons. Any ideas?
FlashKit > Flash Help > Flash General Help
Posted on: 02-14-2005, 11:43 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Generic Button
say id cretaed a button and i want all the others to be exactly the same but without duplicating the button in the libray and adding different text how could i use just one generic buttons with a script that telles each button what text is in it and what it does?
does anyone understand what i mean?
if so can u help?
cheers alot!
Generic Button Function
Hi
I am new to ActionScript and need some help with adding event listeners to buttons that pass multiple parameters to the function. My basic problem is that I have a lot of button on my site and currently I do the following for every button:
Button1.addEventListener(MouseEvent.CLICK, homeFunction);
function homeFunction (event:MouseEvent):void
{
gotoAndStop(”home”);
}
This has created a lot of code that I would like to get rid of by creating a generic function something like the following:
Button1.addEventListener(MouseEvent.CLICK, “home”, genericFunction);
function genericFunction (event:MouseEvent, string:NavigateTo):void
{
gotoAndStop(NavigateTo);
}
However I cant seem to get this to work what am I doing wrong?
Is this even possible?
Generic Button Issue
Even though my hit state completely covers the button, my button will twitch if moved while over the button (restart the over state)...help please? in the enclosed flash file, the button named "Meet The Team" is what twitches...thanks..
Generic Buttons
I've created a generic button for my UI. It is a simple rectangle button - I want to use multiple instances of this button and add different text labels to each individual text label. Any pointers on how to go about doing this?
Generic Menu
Hi all,
I want to make a generic flyout menu (like the windows startmenu) where button text and url files can be read and customized via a text file. The buttonactions load simple HTML pages in the content frame.
Does anyone know a tutorial or FLA to prevent me reinventing the wheel?
Cheers
Generic Preloader
Hi... I'm having problems!
Does anyone know how to create a generic Flash MX preloader. I need it to exist in one .fla file with the ability to load other files with %feedback.
I have so much content for this site i need the one preloader to handle a number of other movies. I hope i'm explaining myself.
If not do you know anyone that does, please help or i might have to start crying
Cheers
Generic Cd Rom Help Content|?
Hi there.
i have a mac/pc cd rom in development. I need to have a tech help section and was wondering if anyone knew a good generic help to use as a starting point?
thanks for any help!
Steve
Generic Stuff...
Is there a place where I can download certain movie clips for flash. You know, cool little animations people have made into movie clips that you can download? Stuff like that.
I try to get into the submissions place here at Flash Kit, but I keep getting a blank screen...Blah. So does anyone know anything?
[F8] Generic Function
i have the function below that works:
myButton01.onRollOut = fadeDown;
function fadeDown()
{
extendTween = new TweenExtended(myMC01,["_alpha"],easingType2,[myMC01._alpha],[60],1,true);
}
But i then need to add more butons like this:
myButton02.onRollOut = fadeDown;
function fadeDown()
{
extendTween = new TweenExtended(myMC02,["_alpha"],easingType2,[myMC02._alpha],[60],1,true);
}
Q. Can i adapt the fadeDown function to apply to any MC that i need to fade, by substituting the myMC01 and myMC02 to something generic?
rat
Generic ? Mark
Since I have installed the new flash player update all if get now is a generic question mark in any of my browsers. Any idea how to get this working again in all my browsers. I am on a Mac now using 10.4.10
Generic HitTesting?
Good day ladies and gents, I'm back on "the project". Competely revamping it, but for now I'm just working on engines. Right now I'm working on an advanced hitTesting engine, and I need your help.
What I'm trying to do here is create an engine that will detect collision with one object instead of two. That basically means that if any other objects touch this movie clip, the hitTest will return True. Right now the .fla containing the engine has nothing but a circle that can be moved using arrow keys and 8 squares that dissapear when touched by the circle. Obviously, I could do something like:
if (circle.hitTest(square1)) {
do so and so
} else if (circle.hitTest(square2)) {
do this and that
} etc...
But that would be too long, since the engine has to be able to contain 100 squares without too much change in the code. Could somebody please help me with this?
Thanks in advance,
-Raven~Storm
Vars (generic?)
Ola,
I'm trying to do this...
ActionScript Code:
var nba = new LoadVars();
nba.onLoad = function() {
var i;
for (i=0; i<this.n; i++) {
_root.attachMovie("blok", ["green"+i], i);
setProperty("green"+i, _x, i*50);
setProperty("green"+i, _y, i*50);
naam.text = this["lastName"+i];
}
};
nba.load("string.txt");
It's working except for the var in each blok mc...I've tryed this:
ActionScript Code:
["green"+i].naam.text = this["lastName"+i];
but it's not working....
help please..
Generic Actionscripts Problem
using generic actionscripts, i'd like to control a movie to play in certain x, y positions for specific buttons.
however i cant get it to work.
the following situation:
movie(instance)name is masknav.
first frame of the layer "scripts", movieclip with instance name scripts >in first frame>movie frame actions:
function rolloverScript(x,y) {
_root.masknav._x=x;
_root.masknav._y=y;
_root.masknav.gotoAndPlay ("start");
};
and call the above said script in the button "A" in its Object Actions with:
on (rollOver) {
_root.rolloverScript(250,0);
};
------------
what am i doing wrong? :
i tried several things but it doesnt work
(and yes i have the movie masknav on top layer so it is visible.)
if someone would need to see *.fla file, np.
Generic Buttons/movieclips
Before I say my problem, you should probably know that while I'm using MX, I'm exporting as Flash 5.
I have a layout going on, where there are 2 frames. My flash menu, and the HTML content.
In the Flash menu, I've got 8 buttons. I have it set up so all eight buttons (buttons within movieclips) are actually the same button, I just have to use some actionscript to change the text within the movieclip:
Code:
onClipEvent (enterFrame) {
text = "Home";
}
if you get the idea. my problem is how do you get those movieclips to go to a URL. I can't put the actionscript on the button in the movieclip because that modifies EVERY button. I need actionscript that you put on the movieclip.
If you understand what I just typed, I commend you. If you need clarification I completely understand, and I'll even mail you the FLA if you want.
Thanks
Generic Hit Test? This.hitTest(anything)
Is there a way to do a generic hitTest?
For example ...
if (this.hitTest(any MC on the stage){
trace ("hit")
}
if not ... any ideas on another solution?
Thanks.
Oldnewbies Generic Preloader
Hello there,
I found a file called genericpreload2.fla in another thread. I'm trying to edit it to load an external .swf into a main movie, so that the load bar appears and preloads it before displaying it. Thing is I need it to load an external.swf then when the main.swf calls another external.swf the currently loaded .swf 'plays' with a load out sequence.
Oldnewbie, if you read this thread you helped me a while back to solve this problem, but not with the cool preload bar
Please could you have a look at the file at the link below and tell me what i'm doing wrong?
I understand if your too busy
http://www.hubl.co.uk/preloader.zip
Thankyou for any help.
Generic Preload-external
Hi, I have been using OLDNEWBIES generic preloader,
It works great but now my problem is I want to use the same pre-loader to pre-load external movies.
What I don't know is how to call back the preloader when an external-swf is loading. Any help would be very much appreciated !
the preloader
Quote:
// Hides displayed elements
this.reelmc._visible = false;
this.loadbar._visible = false;
percent_display = "";
//create a new movieclip to load
//the external movie into
this.createEmptyMovieClip("container",10);
//load the external movie into the new movieclip
container.loadMovie("flash/main.swf");
//check the download status of the external
//movie once every frame
this.onEnterFrame=function(){
//trace the percentage of the movie that has loaded
percent=(this.container.getBytesLoaded()/this.container.getBytesTotal())*100;
if(!isNan(percent)){
// trace(percent+"% loaded");
if (percent == 0) {
percent_display = "";
} else {
percent_display = Math.ceil(percent) + "% LOADED.";
}
this.loadbar._visible = true;
this.loadbar._xscale = percent;
if (percent > 1) {
this.reelmc._visible = true;
}
container.stop();
} else {
// trace("0% loaded");
}
if(percent == 100){
delete this.onEnterFrame;
this.reelmc._visible = false;
percent_display = "";
this.loadbar._visible = false;
loadMovieNum("flash/main.swf",0);
}
}
stop();
pre-load external with no preloading at this stage.
on(release) {
_root.backimage.loadMovie("flash/img_01.swf");
}
THANKS
Generic Btn.onRelease Code - Possible?
is there a way to write a generic code for all your buttons?
like for example;
-> i call the btns btn1, btn2, btn3, etc.
so i can pass the btn name as a parameter in my movieClipLoader to load the right clip.
just an idea.
replies are welcome, thanks
Generic Preloader And Transitions
Hi,
I am loading several swf's into one movie, and I use transitions for that, using a currMovie and midframe technique (got that from a tutorial. At the same time I would like to use a generic preloader in the main movie that shows without any delay, until the swf is loaded.
Now my question is how I can combine these two ideas.
I will give the full code for both of them an I wonder how to combine those codes, so I can keep the transitions and still use the main preloader!
The code on the button for the transitions is like this one
Quote:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "bio2";
container.loadMovie("bio2.swf");
} else if (_root.currMovie != "bio2") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "bio2";
container.play();
}
}
}
and the code from the preloader including some comments (I think I got it from Oldnewbie and it is great)on that same button:
Quote:
on (release) {
if(_level0.current_selection == "bio2"){
stop();
} else {
_level0.containerMC.loadMovie("bio2.swf");
/* To test this locally, upload your file
to your server, and use the full URL,
as above to preload your movie.
Make sure you clear your cache,
each time you're testing it. */
_level0.preloader.gotoAndStop(2);
// Sets the preloader clip in motion...
_level0.current_selection = "bio2";
/* Sets the current selection to "bio2",
so that a second press of the button,
doesn't re-load the file again,
while it's already displayed. */
}
}
I tried several combinations and it doesn't work, but it would be so cool if it did!
I hope someone can help me.
Thanks,
Jerryj.
Two Generic ActionScript Questions...
1. Is it possible to reference a MC's anchor point in action script? If so, how? I want to change a dynamic clip's rotation point.
2. Can I set boundaries for a draggable MC? (IE, the clip refuses to be dragged beyond a certain X,Y location).
Thanks.
--holodog
Generic Object Vs. Class
In AS1 is was possible to do something like this:
code:
var cmi = new Object();
cmi.core = "blah";
cmi.core.score = 5;
I basically want to emulate the strucutre of the CMI data model inside Flash (so I can make real references like cmi.core.score.raw), but keep getting syntax errors using generic objects:
code:
class CMI {
var core:Object = new Object();
core.score:Number;
}
*MUST* I define all these as outside classes, and define them in the contstructor from the CMI class? It seems like overkill, they're just collections of properties. If I don't have to, is it better to?
Generic LoadMovie Preloader
I'm having a hard time creating a preloader for loadMovie using jpg. My problem is that my preloader code runs at the same time as loadMovie so getBytesLoaded and Total are always equal at the start.
Does ayone have generic preloader code for loadMovie();
Gracias
Generic Script For Buttons
I've a 6 buttons in my flash file and these buttons lead to 6 different URLs. Could somebody pls advise that it is possible to have a generic actionscript in flash when alll my buttons share the same script but I can define the URLs differently in my html page using javascript.
The reason is that the URLs going to change frequently so I'm thinking once I exported my flash, I'm not going to touch it anymore but only edit on my html page. Is this possible?
Appreciate any advice. Thank you.
[F8] Generic Dynamic Buttons
Hi There
I want to add a download button to my portfolio site that will allow the user to download a pdf. The way i have built the site is that all the txt and image paths are in an xml document.
//probably using a zipped pdf
PHP Code:
on (release) {
getURL("myfile01.zip");
}
I want to know if i can dynamically updatea single button on the main movie using xml or should i create new swf buttons for each project and then load them using xml.
not sure as i have not done this b4.
cheers
rat
Generic Event Listener
Using the Loader class, I'm loading a SWF on to the stage. In AS 2.0, I would have a single event listener call a specific function based on the event triggered. In AS 3.0, can I do the same thing. Because I am using the Loader constructor, I only want the one listener to call 3 possible function based on that event.
Seems to makes sense to me. I would use the following:
Code:
screen_mc.addListener(screen_listener);
The screen_listener would be declared as an Object previously.
Generic Objects? Clipping?
Hello,
I am an amateur programmer (no formal training of any kind) and I have been messing with Flash for a good while. I have a pretty good handle on most of actionscript but there are a couple of things that I can't seem to work out.
First, is it possible to refer to an object in a generic manner? For example, I have bricks and bullets, and i need the bricks to explode when a bullet touches them.
Currently, I would name all of the bullets manually (bullet_01 ... bullet_99) and have each brick make 99 checks (hittest with bullet_01, hittest with bullet_02, etc). I have always thought that there should be some way to test against a type of object, but I haven't figured out how to do this.
If I wanted to make 10 bullets and 1000 bricks that would be 10,000 clipping checks per frame - is there a better way? Am I worrying too much about cycles?
Secondly is the issue of clipping detection for making a platformer style game. I have seen many of these work well but whatever systems I devise to keep the player in check seem to slow the game down - I have to be doing it wrong, but I've been unable to find any tutorials/books that deal with handling clipping in games beyond simple space-invaders style stuff.
Can someone point me in the right direction?
Custom List, Or Generic One?
Hi everyone,
I'm only new to actionscript, but was wondering what the best approach would be to simulate the following ticket system...
http://img168.imageshack.us/img168/3...inglistom8.jpg
I really don't know whether to use a custom class...
class Job
{
// private instance variables
var jobNum:Number;// unique identifier for each job POSSIBLY APLPHANUMERIC
var custName:String;// name of the client
var jobQuant:Number;// the number of discs that need to be created
var discType:String;// type of blank media
var labelType:String;// colour and hubsize of disc
var date: Date// due date of job
var jobStrip:jobGraphic;// graphic object
var ETA: Date// estimated time for completion
// constructor statement
function Job(p_jobNum:Number, p_custName:String, p_jobQuant:Number, p_discType:String, p_labelType:String, p_date: Date){
this.jobNum = p_jobNum;
this.custName = p_custName;
this.jobQuant = p_jobQuant;
this.discType = p_discType;
this.labelType = p_labelType;
this.date = p_date;
}
or to use a UIComponent such as a list box, or possibly extend the component to the job class?
I want to be able to dynamically insert new jobs when they arrive, and have the ability to move jobs around depending on priority. As per the image, i also would like to program an info tab which would drop down another box displaying the job in detail.
Can anyone please steer us in the right direction??? I have a decent understanding of OOP, but am a little rusty as i haven't programmed for well over 5 years.
thanks in adv,
j.
Generic XML Parser Class
Hello All,
I'm in the middle of designing the framework of a new Flash / PHP / MySQL application that I'm working on. Flash and PHP/MySQL are going to be talking via XML and I'm curious if any of you know of a generic Actionscript 2.0 class that will parse XML and load it into arrays or some other data structure. I've searched around and haven't been able to find any evidence that such a thing exists. I figured that this would be a common thing among Flash / PHP applications. I've seen the tutorials, know about the built in XML class, but I want something that's a bit more robust and coder friendly. Using firstchild.firstchild...etc. can get very tedious very quickly.
If I can't find anything then I suppose I'm going to have to build my own
Any suggestions would be appreciated. Thanks,
Tommy
Generic OnReleaseOutside Emulation?
Late comer to the AS3 party, hope no one minds if I drag this one up again.
I've read through quite a few solutions for emulating the old onReleaseOutside event, but what I haven't seen is a generic reusable method. They all seem to work by hard coding the button reference into the stage triggered mouse up event.
The only way I can think of communicating what button was being pressed to the stage is to have another variable floating around keeping track of it (which is a bit of a crap solution).
Am I right in my thinking or am I missing something? (the latter is probably more likely!)
Generic HTTPService Class
Here is my first attempt at a class.
Please explain to me how I would call this from a combo box or button and assign the returndata arraycollection to a Bindable ArrayCollection in Flex3 keeping in mind that I want to be able to use this one class for most of my combo boxes and buttons and I will be assigning the return data to a few different bound ArrayCollections.
Code:
package
{
import mx.collections.ArrayCollection;
public class GenSubmit
{
import classes.EventParser;
private var params:Object;
private var _url:String;
private var myservice:HTTPService;
public var returndata:ArrayCollection;
public function GenSubmit(event:Event, tablename:String, queerytype:String, filterfield:String, primfield:String, primvalue:String)
{
var parser:EventParser = new EventParser(event, tablename, queerytype, filterfield, primfield, primvalue);
params["filtervalue"] = parser.getfiltervalue();
params["filterfield"] = parser.getfilterfield();
params["tablename"] = parser.gettablename();
params["primaryfield"] = parser.getprimfield();
params["primaryvalue"] = parser.getprimvalue();
params["queerytype"] = parser.getqueerytype();
_url = parser.geturl();
}
public function servicecall():void {
myservice = new HTTPService;
myservice.url = _url;
myservice.addEventListener(ResultEvent.RESULT,resultHandler);
myservice.method="POST";
myservice.send(params);
}
public function resultHandler(event.ResultEvent):ArrayCollection {
returndata= event.result.response.data.row;
}
}
}
Generic String Methods.
There're lines in the manual I fail to understand:
Quote:
All the methods of the String class, except for concat(), fromCharCode(), slice(), and substr(), are generic, which means the methods call toString() before performing their operations, and you can use these methods with other non-String objects.
It would be very kind of someone explaining it in other words, maybe giving an example where this may be useful.
I've tried to find the difference between using concat() and toLowerCase() in this context, though, I can't see any difference so far...
Here're my tests:
ActionScript Code:
function func(str:String):void
{
trace(str.toLowerCase());
trace(str.concat(" !!!"));
}
var mc:MovieClip = new MovieClip();
func(mc);
Won't compile, thus useless.
ActionScript Code:
function func(str:Object):void
{
trace(str.toLowerCase());
trace(str.concat(" !!!"));
}
var mc:MovieClip = new MovieClip();
func(mc);
Will error on the first line of the func function, thus proving nothing.
ActionScript Code:
function func(str:String):void
{
trace(str.toLowerCase());
trace(str.concat(" !!!"));
}
var mc:* = new MovieClip();
func(mc);
Will not error, thus, again, proving nothing.
ActionScript Code:
function func(str:*):void
{
trace(str.toLowerCase());
trace(str.concat(" !!!"));
}
var mc:* = new MovieClip();
func(mc);
This will error on the first line again...
So, when the difference can be seen, and what is the difference, if any?
Generic Percentage Function
I wish to make a generic function that returns a percentage based on a minimum number, a maximum number and a current number.
Example:
A MovieClips' inner boundary is xPos -40 and the outer boundary is xPos 350. The MovieClips' current xPos is 145.
How far has the MovieClips' xPos reached of the maximum outer boundary expressed in percent?
I need something like this:
function returnPercent(min:Number, max:Number, current:Number):Number{
return (min + max) * current / 100 // FORMULA IS WRONG!!
}
trace("MovieClip's Xpos has reached: " + returnPercent(-40, 350, 145));
Can anyone help here?
Oldnewbie's Generic Preloader At 56k
Hi all, and Oldnewbie. First of all I say that I use your generic preloader code in my site www.rubber.gr to load the main movie first and also the other swf's in the main scene. No problem at all. Except that i tried it once in 56k speed and it seems that the preloader "stucked" at 70 % loading... I tried to refresh the page but it had no result. I checked my Temp internet files and I saw that this swf was not fully loaded - it was about 200kb. I had to delete all temp files and refresh the page- this time the swf loaded 100%
Is there any way so I can be sure that the whole movie wiil be loaded before it appears at the stage? I say that this happend one time when i tested my site at 56k but I wanna be completely sure.
Thanks for your help in advance!
Is This Possible? Generic-locate Children Swf
I have several questions about actionscript and everything and anything will help me out a lot. Here they are:
From javascript (for questions 1-3)
1) is there a way to iterate through objects in a swf file? For example, if the swf has children swfs or some control that I want to target, I want to be able to iterate through the objects and find that object. I want to be able to find children swfs and access the values in the children swfs, and I need this to be generic so that it will work with any swf out there (with of course a version requirement).
2) is there any way that I can get information about an object, such as its name, current rect, etc. Also if it's like a jpg or a swf, can I get the URL that it's pointing to?
3) is there a generic way to pass actionscript code into a swf file and tell it to evaluate it (something like the eval() call in javascript)? When I say generic, I mean for every single swf file out there (of course with a version limit if needed).
Say I have 1.swf file that embeds another 2.swf file (for questions 4-5)
4) From the actionscript in 1.swf, can I iterate through objects in 2.swf? (this is basically question #1 from a different perspective)
5) From the actionscript in 1.swf, can I get information about objects in 2.swf? (this is basically questions #2 from a different perspective)
6) If you don't know or if it's not possible to do any of the things in 1-5, do you know any other way to do it, where the only condition is that the input file is a random swf that a flash developer can make?
Even if you don't know the answer for sure, but you have a guess that will still help. Thanks for reading this post.
Generic Preloader And Transitions
Hi,
I am loading several swf's into one movie, and I use transitions for that, using a currMovie and midframe technique (got that from a tutorial). At the same time I would like to use a generic preloader in the main movie that shows without any delay, until the swf is loaded.
Now my question is how I can combine these two ideas.
I will give the full code for both of them as I got them from open sources, and I wonder how to combine those codes, so I can keep the transitions and still use the main preloader!
The code on the button for the transitions is like this one
Quote:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "bio2";
container.loadMovie("bio2.swf");
} else if (_root.currMovie != "bio2") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "bio2";
container.play();
}
}
}
and the code from the preloader including some comments (I think I got it from Oldnewbie on flaskit.com and it is great)on that same button:
Quote:
on (release) {
if(_level0.current_selection == "bio2"){
stop();
} else {
_level0.containerMC.loadMovie("bio2.swf");
/* To test this locally, upload your file
to your server, and use the full URL,
as above to preload your movie.
Make sure you clear your cache,
each time you're testing it. */
_level0.preloader.gotoAndStop(2);
// Sets the preloader clip in motion...
_level0.current_selection = "bio2";
/* Sets the current selection to "bio2",
so that a second press of the button,
doesn't re-load the file again,
while it's already displayed. */
}
}
I tried several combinations and it doesn't work, but it would be so cool if it did!
I hope someone can help me.
Thanks,
Jerryj.
Generic Event Listeners
I have an array of objects, all the same type and I want them all to utilize an event listener, how can i do this? also is there an method like objectType(), so that when i go through the array I can say if (objects[i].objectType(blah)) ?
Combining Two Generic Objects
My problem is quite simple:
I just want to combine two objects and their properties together.
For instance if I have...
Code:
var appleObj:Object = new Object();
appleObj.type = "apple";
var orangeObj:Object = new Object();
orangeObj.shape = "round";
I would like to have a new object with all properties from both objects. Such as...
Code:
trace ( fruitObj.shape + " : " + fruitObj.type );
// result: "round : apple"
Generic String's Methods.
Somehow I fail to understand these lines from the manual:
Quote:
All the methods of the String class, except for concat(), fromCharCode(), slice(), and substr(), are generic, which means the methods call toString() before performing their operations, and you can use these methods with other non-String objects.
Can someone, please, explain what is the difference between substr() and toLowerCase() considering the lines above?
I.e. How can I use toLowerCase() with non-String object, take MovieClip for example, and how it will be different from me not being able to use substr() with non-String objects too?
Generic Preloader And Transitions
Hi,
I am loading several swf's into one movie, and I use transitions for that, using a currMovie and midframe technique (got that from a tutorial). At the same time I would like to use a generic preloader in the main movie that shows without any delay, until the swf is loaded.
Now my question is how I can combine these two ideas.
I will give the full code for both of them as I got them from open sources, and I wonder how to combine those codes, so I can keep the transitions and still use the main preloader!
The code on the button for the transitions is like this one
Quote:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "bio2";
container.loadMovie("bio2.swf");
} else if (_root.currMovie != "bio2") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "bio2";
container.play();
}
}
}
and the code from the preloader including some comments (I think I got it from Oldnewbie on flaskit.com and it is great)on that same button:
Quote:
on (release) {
if(_level0.current_selection == "bio2"){
stop();
} else {
_level0.containerMC.loadMovie("bio2.swf");
/* To test this locally, upload your file
to your server, and use the full URL,
as above to preload your movie.
Make sure you clear your cache,
each time you're testing it. */
_level0.preloader.gotoAndStop(2);
// Sets the preloader clip in motion...
_level0.current_selection = "bio2";
/* Sets the current selection to "bio2",
so that a second press of the button,
doesn't re-load the file again,
while it's already displayed. */
}
}
I tried several combinations and it doesn't work, but it would be so cool if it did!
I hope someone can help me.
Thanks,
Jerryj.
Need A Generic Flash 5 Form Please
I am looking for a generic form that utilizes drop down combo boxes, check boxes and the like. I am building this in FLASH 5. Any help would be most appreciated.
CT
Moock.org - Generic Preoloader
anyone tried mook.org - generic preloader.
I'm having some problem.
I'm loading my external file in movieclip name "externalswf" & right afte that calling a funciton wich preloads that movieclip.
The problem is that when i click another button to load different swf but in same movieclip "externalswf" , it shows me another preloader instead of removing first one.
Generic Lingo Handler
Hi!
In my Director project at different times certain sprite channels need to be set invisible and than visible again for the next piece of movie. So I wrote frame script to make, for ex., sprites 18 and 19 invisible for some time:
Code:
--make invisible--
on exitFrame me
sprite(18).visible = FALSE
sprite(19).visible = FALSE
end
and then to make them visible again after some action that took place
Code:
on exitFrame me
sprite(18).visible = TRUE
sprite(19).visible = TRUE
end
I need to do the same thing to different sprites at some different point. I don't want to write another frame script.
Is there a way to make the script above generic so that it will work with different sprites at different points in the movie (program should tell which)?
Thank you.
How To Make A Generic Scrolling Window?
remember http://www.dream-nation.com ?
well if not, they had a nice current events news thing i flash (among other things) that displayed text inside of a scrolling text box. It appeared as though they created a generic text window with a scroll bar that loaded on a new level(?) and then loaded the requested text. I have a little experience with flash 5 dynamic text box scrolling and loading from external text files but would like to know how it might be possible to create only 1 interface and load text into it.
so say for this script:
_root.text.scroll = Number(_root.text.scroll)+1;
the field 'text' contains the text. so how would the new text be loaded into 'text'?
Emptying Generic Variable Values
hello,
i have some loaded swfs that load different variables into the main timeline through button clicks (such as on (release) {
_root.big.triWall = "yes";
tellTarget ("_root.big") {
gotoAndStop (2);
}
}
or
on (release) {
_root.big.triRoof = "yes";
tellTarget ("_root.big") {
gotoAndStop (2);
}
}
in my main timeline i have a movie clip that performs actions based on these values. now, what is happening is that the first variable value is still in the main timeline when i send another one. my question is, is there a way to get rid of all possible variables by a commandd such as, perhaps,
on (release) {
_root.big.(whatever variable is present without specifically calling it by name)="" ?
thanks in advance....
Generic CFC To Work With Flash Remoting
I am starting to build a lot of data-aware movies that will connect to coldfusion mx. Instead of jumping back and forth between the CFC and the FLA, I was thinking of building a generic CFC which would accept a string (which would be a well formed SQL statement) and return the query result. This way, I would use flash to create the SQL query string, always send it to the same CFC and then handle the result (by storing it in a global var or something like that).
Does this approach have any pitfalls that I am not considering (yes, I know the sql will have to be optimized each time and will not be quite as fast as a stored proc).
Thanks
Wanted: *GENERIC* XML Parser (Flash MX)
I have been beating my head against the desk trying to come up with a one-size-fits-all XML parser and am now staring down the barrel of a deadline, so I'm turning here for help.
I want to be able to take any XML file of any structure, feed it into a *generic* parser that reads through the entire tree structure and dynamically creates named variables corresponding to the node names in the tree, populating the variable's value with the corresponding node value.
In my particular case, I am not concerned with attributes as much as I am with elements, but there may be situations where there is more than one element with the same node name, so there would have to be some way of dynamically allocating a variable name with an incremented value appended to it to make a unique bucket.
An example:
<PersonInfo>
<Person>
<FirstName>John</FirstName>
<LastName>Smith</LastName>
<DisplayName>John Smith</DisplayName>
<Phone>123-456-7890</Phone>
</Person>
<Role>
<RoleName>Admin</RoleName>
</Role>
<Permission>
<PermissionName>Read</PermissionName>
</Permission>
<Permission>
<PermissionName>Modify</PermissionName>
</Permission>
<Permission>
<PermissionName>Delete</PermissionName>
</Permission>
</PersonInfo>
Example 2:
<PersonInfo>
<Person>
<FirstName>James</FirstName>
<LastName>Doe</LastName>
<DisplayName>James Doe</DisplayName>
<Phone>666-666-6666</Phone>
</Person>
<Role>
<RoleName>Temp</RoleName>
</Role>
<Permission>
<PermissionName>Read</PermissionName>
</Permission>
</PersonInfo>
In my application, there will already be text fields onstage that already have instance names that correspond to some of the node names in the XML, so these will automatically inherit the values coming from the XML. These fields are editable by the user, though, and the whole kit & kaboodle needs to be sent back to the server.
So I also need to go the other direction: a generic reconstitution engine that would traverse the same aforementioned tree structure (now housed in Flash), grab the updated values for the variables, whip up a well-formed XML document that has the exact same structure as the incoming file, and send it back to the server.
THE KEY to the whole thing is that it be GENERIC -- it should work no matter what the hell kind of XML file I throw at it.
There -- that shouldn't be too much to ask for, should it?
Surely one of you smart folks must have something like this in your back pocket...?
Any help *deeply* appreciated. I'm using Flash MX.
Best,
futureboy9000@hotmail.com
Creating Generic Activity Interactions - AS 2.0
As I have done all my work for the week already I have been given the basicly pointless taks of creating generic functions, classes and maybe components for a number of possible e-learning interactions for the projects we have, things such as sliders, drag and drops, multiple choice questions, scenario driven things and so on.
How would I go about making things like this generic??? The graphics will always be different and more then likely so will the kind of things needed from them, in many cases we dont know the capacity these things will be used in!
Can ayone give me any pointers, tutorial pointers, open source pointers would be great...I kind of feel I am on a wild goose chase!
Generic Function - Returning Data
Hi all - I've got a function into which three parameters are passed - two values and a name of a variable elsewhere in my program. I want the function to carry out a generic test on these values and if depending on the result, I want the function to get the variable and assign one of three numbers to it. My problem is returning the name of the variable, how do I get the function to say "Right flash, you see this variable, set it to this number I am specifying".
'Return' just seems to return an answer to something, like Return(4/2) which returns 2.
thanks
frank (was elfranko)
|