ActionScript 1/2 :: Bring XML Into Flash Using A Variable
Dec 2, 2009
I have a movieclip (jobImage) which I'm loading an image (Image1, a subnode of Job1) into using XML. But I want to be able to click on any one of a series of buttons which will have that image replaced by a new image (eg. Button2 will load Image2, another subnode of Job1, Button3 will load Image3, etc.).So I have the selected button pass a number back to a variable called "_root.imageTarget". If Button2 was pressed, this would happen: _root. imageTarget = "2";This variable is then combined with the word "Image" to form a new variable (newImage)[code]
Can you show me an example of a very easy implementation in AS2 (action script 2.0) to bring a var from a php file. I have a php script who return a value into the var $result when it is executed, how can i use this var on flash?
I have a movieclip (jobImage) which I'm loading an image (Image1, a subnode of Job1) into using XML. But I want to be able to click on any one of a series of buttons which will have that image replaced by a new image (eg. Button2 will load Image2, another subnode of Job1, Button3 will load Image3, etc.).So I have the selected button pass a number back to a variable called "_root.imageTarget". If Button2 was pressed, this would happen:
_root.imageTarget = "2"; This variable is then combined with the word "Image" to form a new variable (newImage) newImage = "Image" + _root.imageTarget;
Is there any way to bring a duplicate mc with a variable depth to the front on RollOver, and then return to it's original depth on RollOut?I am currently using swapDepths(1000).I can't have the exact depths swapped because there could be any number of duplicates on screen at any given time, so that won't work.The code I have works to a limit; when I mouse over the mc duplicate, it moves to the top just fine, but multiple other mc duplicates below it scramble depths (that is to say, they move up and down in depth at random).I want two thing to happen to only one mc at a time.
1) bring to front onRollOver and return to original position on RollOut
2) bring to front onRelease, and stay there in front.Here is what I have so far.
var num:Number; if(num == null){ num = 0;[code]....
What's the best way to bring in an image with transparency in Flash CS4?I have a logo in Photoshop that looks great on a black background. But when I bring it in as a GIF or PNG in Flash, the edges get really jagged.Is there a preferred way to import this so the edges are smooth?
I have DataGroup with custom item renderers, which can partly overlap each other. I have possibility to select these items. And I want selected item to be above others in the datagroup. But since DataGroup sets childIndexes (from left to right) to its children and we cannot change childIndex of items explicitly, selected item is above all items to the left and under all items to the right. So, what is the way to place selected item above others? I thought of using PopUpAnchor, but may be other solutions exist.
I have created an animation using illustrator files in AE CS3 and now want to convert this to flash so it will play on my website.The problem I am having (or rather my web designer) is getting the transparency in flash.
1. How should I export out of AE
2. Do I need to bring the video into Flash and export out of there to get the transparency?
3. Can this workflow even be done?
4. What is the best way for me to deliver the files to my web designer?
I have attached a movie file of the look I am going for. The birds were done in AE and I want them to move across my home page.
i have the below code, which is basically animating object across the screen, when roll-over happens it pauses the anim, and displays some information. Everything works fine, but when its paused, i wold like that current object to be 'on top' so other items run behind. I have looked at setChildIndex, but didn't have much luck.
I have a menu set up that has about 20 menu items in a circle. When you mouse over each item, a title comes up. The only problem is that because of the depth order, it's hidden behind the other menu items.
Is it possible to bring a div in front of a flash movie that is in full screen?How can I do this if it's possible? I want to make a little box in my site and put some links in it and position it on top of a flash movie that is playing in my site so the user can have shortcuts there.I don't want to put the links inside the flash animation :D
I'm trying to create a dynamic menu in Flash using PHP & MySQL and bring it into Flash using AS3 DataProvider. My menu works fine with a local Array, but I seem to have an issue with the Type being a String and not an Array, but how do I set it up properly so the types are correctSo I started with a typical, non-dynamic array and it works to create my menu:
Code: var items1:Array = [ {myClass:"SCI101", question:"What color is the sky?"}, {myClass:"MATH110", question:"What is the square root of 81?"},[code].....
I am currently trying to create an application that allows a user to upload a photo into flash and then manipulate it. I am building it with AS3 and really cannot have the flash player any higher than 9 if possible.So far i have my upload script working using php from a basic html form. This uploads a jpeg to the 'images' folder on the server giving it a unique filename.Once the upload is successful the user is taken to '../upload.php' with the Flash swf on and tells them it has been successful and 'echo's' back "$newname" (variable for the new file name)How can i get this uploaded image on the server into my swf to display in an emptymovieclip with an instance of 'myObject' (currently a picture of a cat). What is the actionscript needed to call the file into my movie?Have come to a complete standstill on i have attached the fla file and also the upload.php file. The code on upload.php is also posted below
Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
i just started learning flash. Anyways, I have a movieclip that is removed when i quit the game from the menu e.g. removeChild(character). When i press "start" on the menu, i would like the character to re-appear. How can i add him again ONLY if he's been deleted?
How can I save information created by an array in flash to an XML file and then bring it back info another flash movie?
THe basic idea of what I want to do is have a bunch of checkboxes that when ticked add an item to an array the array can then be saved and I can pick up the information to be used in another part of the site.
I am working on a projects showcase page. I don't quite understand how to break up all the info in XML in order to bring it into Flash. I have played around with a bunch of tutorials and samples but none go this deep.... I have 5 categories. In each category there will be a number of projects.
Each project has a description, title, subtitle, and its own image gallery. There needs to be a thumb, medium size, and large size for each image. Its the fact that there are multiple categories, multiple projects and multiple images along with a few individual facts. I am almost considering making an xml file for each category, but that seems silly.
I have to set up an list of events in sort of a calendar format. I'm trying to figure out how I should bring in the data. The data will be stored in a mySQL database. Should I just bring it straight into flash with PHP, or should I use PHP to convert it to XML and then bring it to flash?
We have a client who wants to share with us flash widgets whose contents can be updated using an external file. Our question is: Is it better to use a .txt file (such as notepad) or a .xml file to input data into Flash?
I have a file I am saving out in php that is just a txt file that has an array in it like this:
array ( 0 => array ( 'key' => 0,
[Code].....
Then I am trying to bring it back into flash as an array. I have tried things like "as array" but that doesn't work. converting this "string" from a txt file into an array in flash?
I have 10 mc's. They are all placed in a row on top of each other (like a deck of cards layed out). On rollover I want the rolled over mc to get to the highest depth and stay there until another mc I rollover another mc that gets the new highest depth.
I have created a site that calls in text from an external .txt file. The text file is a flat file that is updateable using PHP. What I need is for the Flash site to reflect the current contents of the text file each time it's updated through the PHP interface. I'm using the standard:
I did get it to 'kind of work' at one point, but the output text would flash 'undefined', then show the contents of my text file, then go blank then start that loop over again. Not acceptable.
I have 3 movieclips in separate layers. inside each they have buttons.I want the mc i hover to move to the front. right now they overlap.see attached. the green cricle appears behind the other 2.
If you go to the Portfolio page im trying to design 3 links that open up a mini section.. if you notice, each link stl has the other links overlaping the clip, because all links are on the same level..I have tried a couple of scripts that say they bring the clip to the front on rollover but have found nothing that works..
I have flash file, there is text, who loads from xml file and movie clip. i need, this movie clip, with all content bring to front, because, now it is behind text, but I don`t know how to do that..
I've tried several codes and none work or i'm just not doing it right i guess.See my SWF.The circles are movieclips with butttons inside. When you rollover the mc, the button extends. All the mc are in main scence in separate layers. I need to bring the mc i hover to the front.
I have made some images into animated buttons that enlarge on rollover, bring each layer to the front on rollover, I am working in CS3 with actionscript 2