473,774 Members | 2,251 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

load button states images from a folder!

45 New Member
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(norma l state) , Home2.jpg(over state), Home3.jpg(click ing 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 2041
xNephilimx
213 Recognized Expert New Member
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(norma l state) , Home2.jpg(over state), Home3.jpg(click ing 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
2225
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 folder name. When certain actions are performed by the user, more folders (spans) are dynamically added using javascript function appendChild(). I add a new folder span to a container span which holds the whole tree.
5
1705
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 open a gif from one of the folders, I get the following message. Why would an ASPX file load, but a GIF file won't? I have tried messing with security on the files, and have even given 'Everyone' access to read and execute, but still no joy. ...
0
3270
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 our sheets are kept in a DB, loading by content is preferable. Content based load code: Stream xslStream = new MemoryStream(xslString); XmlReader xslTextReader = XmlReader.Create(xslStream); compliedXsl.Load(xslTextReader);
4
1671
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 code: Lets say that i have 2 form - form1 and form2. In form1 i have a button. When this button is pressed i will display the other form:
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8939
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.