473,385 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

load button states images from a folder!

Hi,
Is there a way in actionscript, to tell a specific button to load the image from a folder that exist in the same root of the flash file?

Let's say I have one button in flash that is called "Home".
and I have in the folder that is called "Images" three pictures: Home1.jpg(normal state) , Home2.jpg(over state), Home3.jpg(clicking state)

What i need to do is, when I change the layout of the buttons in photoshop and replace these images in the folder. I want these new buttons to automatically load when I play the flash file the next time instead of the old images.

Thanks,
Wassim
Aug 8 '07 #1
1 2019
xNephilimx
213 Expert 100+
That is not very usefull, you should try to make the buttons in flash or at least in vector a form, if you use a lot of bitmaps your movie will start to become unnecessarily heavy.
Also, that's the same as doing it in javacript, if you want to use images like that, don't use flash, that is wasting or misusing the capabilities of flash.

Anyway it's a rather simple task:

You should, inside a movieclip that will be the button, put three other movieclips (empty if you want) and then, in some function run only once when the movie loads, use the loadMovie method to load the images in the three correspondig movieclips, then hiding dinamically all of them and showing only the corresponding state (normal, over and down).
You could use only one movieclip inside the button movieclip and in each state, use the laod movie to load the corresponding image to the state, but depending onthe user's connection the images might take a while to load each time the user passes over the button.

As I said before, this is more a JavaScript work than a ActionScript one.
You should reconsider this.

Kind regards.
The_Nephilim

Hi,
Is there a way in actionscript, to tell a specific button to load the image from a folder that exist in the same root of the flash file?

Let's say I have one button in flash that is called "Home".
and I have in the folder that is called "Images" three pictures: Home1.jpg(normal state) , Home2.jpg(over state), Home3.jpg(clicking state)

What i need to do is, when I change the layout of the buttons in photoshop and replace these images in the folder. I want these new buttons to automatically load when I play the flash file the next time instead of the old images.

Thanks,
Wassim
Aug 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: antishok | last post by:
Hi, I'm writing a page which has a somewhat similar folder tree to that of the windows explorer, where each folder is made of a <SPAN> tag consisting of the folder image (closed or open) and the...
5
by: iainfogg | last post by:
I had an ASP.NET 2.0 site which works fine on my PC. I have just copied it to a server, and set it up to run in a virtual folder. The web pages work fine, but the graphics won't load - if I try to...
0
by: mrjaxon | last post by:
Basically the issue is, when the XSL style sheet is loaded by URI it is cool but when the exact same style sheet loaded by it's contents the load fails (for this particular style sheet). Because...
4
by: Kimmo Laine | last post by:
Hi! Is there a way to generate Load-event for form without showing it? My problem is that if i try to set control states before Load is raised, control states may or may not work. Here is some...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.