use a table to assign videos to buttons
Thanks in advance for any help you can give me!
I have 5 buttons clip from movie. When a user hovers over a button, I want a video clip to play. When a user clicks this button, a spare film clip plays. I'm trying to use an array to assign some video clips for some buttons and actions, but I'm not doing something absolutely right. I can get a button works fine, but then problems get the other buttons work.
Here is the code I have:
var currentPage:MovieClip;
var currentScreen:MovieClip;
var prevPage:MovieClip;
var currentButton:MovieClip;
var arrNavigation:Array = [{button: m1_mcButton, page: m1_mc, screen: s1_mc},]
[{button: m2_mcButton, page: m2_mc, screen: s2_mc}]
for (var i = 0; i < arrNavigation.length; i ++) {}
. button.buttonMode arrNavigation [i] = true;
. button.addEventListener [i] arrNavigation (MouseEvent.ROLL_OVER, onButtonOver);
arrNavigation [i].button.addEventListener (MouseEvent.ROLL_OUT, onButtonOut);
arrNavigation [i].button.addEventListener (MouseEvent.CLICK, onButtonClick);
}
function onButtonOver(e:MouseEvent):void
{
for (i = 0; i < arrNavigation.length; i ++) {}
if (arrNavigation [i] key == e.currentTarget)
currentPage = .page arrNavigation [i];
currentPage.gotoAndStop ("over");
}
}
function onButtonOut(e:MouseEvent):void {}
currentPage.gotoAndStop ("out");
}
function onButtonClick(e:MouseEvent):void {}
for (i = 0; i < arrNavigation.length; i ++) {}
if (arrNavigation [i] key == e.currentTarget)
currentScreen .screen = arrNavigation [i];
arrNavigation [i].screen.gotoAndPlay ("over");
}
}
If your buttons are movieclips, use:
var currentPage:MovieClip;
var currentScreen:MovieClip;
var prevPage:MovieClip;
var currentButton:MovieClip;
var arrNavigation:Array = [{button: m1_mcButton, page: m1_mc, screen: s1_mc},]
[{button: m2_mcButton, page: m2_mc, screen: s2_mc}]
for (var i = 0; i)<>
arrNavigation [i].button.buttonMode = true;
arrNavigation [i].button.addEventListener (MouseEvent.ROLL_OVER, onButtonOver);
arrNavigation [i].button.addEventListener (MouseEvent.ROLL_OUT, onButtonOut);
arrNavigation [i].button.addEventListener (MouseEvent.CLICK, onButtonClick);
. button.ivar arrNavigation [i] = i;
}
function onButtonOver(e:MouseEvent):void
{
currentPage = arrNavigation [e.currentTarget.ivar] .page.
currentPage.gotoAndStop ("over");
}
function onButtonOut(e:MouseEvent):void {}
currentPage.gotoAndStop ("out");
}
function onButtonClick(e:MouseEvent):void {}
currentScreen = arrNavigation [e.currentTarget.ivar] .screen;
currentScreen.gotoAndPlay ("over");
}
Tags: Adobe Animate
Similar Questions
-
Equium A60-199: audio and video control buttons not working not
Audio and video control buttons used to work for windows media player, but now they are not, I wondered if I had pressed or something changed by mistake, or maybe I need to take it to be fixed? Help, please.
Hello
AFAIK utility Toshiba controls must be preinstalled if you have correct functionality. Check this box on your device.
Good bye
-
Hello world
We use a table control to display the log files. Each row of the table represents a log file entry. In addition to that we have put in place
Some filter chopsticks (string tonalite) to speed up filtering. This means that only the entries corresponding to these substrings are shown. So whenever the filter options
changed to renew the contents of the table.
This is done by DeleteTableRows, looking for entries to display, InsertTableRows and SetTableCellRangeVals.
It works very well.
But if we remove all the contents of the table (caused by the filter options) and then hit a button (even if the focus is on the table) you get a GPF on ProcessSystemEvents.
This occurs only after inserting a large number of rows in the table before deleting all the. For example, a table with 5000 x 2 (rowsxcolumns) reduced to 0x2.
1 create a table with 5000 x 2 (rows x columns) control elements.
2 remove all lines
3. press tab until the control panel to get the focus.
4. hit Enter for example
=> Crash
Someone has an idea? We have already 'dimmed' CTRL, but this is not enough to avoid that the focus on the table by pressing the tab key. So, which leads to an accident as well.
Thanks for the help
Philipp
Yes, it is a known issue (396240), although it is not actually on time last updated known issues. Unfortunately there is no good solution, other than just by waiting for a version corrected to be released, which should happen soon.
Luis
-
Need quick help! The use of tables
I just started using flash a few weeks ago, and for one of my school projects I am creating a pokedex which will display information, when the user clicks on some buttons. for example 'If you click the attack button, then 4 attacks will appear. I currently use frame skipping to my application; but my teacher suggested I use tables to make them all appear on a single image, but I don't know how to do this. Can anyone help?
Thanks in advance.
Tables are variables that contain several elements. A common use for tables is to make collections of items so that items can be related to each other by their relative position in each table. For example:
var letters: Array = new Array ("A", "B", "C", "D");
Table of figures: var = new Array (1,2,3,4).
Now, you can find an element in a table by searching for here:
var thisOne:int = letters.indexOf ('B');
trace (thisOne);
var thatOne:Number = numbers [letters.indexOf ('B')];
trace (thatOne);
The first trace shows that the letter B is in position 1 of the table letters. The trace of the second shows that the item in the table of figures in position 1 is number 2.
Who help me? You can learn more about the use of arrays in Flash here: ActionScript 3 fundamentals: paintings | Adobe Developer Connection
-
Table keeps assigning a defined size which I can't edit, please help!
Hi there, im currenty using a table of 7 rows across and contain contain of my nav links. I put some text in them and set the size of each width box 120. When I turned each piece of text in links nav boxes immediately changed themsleves in width 180 and spill off the page. IM able to make the table bigger, but not smaller. Anyone know why this may be?
See you soon
Benn
You know that you have a second doctype line 203, and a second title tag on line 213 vacuum? And your body tag contains an unknown attribure "maincontent"? Oops.
The container of the page is assigned to 975px width in your CSS. The navigation array is assigned a width of 1179px in the tag. You're already shifted here. Your 7 columns are each given a width of 166px for a total of 1162px. Add to this a cellspacing of 8 and a cellpadding of 5 and everyone is confused about what to do!
You also have this-
-
The use of tables for example the names of
How to use the tables for example names?
If I, for example 'button [0]' as Instance name Flash tells me that I don't use character valid.:
-
I reset my Apple Watch and I can no longer use it, whenever I press the power button, it gives me the sign of loading
Hello
Try restarting your watch force: press and hold the side button and the digital Crown for about 10 seconds, until you see the Apple logo.
-
Cannot access the VIDEO CALL button
Downloaded Skype 5.8, all OK but can not access the "Video call" button (it is not highlighted). I suspect that the video can be disabled. How to check my video call button is turned on?
What do you see when you go to Tools-> Options-> video settings?
-
How do I use image capture to transfer videos from iPhone 5 on iMac
How to use Image Capture to transfer videos from iPhone 5 on IMac
Connect the phone to your Mac using the cable and launch the Image Capture. You should see the phone on the left under devices. Click on the phone and should allow you to import the videos.
-
My daughter has an air of ipad and iphone 6 mounted on a tripod. She would like to use his phone to photograph/video while you watch on his ipad (in real time)... is it possible? If so, what adapters or cables are needed?
Hello!
Unfortunately, this feature is only available with the GoPro cameras.
And Yes, if all cables already existing for these purposes, it would be kind of a pain to take pictures and do not shake the camera accidentally. Maybe, VSCO camera makers will make such feature in some time in the future. This idea is excellent and innovative. Maybe even Apple will listen to users and make their new iOS 10.
-
Fs9 views
I'm unable to use the Central ball on the mouse button to change the distance in plan spot view in FS9. I've never had this problem before! can anyone help?
Hello
1. what operating system do you use?
2 did you change on your computer?
I suggest you to follow the links and check out them.
How to solve the pointer display problems mouse in Microsoft games
http://support.Microsoft.com/kb/309703
I also suggest you check if the middle mouse button works with other applications
-
Can you attribute programmatically size when you use the table in the Cluster service cluster
I use the table of the Cluster service. The only way I know to the size of the cluster is to right click on the function and set the Cluster size. But what happens if the length of my table changes? Is there a way to make the cluster size is the number of elements in the table? Seems like labview should do this automatically at run time. There may be some nodes of property I don't know.
I tried the SQL statements, but it always boils down to having to know the number of columns is in the database prior to execution.
What I did to generate the object to be a cluster to match database fields. My recordset is an array of objects. Then I a vi member to build a recordset from the database and another Member vi to retrieve an array of clusters of the recordset object. If the database changes, I have to change the subject and these two vi. All the other Subvi call these two for the manipulation of data. No other sub - VI have bundle and ungroup functions in them, only the vi of two members. Thus a change in the database requires a change of control and two vi. Not too bad.
(I'm tooting my Horn in choosing me as accetped solution provider. I learned this bad habit of others here on the forum. )
-
How can I resize a table directly (without using the table to remodel)?
Hello world
I have a porgam in which I use a table as a command (with specific values that goes from the user before running the program). By mistake at the beginning, I created a table of 4 dimension (for example), but I didn't because I was showing only the first 3 values (not to expand the table to 4 or more). I would now like to change the size of the array of 4-3. I don't seem to be able to find an option (right click on the table) which allows me to do so directly. I don't want to use the icon "reshape the table", because it is not what I want to do. I hope I am clear enough.
Thanks for any help,
Kind regards
Marc
- Right click on the additional array element, then... Select 'delete data operations.
- Now go to the menu bar and not "current default values edit..make'
- Save the VI.
-
Is there a songsmith creative commons license link so that I can use created songs for YouTube videos monetized Songsmith?
original title: songsmith creative commons licenseHello
The question you have posted is related to Songsmith and would be better suited to the Songsmith community. Please visit the below mentioned link to find a community that will offer in support of your request:
-
I use a Vista laptop but the keyboard button is worn out and I bought a mouse to work with until I can afford another
laptop. However, the mouse don't seem to work. What do I need to enable something somewhere please? Thank you very muchHello
-What is the State of the mouse in Device Manager?
Check if the mouse is compatible with Windows Vista Compatibility Web site.
I suggest that you follow these steps and check if the problem persists.
Step 1:
Update mouse drivers.
I suggest that you visit the manufacturer's website, download and install the latest drivers for your mouse.
Step 2:
Also click "Run now" to this article and check if this is useful.
http://support.Microsoft.com/mats/hardware_device_problems/en-us
Maybe you are looking for
-
Is it possible to open or view the contents of a notesexternalrecord file?
I got a note in the Notes application synchronized via iCloud. It was titled "Hera Don't Hate Me." I have no recollection of the removal of this note, but it is no more on my iPhone, office or iCloud. I entered in a sentence that I knew the note cont
-
Currently on a laptop HP, Win8, print on a HP Color Laser, no previous problem. all of a sudden, PDF print blank pages. I can see the fine page. Safe mode without addons has no change. I printed my taxes and had no problems. I have used IE (shudder)
-
HP 360: My laptop encryption
Hello I bought this HP 360 laptop second hand and so far its worked very well. But after that I changed the operating system Linux I used for more sensative work in college and would be dred think someone walk away with it. Its constantly updated for
-
Hi, I have laptop Pc HP Elitebook 8460p, FACE a problem some time my Disply sparkle, please help me I see this problem after complete restart my system ever seen in boot time, I see this Flickring on Windows 7, Windows 8.1 Pro or enterprise and also
-
File extension M2TS I can't open the video files transferred to my laptop from my brother.
I can't open the video files transferred to my laptop from my brother. The CD with his camcorder lets a user / one machine, so I can't install the program that came with it. This is the extension M2TS, and although there are outreach programs going o