ActionScript 3.0 :: Add Text Or A Picture Without Changing The Flv ?
Sep 3, 2011
The idea is to make a flash object that takes data (text and images) from a mysql database and displays them. I know AS 3.0 can't talk directly to mysql but a php script will do fine. the only problem i have is that the flash file must be variable in length.I mean that if someone wants to add some more text or a picture that it can be done without changing the flv istelf.
So the flv knows what to do with a picture, or text and works in blocks, as example: each block is 20 seconds and the first block is a picture, the second is some text, ... later i want to add/remove a block.
How can I create a button to control the width of a certain picture by just sliding the button on a scale in Flash 8? (I've found the actionscript for the button in a sample file in Flash MX. It looks like this:
I want to use flash slideshow for my site to make pictures change automatically after a few seconds and the possibility for the user to change it manually. I don't know about flash so much and the only thing I was able to do is changing the pictures manually by buttons..
I want to make a picture gallery and use buttons that move you from picture to picture and backwards, but I don't want to tell button 1 to go to frame 2 and button 2 to got to frame 3 and so on (I hope you know what I mean)Can I use on button on a separate layer with the same action set? I tried something like that, but it didn't work:
on (release) { thisframe =+1 } [code]........
but it didn't work. I'm kind of new to any action script other than gotAndPlay, easy functions and all that.
The desired affect is simple: I have a single button... with each click I want it to load text into a dynamic text field and load a corresponding picture or movieclip.There are only three unique text/image combinations- after its displayed the third, with the next click I want it to just start over. All the text functions perfectly with each click.
The problem is:I use "createEmptyMovieClip" then use the resulting clip as a loader clip.. With the first click I want a movieclip from the library to load, so I use the "attachMovie" method- it displays the first library fine.With the next click I want to load an external swf- so I call the "loadMovie" method of the loaderclip... The external swf loads just fine replacing the first library clip.The third clip is where I have problems... now I want to load another library item into the loaderclip... so I tried using the attachMovie method again but the external swf remains static... then with the next click, I discover the first library item no longer loads and the external swf remains still playing- it's like once it's been loaded into the loaderclip it cant be moved...
So I tried adding the "unloadMovie" method in the code for the third click.. it successfully removed the swf... but the next line of code immediately after the unload statement, doesn't work. The line calls the attachMovie method for the loaderclip... but the library item doesnt load... Oddly enough, with the next click, the first library item now does load as if everything's fine... It seems like you cant use the unloadMovie and attachMovie on the same executing code? if that makes any sense... the basic idea was that if I couldnt get the attachmovie method to replace the loaded external swf, then I would use the unload method to remove it, then have code immediately after, to then execute the attachMovie method... but it still doesnt load the library clip. and I know it's not a type-o, because when I comment out the loadMovie and unloadMovie statements, it loads both the library items perfectly ? The code is below
var increment:Number = 1; var verbiage1:String = "Hello World1"; var verbiage2:String = "Hello World2";[code].............
I'm taking a stab at learning adobe cs4 flash. How can I combine different text and pictures into 1 picture? For example, Iposted a link of tutorials below:URL...Now say I would like a background to fade in, then the picture of a car, then the text. How would go about this? I already have all the images separated (background, car, and text using photoshop), but I would like the background to slowly fade in, then make the car slowly fade in while coming from the left of the screen, and then the text fades in.
I'd like to have a flash document, that is placed on a webpage, BUT in the 'stage' there would be 4 or 5 pictures. a person would click on the picture they want, and it would then be shown in a preview area on the stage. There would also be a cpl input text fields, and when a person types something in this box then it would also be shown in the preview area.
in the if statement below ? I'm looking to add a description for each picture in a text field... something like: if picture1 selected, text="", else if picture2 selected, text="", else text="";
I recently used the loadMovie action to load a .swf file to a target in the movie which it was being called from. Then I tried calling a picture to another target in the movie, but it did not load the picture as intended. I read about it on my book, but it didn't seem to work. Is there anyways on calling a picture into a target in the movie without placing the picture inside an swf file?
I have just been to a really nice website that has some really nice use of Flash on it.... I'm totally wowed by the resizing picture effect though? When each picture loads the loading frame resizes to the new picture size.
I am trying to build a site that would give users the ability to upload a picture to a picture frame on my site. I would like AS3 to dynamically re-size, and upload the file from an upload bar under the frame.
I'm totally wowed by the resizing picture effect though? When each picture loads the loading frame resizes to the new picture size.It must be some sort of actionscripting but how is it done?
I want to make some buttons and use the buttons.fla library. The button is inserted and given an instance name. A second button is inserted (same kind) and given a new instance name. But when I am trying to change the label text in one of my buttons the text is changing on the other button as well. I believed they where separate instances?
I have a code that creates 10 dynamic text fields, along the "y" axis, based on a loop.
What I want to happen is, for each text field that is created, i want the numbers to constantly change based on a timer (they'll all change at the same time, but to random numbers).
Right now, the code below changes the numbers, but keeps stacking the new numbers on top of the old...
Code:
Code: var timer:Timer = new Timer(100,0);//called every Xms, repeated infinately (0); timer.addEventListener (TimerEvent.TIMER, doNumber); timer.start ();
I'm trying to get the letters in a word (each letter is an individual text object) to cycle through three different colors when clicked. Right now, all they do is change from their original color, blue, to black when clicked. No further "cycling" occurs. I'm appending the code. The part of interest is (probably?) in what is presently (and inaccurately) the "traceTextEvent()" function/method. It starts around line 90 of the code.
Is it possible to change the text property of a text field that is contained within a sprite? I've been trying but can't come up with the right syntax. Here is what I'm doing:
I've created a sprite named "lessonSprite" and added a text field to it in one function. Now, in another function, I'd like to change the text in the field.
I have a Dynamic Text box in my Library. I drag it to my main stage and give it a name..it is now a movieclip. The name is 'mcAdmin' I added an event listener for MOUSE_OVER I want the text to change color, but for now I'm just trying to change the text; however, it's not displaying the change in text I want. I do a trace, and the change is in there on the output window, but it is not displayed as such.How can I :1) use AS3 to change the font color of the text2) use AS3 to change the text and have it display?
function onMouseOver_txtAdmin(e:MouseEvent):void{ Mouse.cursor="button"; //Current mcAdmin text is 'Administration' //I want to change the color of Administartion on Mouse_Over
I have a textfield that is dynamicly created which contains some text and has a textformat applied to it, which works fine, and I have my happy little text field.
the problem comes when I try to change the text and textformat after an event. I am doing it as so:
I just started playing with scripting and here is a question i got. I got 1 button.A movie with containts 3 graphics , graph1 , graph2 , graph3 Each graphic contains a Dynamic Text field. The var of that field within graph1 = text1, graph2 = text2 etc. On release should put the text "test" in each of the textfields and should play the whole movie wich contains the graphics with textfields. this is the code i made
Code: on (release) { set ("_root.movie.graph1.text1", test);
i got five images, and five buttons, every image has a color, and lets say we start at the red one. When i click the the green button i want the green image to fade in.. i fugured out a way to do this on the timeline, but then i have to have a black box first fading in to remove the old picture and then start fading in the new picture..
I made a simple picture slideshow with a timer, prev/next buttons, pause/play buttons and jump buttons. Everything went good so far.Now i'm trying make every picture go to a URL when the picture is clicked but only the link on the first frame goes to the URL when clicked the other 5 buttons do nothing when click.(FYI: I made alpha 0% buttons in a layer above pictures)I tried two different codes but both have no effect.
as layer
Code: stop(); var nextImage:Timer = new Timer(3000); nextImage.addEventListener(TimerEvent.TIMER,playNext); nextImage.start();
I'm trying to put a text in a dynamic text box. The text element, however, is placed dynamically:
var topText:myDynamicText = new myDynamicText(); topText.name = "NameTextTop"; topText.text = String("Text 1"); addChild(topText); topText.text = String("Text 2");
Placing the text element isn't the problem, but I cannot seem to change the text in the element. As you can see, I tried placing the text before and after putting the text element on the stage. Both didn't work. The text element is creating from scratch by adding text with the Text Tool. It's single line dynamic text, Arial regular and the text characters have been embedded. Can anyone tell me what might be the problem, because I'm completely stuck.
is some thing like i have a menu as the background, then if i click the picture, another menu rollover the background picture covering ard 40% of the background.any1 can lead the road for me >< me jus start learning AS3 ><
Users can write a text, modify it (in type, color and size) and choose a picture (which is loaded through a XML-file) for an e-card, then send it to whomever they want. But when they have made the modifications, how do I save the card, and then store it in a database?
I have this piece of code which basically takes some text from an XML file and displays it into a dynamic textbox called "a1" then the same text into another dynamic textbox called "a1h":
Code:
var a1Node=findNode(rootNode, "a1"); a1=getValue(a1Node); var a1box:String = a1; a1h = a1
Say if "a1" is "England" is there a way to make "a1h" say a shorthand version...something like "ENG"I could use a simple if else function but I have lots of dynamic textboxes and lots of different countries.