ActionScript 2.0 :: AddItemAt() Is Not Adding?
Feb 25, 2006Spent the past hour trying diffrent things but still i can tget it to populate the dd menu.
[Code]...
Spent the past hour trying diffrent things but still i can tget it to populate the dd menu.
[Code]...
I am trying to add an item in arraycollection which is sorted and filtered using addItemAt(). But addItemAt() is not adding item to the specified index.
View 3 RepliesThe name of my DocumentClass is Main. So, what's the difference between :
var myClass:Main = new Main();
var mcInLibrary:MovieClip ;
/////////////////////////////////////////[code]............
I've stumbled across a very interesting tutorialBut, I've noticed a little detail. When you click on the big image of the finished example on the first page of tutorial, it acts like a link. When I have downloaded finished .fla source, links are nicely written in the images.xml file, but the links in the .fla file don't work.
View 2 RepliesAs usual I click on the button and expect the actions palette to become active allowing me to add the code:
on (release) {
getURL("http://www.linkgoeshere.com");
}
But in CS4 it isn't active when I click on the button. When I click on the button to assign an action it tells me "The current selection cannot have actions applied to it".
I have created a progress bar using AS2 before but I only vaggly remember how I know that it involes using some code that deals with percentages but other then that I don't remember how to do it and I really don't remember how to apply it to my my .swf. and have it appear in my HTML page.My flash file was created using AS2 in Flash CS3
View 1 RepliesI am using a Carousel i found online , everything is working fine and it also uses am XML file which contains the icons and the tooltip . If somebody could explain how i would add a hyperlink into the XML file , so each icon points to its desired location , my XML is as follows :
Quote:
<icons>
<icon image="icon1.png" tooltip="Other Species"/>
<icon image="icon2.png" tooltip="Contact us!" />
[Code]....
The XML looks like
<menu_item name="Contact Me">
<img filename="contact.swf" title="Contact" thumbnail="sample_th.jpg" or_w="500" or_h="550"><![CDATA[This is a <font color='#999999'>TEST</font> get use to it.]]></img>
[code]....
Why I trace(_mc1._mc2) will get undefined but not [object MovieClip] ?
ActionScript Code:
var _mc1:MovieClip = new MovieClip();
var _mc2:MovieClip = new MovieClip();
[Code].....
Well I have something like this:
<tests>
<test>1</test>
</tests>
[Code]....
Is there a way to make it add the child properly instead of botching the entry up like that?
Code:
var test:XML = new XML("<tests><test>1</test></tests>");
test.appendChild(new XML("<test>2</test>"));
trace(test);
I am having problems with a flash template that I am redesigning. Currently when the movie loads it automatically starts a song in the background. When you click my music navigation link my music page comes up and there are a few links there that I want to add music to. I also need to stop that background music so the song from the link can play.
View 1 RepliesIs there actionscrip to add a delay to something....
e.g 1.
I click on a button, i want MovieClip1 to move to the right, then i want a 3 second gap and then i want MovieClip2 to move downwards....
it is possible for me to add cut-out shapes onto Flash? I have cut them out in photoshop and pasted on a transparent background, but when I open them in Flash the background has changed to white.
View 1 RepliesI've struggled to get my animation working the way it is currently and now the functionality has been requested to change and quite frankly I just don't think I would be able to work it out as I'm not a Flash developer.[URL]It's a sliding image gallery. There are 13 images and when you roll your mouse over an image a set of filters are applied (to the movieclip wrapping the image) that gives it a glow/drop shadow effect.The images move based on the mouse position.
1. The animation still needs to move on the mouse position, but also the when the animation loads it should automatically move in one direction (images moving left across the stage) but when the user rolls their mouse over the animation then the mouse position takes control. Once the user rolls their mouse away from the animation then the images need to keep moving in the last direction (at a set speed)
2. When the user rolls their mouse over an image it needs to get bigger - but wont some of the images then overlap, so each movieclip would then have to dynamically move to the top of the stack to make sure they overlap the other images correctly
3. The animation needs to loop!?
I'm making a slideshow with 7 pictures in it, what i want to do is add the images to the array.
image names/class(?) are image1, image2, image3, ... image7 and I'm adding them in a loop.
Code:
var arrayName:Array = new Array();
for(var i:int=0;i<6;i++){
arrayName[i] = //this is where I'm stuck
}
need help with that one line of code, and how to get the name right while using numbers in the array elements and, if possible, the class.
I've never done this before, but I'm prety sure its possible to store almost anything in an array.
have a number of movie clips on the stage. Instead of applying action listener to each one, Can I apply actionlistener to the linkage name?
function Start():void
{
mc_1.addEventListener(MouseEvent.ROLL_OVER, moveObject);
[code].....
So I like the whole convert stroke to fill option in the Modify menu, but what if I want to apply a stroke to a fill?
In other words, if I created a circle, then delete the stroke, is there any way to the regenerate the stroke? I mean, if I press A I can see the contours of the fill - can I just turn that into a stroke? In the properties menu, if I click on stroke (which as its colour has the white box with a red diagonal line) it's all greyed out. Am I missing something obvious?
i've spent lots of hours looking up the internet trying many techniques but nothing do.i just want to add inertia to my car.
var car:Car = new Car(); var power = 10; addChild(car); car.x = 470; car.y = 200; var dx = 0; var dy = 0;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyhandler); function keyhandler(event:KeyboardEvent):void {
switch(event.keyCode)[code].............
I'm making a sort of interactive graphic novel and was wondering how would I implement some sort of inventory system. Btw, I'm using Actionscript 2.0
----INVENTORY SYSTEM 001----
You see, I would like the ending screen to show a summary of what the player has done in the game.And certain points in the game would add certain 'items' into the inventory which will in turn affect what is displayed in the summary screen.The 'items' here being words or phrases.eg:
Quote:
You _______ with the _______ and proceeded to _______. But you _______.
For example, if the player chooses Path A, summary screen will show: eg:
Quote: You stabbed the unicorn with the shark fin and proceeded to shag your mistress. But you ate a pecan pie.But if the player chooses Path B, the summary screen will instead show eg:
Quote: You stabbed the tree with the shark fin and proceeded to shag the corned beef. But you smashed a watermelon and caused a civil war.
----INVENTORY SYSTEM 002----
I think with a few modifications, this inventory system could also be used to affect the outcome of the movie depending on what item the player currently owns? Please enlighten me if this system is feasible.
The player is given a choice to pick up a spoon or a fork in the beginning of the game.The player is later faced with a soup crisis. If the player has previously picked up a spoon, the soup can be consumed. Otherwise, the soup is left well alone.
Problem adding an external nav swf (bottom of attached code).1046: Type was not found or was not a compile-time constant: Loader. I used the loader code in another projectwithout problems.It was in my actions layer on the timeline however the loader x,y addChild were NOT in a function.
View 2 RepliesI would like to add a timer that keeps track of total time and also current time that runs next to my seek bar component for my flash movie. How can I do this? For example: 1:11 | 2:04 ... the 1:11 displays the current time of the movie and the 2:04 would represent the total time of the video.
View 20 RepliesI'm trying to add a rectangle to the stage.I've imported the following.[code]
View 1 RepliesI'm making a multiple choice game and I have a dynamic text bok which says "correct" or "incorrect" accordingly. also want to make it automatically "gotoAndPlay" the next scene but I can't figure out how to tell it to both change the text in te text box and move to the next scene after they have answered the question. The "gotoAndPlay" always seems to overwride anything elseso I have the following so far:
ans3.addEventListener(MouseEvent.CLICK, checkquestion1c);
function checkquestion1c(event:MouseEvent):void{ ans1.removeEventListener(MouseEvent.CLICK,checkquestion1a);
[code].....
I am not having much luck creating a link for an icon image on my site. What would be the easiest way to create a URL link to an image?
View 1 RepliesI have imported some info from an xml file into my movie. The info from this file is then displayed in dynamic text boxes. Three of these text boxes show a price which displays fine. However i need the contents of these text boxes to be added together in another dynamic text box called total. I need this total to update as the price fields change. I just cant figure it out.
Here is my code which is placed at frame 1 of my movie:
The last line of code is along the lines of how i think it should work
stop();
bar._visible = false;
bar2._visible = false;
bar3._visible = false;
[Code]....
How do I add a label to a button? Using a component button, in CS3 it seemed quite straightforward however CS4 has me stumped. I am trying to make up a website with a row of buttons across the top to appear in all the pages. I have a controling page names portfolio.fla and several other pages to link in with this one. I have placed a button in the library from the components tab in the windows tab. Then dragged out 5 buttons and have them all working properly and linking up to the other pages, but when I went to place labels on them found myself having problems. Clearly not a good day for me.
View 5 Repliesyou can see the SWF here:I'm trying to make some of the text in the SWF hyperlinksBelow is some of the XML -- how and where do I add the code to link?
<?xml version="1.0" encoding="utf-8"?><root difference="10"><node><year>1970</year> <text>Stephen Galvano installed as pastor at 421 Child St. </text> <pic>1</pic></node>
<node><year>1971</year> <text>The Inaugural International Missions Convention. </text>
[code].....
I am trying to find a way to make a hyperlink out of a word that is being used in a dataList. In my script below, I have 5 columns (eventually, I will hide the url column)
I would like to be able to add a URL link to the company names (column 1 values) is that possible this is as far as I got. If it is not possible, is it possible to put the links on the URL names themselves
[Code]...
i was woundering at the moment my website only has flash objects like navigation bar and ive just madea post saying il pay 20 pound for people to fix my errors
but while i wait for people to reply to that. i was woundering, on my flash site i want a login page relam status but i have been told i can't make them in flash, cause flash just isn't good, its only good for website images etc, not for login details etc
so how would i go about mnaking my realmlist status and login on there?
i have created a comment box with a scroller but i do not want scroller to scroll unless a user adds more text so therefore i will like to add a if statement on this code.
Action script 3
var dragRect:Rectangle = new Rectangle(drag.x,drag.y,0,bar.height - drag.height);drag.addEventListener(MouseEvent.MOUSE_DOWN, dragMouseDown);[code]....