Exchange Symbols On Stage Using Scripting
Is it possible to exchange a symbol with another using actionscript? For instance, a cat symbol is on the stage. I want this to become a rat. How can I make it possible by using actionscript?
FlashKit > Flash Help > Flash General Help
Posted on: 07-17-2003, 01:17 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Scripting Symbol Within Symbols..
Hi, I'm new to the forms and am in need of help. The title says it. For example:
If there is the Stage; then a symbol called NW_mc on stage; and then there is a symbol called NB_mc in the NW_mc symbol; how do I use actionscript to call up the NB_mc symbol??? Everytime I try to do this, there is a error that says: Cannot access a property or method of a null object reference.
If my code looks like this:
NW_mc.NB_mc.addEventListener(MouseEvent.MOUSE_UP, windowA)
function windowA(evt:MouseEvent): void {
NB_mc.gotoAndStop(2);
}
What am I'm doing wrong????
Thanks.
Scripting Symbols To Appear And Disappear
Does anyone have code to set up a situation where you can say when symbol "A" is clicked symbol "C" will show up at these coordinates. And that when symbol "B" is clicked that symbol "C" goes away and symbol "D" appears. I have multiple labels set up in the file and would like for the symbols that appear to stay when moving from label to label, I don't know if that makes a difference.
Thanks
Symbols Don't Go On The Stage
Hi!
I have a serious problem in my hands. I have made a series of symbols ( all movie clips ). Now that I want to place them on the main stage the Flash doesn't let me. When I try to drag & drop a symbol from the library to the stage I get a crossed circle. Why is this so, and how do I fix it?
Best Regards
George
Symbols Look Like Little Dots On Stage- Help
Hi.. I imported pngs as bitmaps for part of the animation and in trying to do everything "right" i converted them to graphic symbols (well all but two that will need a hyperlink so they are button symbols). When i converted them to symbols, i then deleted the pngs from the library in an effort to minimize what was already there in the file (the origionals are on my hard drive still though).
Now when i'm trying to bring instances of them into the timeline, they are just showing up as dots (also showing up as just dots in the library preview pane).. I tried reimporting the pngs to see if they needed to be there in an effort to see what i'm actually doing with no success.
I've never had this happen before... what did i do and how do i make it right?
Thanks,
Confused newbie
Symbols Dragged To Stage Are All The Same
I'm hoping you guys can help me with a problem that has me completely stumped. I've been working on a project for a month or so and all of a sudden, any symbol I drag from the library switches to a symbol of a grinning mouth, which is one of the symbols in the porject. Same thing happens if I copy and paste. There are 75 symbols in the project, if that is in any way significant. Anyway, that is my predicament.
Loading Mc Symbols To Stage
Hi, I have some actionscript that loads a movieclip symbol to the stage and positions it as so.
function DisplayContent() {
var newMovie:intro_info = new intro_info();
newMovie.x = 400;
newMovie.y = 315;
this.addChild(newMovie);
}
DisplayContent();
I would like to set up a button that loads a new mc symbol which will replace the symbol that has already been loaded from the script I have posted above. Can anyone help as I am still very much learning AS3 and my head is starting to hurt
New Symbols Always Centered On Stage
Hi,
This is probably something simple but its driving me nuts. Its an authoring mode preference problem (me thinks).
I'm working on a 1024 X 768 project and when I'm working on the stage on the main timeline I keep the rulers showing and 0,0 is near the top left and I can easily scroll over or hand grab over to the right side in the 1024 area. Everything is fine.
But when I create a new movie clip (F8) the stage is centered with 0,0 in the center and working area of about 1400 X 1400 pixels. So on the ruler the x -axis goes from about -700 to + 700. The problem is that I can't scroll or hand grab the stage and move it over.
Like I say, its driving me nuts. Anyone know how I can reset this?
Thanks,
Randy
Placing Symbols Randomly On The Stage
hi,
im making a game and want some symbols to appear on the screen in a different random place each time i load the game up. does anyone know what code to put on them to make this happen?
cheers
[CS3] Loading Symbols On Stage From The Library.
I have a bunch of graphic files that I want to load to the stage during runtime. I can't figure out what the code is to allow me to do this. I know how to load separate .swf's but have never worked with just loading something within the actual swf. Can someone give me at least a push in the right direction?
edit- wait so would the best way to do this is to make it a MC and add a linkage identifier? Is that the only way?
Stage Moves/Changes Size In MClips & Symbols
When you've set the size of your stage..mine for example is 559 X 264, you kind of wish it would look that way when you were editing/creating symbols/graphics/and movie clips.
But for me its not...its some other huge size in those modes and I always lose my place as to where I am scale wise and location wise.
Seems like sometimes the stage is cut off or shoved up next to the left side of the screen with no scrool bars to move left. I know this sounds weird but I know I am not a loon!
He he he.
I just want the stage to look the same size to me when I am working in my library objects. Is there some VIEW or WINDOW command that I don't know about.
Thanks in adavance to all you pros out there!!
~Wendy
Puting Movie Clip Symbols Onto Stage?
when i try to put my movie clip symbol on stage it just shows the first frame and not the others.
can anyone help?
sorry if this is a stupid question but theres apparently no such thing
Interface With On Stage Symbols From External Classes?
Hello. This is my third attempt. I broke this to the most simplest form and I cannot get it. I have an external class InterAction.as I have a MovieClip on the stage named PressMe_MC. I am trying to access it so I can make it a button or change color.
Code:
package
{
import flash.display.Sprite;
import flash.display.DisplayObject;
import flash.events.MouseEvent;
public class InterAction extends Sprite
{
public var Path:Sprite = new Sprite();
public function InterAction()
{
trace("InterAction Class");
//var Container:Sprite = new Sprite();
//Path.name = "PressMe_MC";
addChild(Path);
//var target:DisplayObject = this.stage.getChildByName(getChildByName("PressMe_MC"));
//trace(getChildIndex(target)); // 0
}
public function addPathMC():void
{
Path.addChild(this.stage.getChildByName("PressMe_MC")); //make sure you assign a name to your pathMc
}
}
}
On the first frame on the stage
Code:
import InterAction;
var DoInteract:InterAction = new InterAction();
addChild(DoInteract);
DoInteract.addPathMC();
this is the error I am getting
InterAction Class
TypeError: Error #2007: Parameter child must be non-null.
at flash.display:isplayObjectContainer/addChild()
at InterAction/addPathMC()
at Main1_fla::MainTimeline/Main1_fla::frame1()
Interface With On Stage Symbols From External Classes?
Hello. This is my third attempt. I broke this to the most simplest form and I cannot get it. I have an external class InterAction.as I have a MovieClip on the stage named PressMe_MC. I am trying to access it so I can make it a button or change color.
Code:
package
{
import flash.display.Sprite;
import flash.display.DisplayObject;
import flash.events.MouseEvent;
public class InterAction extends Sprite
{
public var Path:Sprite = new Sprite();
public function InterAction()
{
trace("InterAction Class");
//var Container:Sprite = new Sprite();
//Path.name = "PressMe_MC";
addChild(Path);
//var target:DisplayObject = this.stage.getChildByName(getChildByName("PressMe_MC"));
//trace(getChildIndex(target)); // 0
}
public function addPathMC():void
{
Path.addChild(this.stage.getChildByName("PressMe_MC")); //make sure you assign a name to your pathMc
}
}
}
On the first frame on the stage
Code:
import InterAction;
var DoInteract:InterAction = new InterAction();
addChild(DoInteract);
DoInteract.addPathMC();
this is the error I am getting
InterAction Class
TypeError: Error #2007: Parameter child must be non-null.
at flash.display:isplayObjectContainer/addChild()
at InterAction/addPathMC()
at Main1_fla::MainTimeline/Main1_fla::frame1()
Help: Use Actionscript 2 To Manage On Stage Movieclip Symbols
I'm developing a site which I want to display certain number of moviclip symbols which are already in stage. Let's say they're named "holder1", "holder2",..."holder15".
As a result of a query to a database if I have 2 results I would like to display only "holder1" and "holder2".
One of the solutions I've thought is to use a switch case routine, that depending on the number of results of the query display the number of "holders", but imagine the amount of code this would require.
Is there a better way to do this ?
Thanks
lmvalenzuela
Apply Gradient Fills To Symbols On The Stage
Hi!
Is it possible to apply trough ActionScript 2 gradient fills to a symbols on the stage?
I use the MovieClip.beginGradientFill method to apply gradient fills to symbols that are drawn through ActionScript and I wonder if it's possible to apply in a similar way gradient fills to symbols that are on the stage.
Any help would be fantastic!
Scripting Root Stage To Disappear When A Button Is Clicked
Here's what I have so far:
http://www.clay.bellmor.com/PFC/
When either "news" or "promotions" is clicked I'd like to make the background fade, or darken, or preferably blur. I tried _root._visible = false etc, but it changes everything.
Also, the two bulletins "news" and "promotions"... notice how the promo is above the news and they're both under the plant (which is good on stage but not when they're clicked)... how can i fix that?
Thanks for any help!
Editing Graphic Symbols By Copying And Pasting To Make Slightly Dif Symbols
Hi!
I am using flash to create moving people symbols. I created a "singular person" symbol and saved it, I then copyed a few to make a "bunch of people" symbol, when I go to edit these copyed and pasted symbols each saved symbol changes. Also I am saving them as graphic symbols at the moment.
thanks,
Helen
Overlapping Symbols Inside Symbols With An Alpha Tween
Hello,
In the attached example, Is it possible to prevent the purple overlap area from showing and just be red since red's on top? I have characters that use symbols for arms, legs, etc. and I want to fade them in and out sometimes. The problem is, the areas where the limbs overlap look weird so I have to resort to converting them to shapes on one keyframe. This seems limiting and annoying. I was wondering if there's a command, extension, or property to fix this. Thanks in advance.
Is It Not Possible To Assign Instance Names To Symbols Within Symbols In Flash CS3?
Detail question on nha khoa Adobe group
OK, so I have a player object. I created a symbol that is linked to the player. Inside the symbol I have 2 symbols. 1 is the sprite that displays the player, the other is a rectangle box that is used for collision detection.
I tried giving the collision box an instance name in the property editor so I could reference the collision box from code. The Player symbol is linked to a Player class I wrote earlier so it creates an instance of the Player class. The error I get is this:
ReferenceError: Error #1056: Cannot create property myCollBox on Player.
myCollBox was the instance name I gave that collision box symbol. I thought maybe I had to make the collision box also linked to a class to be exported for action script, but that didn't seem to help.
Var Exchange Possible?
I really need some advice about ColdFusion and Flash.
Is there some way to use CF variables directly in flash, then I mean output from <CFoutput>'s on .cfm pages ? ? ? ? I need to build in checks into a menu that is made in flash and gets some checks about redirection from coldfusion.
Is there some flash-Coldfusion expert here to advise me if it's possible before I start building a site and then can't get it to work.
Hope someone want's to help me.
BANNER EXCHANGE
Hi All,
Um I'm just wandering how do I go about adding an exchange banner to my flash site. my site is all flash & I was wandering if I could use copy & paste the code from Amazon that was sent to me onto my associate banner..thx all
Flash & FCP 4 Exchange
I have just put in 3 days on my first final cut pro gig, and have found a mess of file format problems and app import/export problems that I would love to untangle so we can make our deadline.
We need advice on FCP and Flash interchange.
This project was shot on DVcam, footage was logged and captured in iMovie, "plates" for surrounding the video were constructed in Flash with the video sized and placed within the "plate" in Flash as well. Then the movies are being brought into FCP 4 to paste the original sync sound back on the Flash .mov since they could not find a way to get the video audio in and out of Flash (Is there a way to do this?). Flash is also being used to size and "marry" three simultaneous DVcam clips from three different cameras into one "plate". All this has been done without careful consideration of app settings for setup, import and export to and from the various apps.
FCP Users - From what I have seen of FCP 4, it seems to me that ALL of this could probably be done within FCP.
What file format, frame rate, bit depth etc.. would we want to export our Flash plates in, in order to use them as a layer in FCP? In FCP 4 what steps would be necessary to make this a mask and size the video to be seen within the "plate"? Is this something FCP can do using the mask as a video layer? A step by step explanation would be terrific.
I don't know the intricacies of how it works, but it seems to me that in the FCP viewer, under the "Motion" tab, it would be possible to size and put next to each other 3 clips within one screen (they need to actually butt up against each other on the frame line) is this possible? If so please give me the steps involved in an easy to follow way.
All of this is going to DVD for viewing on computers and NTSC monitors.
Thanks for your time and attention.
newbie
spiceyjeff
Text Exchange
davep@echurchessentials.com
I am seeking to create two seperate flash files that will reside within the same folder...one will have a text-input field, the other file will have a dynamic text field. I want real-time text-data transfer (no submit buttons) from one file to the other. This is easy to do when both fields reside in the same movie, and I have seen it done between two seperate movies. How can I do it? Please be as clear and precise as possible. Thank you for your help.
Link Exchange
Hello
We are interested in exchanging link quality sites from some of our websites, we have over 20 sites here is a few of our sites:
Web Hosting & Domain Names ,
Link Exchange Directory,
Velnet Dating Software,
Ecommerce Shopping Cart web design.
Please let me know if you are interested in a link exchange with us. PM me if you would like to exchange links.
By the way, you can also post your link exchange request at our link exchange forum which can be found here:
Link Exchange Directory
Regards,
Claudiu
Flash Exchange Help
I didn't know where else to post this question so here it goes:
I have a flash project that I want to put on Flash Exchange and sell it like
others do. I understand I first have to send my work to Flash team in order
for them to check it.
But since I live in south-eastern Europe I don't know how to charge it.
PayPal and similar paySites are not supported for my country.
They only way I can think of is by bank account, and everywhere and everyone
told me here and in other countries that bank account transactions are not
preferable for flash exchange.
Can anyone help me in this matter in any way? Country of origin: Serbia (ex
Yugoslavia).
Thanks in advance
Luka
Flash Exchange Help
I didn't know where else to post this question so here it goes:
I have a flash project that I want to put on Flash Exchange and sell it like
others do. I understand I first have to send my work to Flash team in order
for them to check it.
But since I live in south-eastern Europe I don't know how to charge it.
PayPal and similar paySites are not supported for my country.
They only way I can think of is by bank account, and everywhere and everyone
told me here and in other countries that bank account transactions are not
preferable for flash exchange.
Can anyone help me in this matter in any way? Country of origin: Serbia (ex
Yugoslavia).
Thanks in advance
Luka
Flash XML Exchange Help...
I understand that XML is used for exchanging information. My knowledge of it ends there. I have tried online tutorials, but they seem to be explaining things I don't need to know.
I want to make a Flash application where the user can type in a word or phrase. If that word or phrase is defined in the XML on my server, it will return a programmed response specific to the user input.
Can anyone offer some advice or a tutorial on how to do this with XML and Flash?
Thanks.
Graphic Symbols And Movie Clip Symbols
what is the difference between creating a graphic symbol from an image with it's own timeline animation and creating a movie clip symbol from the same image that can be animated in the main timeline?
Or do I totally misunderstand the difference between the two?
CAN U LINK AN EXCHANGE BANNER?
Hi All,
Um I'm just wandering how do I go about adding an exchange banner to my flash site. my site is all flash & I was wandering if I could use copy & paste the code from Amazon that was sent to me onto my associate banner..thx all
Exchange All Variables Of One Movie With Another?
(F5)
hi,
is there a command, that lets me exchange all variables from oe movie file to another ?
I'm loading variables from a php file into a dummy movie.
I want to use the onClipEvent(data){} function to add another command once the data is loaded.(unfortunately i can't use this function with the _root level , otherwise I could just load the variables directly into _root, where I actually need them)
Now once the variables are loaded I want to transfer those variables to the _root level, where I have to use them.
Now is there another way to do that than doing "_root.sender=sender; _root.recipient=recipient" and so on..
There are something like 20 variables to be loaded...
TIA
Convert Currencies Exchange
I'm trying to convert US. currency to foreign money currency
also foreign back to USD. How can I write the script with function to make it work?
Variable Exchange Between Two Swf In Two Frames
I know this question has been asked before but I don't understand other peoples answers. I'm hoping to get a "fresher" answer.
I have two html-frames: One is the navigation and the other is the content. Both html-frames are showing the informations with swf-files.
now I want to pass variables from the navigation-swf to the content-swf in the other html-frame.
It has to be a variable, because I want to send the path of the new content after a button click.
I know it's a simple question but I don't understand the LocalConnect-command. It would be nice if someone explane the script I need.
Thanks already now!
Email Via Exchange Server?
hello,
is it possible to use an ms exchange server instead of a smtp to send emails? any tutorials maybe?
thnx in advance
Arbitary Data Exchange?
I know Flash has XMLSockets, but it's been over 2 years since I actually used the IDE. So does Flash have any way to exchange arbitrary data with a server without the XML?
I realised I could create a TSC in Flash, what with its drawing API, and the fact a Java TSC already exists, I figured porting it from Java to AS shouldn't be too hard (even if they use totally different OOP paradigms, classes Vs. prototypes)
[F8] Banner Exchange Code
Is there any possible way to imput a banner exchange code into a flash movie? I know I could just do it in html... however, I want it to be part of the flash website. To make sure you understand, I want the code in the movie but what the visitor actually sees is the banner produced by the code.
Any suggestions would be appreciated.
DW
Exchange Data Between PHP And Flash
Hi,
I've read that we can exchange data between PHP and Flash.
i found several ways how to do it but nothing is written regarding the best solution, or the most secured or the most easy to implement.
Code:
from PHP to Flash :
- using FLASHVARS (from EMBED and OBJECT)
- using SendAndLoad (from LoadVar) and POST (from HTML form)
and
Code:
from Flash to PHP:
- using object.send
Could you tell me pros and cons about them ?
is there a better way ?
thanks a lot,
A.
Variable Exchange And Nested .swf's
menu.swf loads a photoAlbum.swf into empty_mc
button.onPress, I want to change the picture in photoAlbum.
?Do I need to use localConnection to do this? I am having trouble getting the connection to work and it's really hard to trouble shoot.
Exchange Var Between Flash And Html
Hi! I'm doing a stage. I'm making the page portfolio. I have 3 section, and 40 samples of image-text-video for each section.
I open a pop up html (finally succeded!) and I play the movie.
But I don't wanna make 120 page html to present my videos...
How can I send my variables to my html page (folder, and the numero of the sample), and how do I use them?
I don't want the variables to be shown in the url, and I don't wanna use php, asp or a code that I must put on a server to be able to see what happen... I don't have a server installed on my cpu...
I want it simple... wich mean that It's really complicated ^_^
Later, I'm gonna need to send the variable "language" to another swf...
could you help me? I feel very annoyed, cause the keywords that I writte in google send me to the tutorials I needed days ago. lol. My teacher doesn't reply my mails... if you have a tutorial with a great example, forgive me to not have found it... I would have loved to, all I find is tutorials that are not precise enough... they say how to send my var (I didn't understood) but not how to use them with html... I don't want asp, php, pear etc... so I feel out of option... how do I declare that I wanna send them with post and not get... I can't understand the english language very well (actually, even the french stuff is like chineese) I need a concrete example...
Thanks a lot ^_^
(oh, I wrotte a short message this time)
Actionscript To PHP Data Exchange
Hello everyone,
I'm trying to call a php file from a MovieClip, only problem is I need to pass some data to the php file for it to generate the appropriate HTML.
I've tried getURL() with POST and GET values but the values I need to send aren't on the _root timeline so it doesn't pass the values I need.
What would be ideal is some way of calling the php and passing in values of your choice.
If anyone knows of a way round this I would be infinitely grateful.
Thanks!
B
Exchange Var Between Flash And Html
Hi! I'm doing a stage. I'm making the page portfolio. I have 3 section, and 40 samples of image-text-video for each section.
I open a pop up html (finally succeded!) and I play the movie.
But I don't wanna make 120 page html to present my videos...
How can I send my variables to my html page (folder, and the numero of the sample), and how do I use them?
I don't want the variables to be shown in the url, and I don't wanna use php, asp or a code that I must put on a server to be able to see what happen... I don't have a server installed on my cpu...
I want it simple... wich mean that It's really complicated ^_^
Later, I'm gonna need to send the variable "language" to another swf...
could you help me? I feel very annoyed, cause the keywords that I writte in google send me to the tutorials I needed days ago. lol. My teacher doesn't reply my mails... if you have a tutorial with a great example, forgive me to not have found it... I would have loved to, all I find is tutorials that are not precise enough... they say how to send my var (I didn't understood) but not how to use them with html... I don't want asp, php, pear etc... so I feel out of option... how do I declare that I wanna send them with post and not get... I can't understand the english language very well (actually, even the french stuff is like chineese) I need a concrete example...
Thanks a lot ^_^
(oh, I wrotte a short message this time)
How To Exchange Scenes In Flash?
Hiya. I'm a newbie at Flash and I've recently begun making Flash movies at home. Because I orignally have used Flash 5 on my school computer, I was in the center of creating one movie at home when I got bored at school and started another scene in another file.
What I would like to know is: is it possible to transfer one scene with Flash in two seperate files to each other? I looked this up before and heard to copy the frames in the time line then paste the into a new scene, but because both files have identical symbol/layer names (e.g., bg, skin, ect.) I didn't write over the symbols, so many of the files were interchanged and misplaced in the school scene.
After that, I thought to rename all the layers and files and then go one from there, but the files continued to interchange, causing much disorganization. Should I put the files in different folders? Please help me, and thanks for your time.
Sincerely
Adia
Dynamic Data Exchange --Please Help
Hello, I have a list box (named "myName") on the main stage with items in it, there is also a dynamic text box named "display". I'm trying to select an item in the list box and have the dynamic text box display database values relating to that item. I'm using ASP and have the server side aspect done. The ASP page takes write a variable string to send back to Flash and then the response.write sends the name and value pairs to the page so flash can get them.
The flash movie is just 1 frame and i have these actions on it own layer
myName.setChangeHandler("myHandler");
//Custom handler for myName
//This handler is called each time selection is
//changed.
myHandler = function (component) {
myVars = new LoadVars();
myVars.curName = myName.getSelectedIndex()+1;
myVars.onLoad = displayInfo;
myVars.sendAndLoad("wpg.asp", myVars);
};
//Extracts db info and displays it using HTML
displayInfo = function () {
display.htmlText = "";
myTotal = this["total"];
if (myTotal != 0) {
display.htmlText += "<font color="#999999" size="11"><b>There are <font color="#CC6600"><i>"+myTotal+"</i></font> entries for this month</b></font><br>";
for (var i = 0; i<this["total"]; i++) {
display.htmlText += "<font color="#CC6600" size="11"><b>"+this["myName"+i]+"</b></font><br>";
display.htmlText += "<font size="11"><b>"+this["myAddress"+i]+"</b></font><br>";
display.htmlText += "<font size="11">"+this["myPhone"+i]+"</font><br><br>";
}
} else {
display.htmlText += "<b>No Entries.</b>";
}
};
I've tried to fool around with this and the else statement ("No Entries.") is the only thing i can get to display. Any ideas why this may be?? Please Help
Here's part of the ASP code:
Dim curName, responseVars, counter
curName = Request ("curName")
counter = 0
Set connDB = Server.CreateObject("ADODB.Connection")
connDB.Open "DBQ=" & Server.MapPath("menuwegmnu.mdb") & ";" & _
"DRIVER=Microsoft Access Driver (*.mdb)"
sql = "SELECT * FROM rerans WHERE [name] = '"&curName&"'"
Set rs = connDB.Execute(sql)
while not rs.eof
responseVars = responseVars & "name" & counter & "=" & rs("name") & "& address" & counter & "=" & rs("address") & "& phone" & counter & "=" & rs ("phone") & "& cusine" & counter & "=" & rs ("cusine") & "& eat" & counter & "=" & rs ("eat") & "& menu" & counter & "=" & rs ("menu")
counter = counter + 1
rs.movenext
wend
responseVars = responseVars & "total=" & counter
Response.Write(responseVars)
set rs = nothing
....
Adobe Exchange Combo Box
i have searched for a tutorial or someone to help me learn how Adobe does the combo box in the exchange part of their site, Exchange. The categories combo box is what i am talking about.
|