JasonHippy 739 Practically a Master Poster

Nah, os.system just returns the return value.

You'd be better off using a subprocess and read the STDOUT pipe... Additionally, you could add a " > filename.txt" to the end of your command, which will dump the stdout into a file called filename.txt.

Hmm, yes that would probably be a more sensible idea!

Jas

JasonHippy 739 Practically a Master Poster

ignore that last post...all that does is return a numerical value...Not quite what you were after!

J

JasonHippy 739 Practically a Master Poster

I haven't tried it, but just off the top of my head, would it be worth using a variable to catch whatever value is returned by the system.os call where you're executing mxmlc and then print that value...
Something like this??

mxmlc_output = os.system("mxmlc.exe swick.swc -output location/swiff.swf")
print mxmlc_output

Like I said, I've not tried it; but it might work!

JasonHippy 739 Practically a Master Poster

Assuming this is a wireless connection you're having this problem on, I had similar problems with one of my machines issuing the media disconnected message a while ago when trying to connect to a wireless network. It always used to work, but one day I started to get these media disconnected errors..

My router was allowing my machine to connect to the network, so I assumed that everything was OK. But I couldn't access anything on the network (other machines, the internet etc.). Whenever I did an ipconfig /renew I kept getting the media disconnected message.

After much unsuccessful puzzling and googling, I was about to give up. But then I decided to completely remove the wireless connection from my list of connections and try connecting again.
So I disconnected from the network, removed the network from my list of networks to auto connect to and then selected the wireless network in the list of available wireless networks.
I then manually entered my WEP key to connect to the network and........

The connection to the network succeeded..."OK" I thought, "but that doesn't prove anything, it said I was connected before!"

However, a quick ipconfig /renew showed that everything was indeed hunky dory. IP addresses were all valid and correct and most importantly no media disconnected messages. Suddenly the internet was working and I could access the rest of the network....

So what had happened??
Well, in my case it looks like the …

JasonHippy 739 Practically a Master Poster

Piriform do a great free file recovery tool called recuva, which I highly recommend. Take a look at www.recuva.com.

I've used it several times to recover files when friends or relatives have accidentally deleted important files on their PC's. I carry a copy everywhere on one of my USB sticks (along with portable versions of Piriforms other free apps CCleaner and Defraggler plus others like the full Sysinternals suite of system diagnostic tools, Cain and abel etc. etc...)!

As the other posters have already stated, once you've deleted a file, the space it used to occupy is basically open to being overwritten and could be overwritten by the system at any time.

But usually, as long as you're quick with your recovery tool (and as long as you're lucky), you should be able to recover most, if not all of your files!

After installing Recuva on your PC, you can create a portable version of the app to go onto a USB stick. To do this, open up your program files directory (or wherever you installed Recuva) and copy the entire Recuva folder to a USB stick. Open the Recuva folder on the USB stick, right click and select 'new->text document' to create a new text file and rename it portable.dat. This will cause Recuva to create and use an ini file in the folder on the USB stick to store user preferences instead of making regsitry entries.

Now you have a copy …

JasonHippy 739 Practically a Master Poster

I concur with Raja!

If you open up the movie clip containing the images and the scroll bar (the instance of library object "scroll 3" called "ins_revistas").
Take a look at the movie-clips containing pictures 1-12 at frame 1 and pictures 13-24 in frame 2, you'll see that both clips have instance names of: "ins_revistas_de_1-12" and "ins_revistas_de_13-24".

Now if you look at the movieclip containing pictures 25-27 at frame 3, you can see that there is no instance name.
Give the clip an instance name of "ins_revistas_de_25-27" and that should resolve your problem!

Nice Job Raja!

Jas.

JasonHippy 739 Practically a Master Poster

Assuming you're using Flash (if not, you're in the wrong forum!):
If you're using Flash with AS2, you're probably gonna have to simulate 3D yourself, which could take a long while to explain the ins and outs of.

But if you're using Flash with AS3, then you can use one of several 3D libraries written in AS3 (like Sandy, Away or Papervision3D) and use the classes in the library to create virtually whatever you like! You can load meshes, textures, set up lighting, cameras, the whole deal!

Obviously you'd need to learn actionscript first (AS3 would be your best bet).
Once you've got the hang of creating flash apps with AS3, you can then move on to downloading and learning one of the many 3D AS3 libraries (papervision3D is my 3D library of choice). The websites for all of the 3D libraries have excellent tutorials and things to get you started.

Then once you're comfortable creating flash content with AS3 and Papervision3D (or Sandy, or Away, or whatever!), then you're ready to start planning your first 3D game.

When it comes to creating assets for your game, unless you're going to stick with using primitives (cubes, spheres, cones etc) you're going to need some kind of modelling software to create the objects in your game. So you'd need to get something like 3DS Max, Maya or Blender (being a cheap b'stard, I use Blender! :D ). Objects can then be exported as Collada files …

JasonHippy 739 Practically a Master Poster

If you want to stream video on your own server, you'll need some form of flash server and the willingness to build your own application on it....Which will involve a fair bit of work.

Regarding server software, Adobe's flash media server is prohibitively expensive for a home user as it costs 1000's. But Adobe have got a free version of flash media server for developers, which is OK for building and testing your own streaming apps. But it's no good if you want to put it onto your website as it can only accept 10 simultaneous / concurrent connections.
But as with most things, there is a free, open-source alternative to Flash Media Server.

Red 5 is a fully featured, free, open-source, Apache based server for running your own flash media server.
Check out the red5 website: http://www.osflash.net/red5
The Red5 website has all the details on how to set up and start using your server.
There are even some simple example apps...I can't remember offhand, but I think there's a webcam/streaming video sample app.

Once you've got your server up and running, the next stage is to build a flash app which you can use to connect your website to the webcam stream via your server, so you'll need a .swf to go on your web-page to enable users to view the stream, but you'll also need to do some flash/javascript/Java stuff on the server side too. As mentioned, the red …

JasonHippy 739 Practically a Master Poster

Hmm, yes tab indexing and the FocusManager have always been buggy to say the least!

I've tried a few things myself, not sure if this is of much help though!

In pure AS3, because we're deriving from sprite, the focusManager instance at stage level seems to be unavailable.
It's obviously there somewhere, as any tabEnabled items in your code are controlled by it. But I too have been unable to find a way to directly access it.
So I'm not sure what to suggest to stop the items outside of the form from tabbing when the form is visible.

If you use mxml for your flash/flex apps; mxml uses mx:Application as a base class for the app and the stage-wide FocusManager instance, called focusManager is available and you can manipulate it.
I've tried creating an AS3 class which derived from/extended Application, but without any luck so far. I keep getting various errors.

I guess one workaround could be to manipulate the tabEnabled properties of the items you want to exclude from the global tab-loop. So you set the tabEnabled property to false for anything you don't want tabbable when the form is visible.

So perhaps, as soon as your form is made visible, you call a function to toggle the tabEnabled property for all items you want disabled and then when the form is finished with, you call the function again to re-enable them.
i.e.

private function toggleTabEnabled():void
{
    // …
JasonHippy 739 Practically a Master Poster

Hi,
Thank you all and especially Jas for the update. I did download salasaga and I am downloading the flex builder to try it out.

Cheers,
Vishal Khialani

No probs vishal.
One small point, just in case there's any confusion... I was talking about the Flex 3 SDK, not Flex builder!

But now that you mention it, I completely forgot about Flex Builder. I heard a year or so ago that Adobe were working on a linux port of Flex builder, but I'm not sure if they've released it yet. The last thing I heard was that they were due to release an alpha version as a plugin for eclipse on Linux, but that was probably over a year ago..I hadn't thought to check back to see if it's out yet...Completely slipped my mind!

If Adobe have released the flex builder alpha, by all means give it a shot. If not, then just get the Flex 3 SDK and stick with the command line tools it provides instead!

Actually I'll check the Adobe site now.....
Oh, ok!
A quick look at the Adobe labs site reveals that they released the alpha in august, last year...Doh, I really should try to keep up with the rest of the world!

Hmm, in that case I think I'll give flex builder for Linux a go myself! heh heh! ;)

oh and to iamthwee:
In the flash IDE, it is possible to build …

iamthwee commented: cheers for the info +22
JasonHippy 739 Practically a Master Poster

In my opinion nothing beats the full flash suite.

You need all the little perks like the timeline and everything.

Going slightly off-topic from the OP:
The timeline can be handy for quick and dirty stuff, but personally I prefer not to use it as far as possible. Especially since the advent of AS3/Flex!

If I ever need to use the timeline (which is rare!), it's about the only time I'll fire up one of the Flash IDE's. Other than that it's Flashdevelop (on windows) or the Flex SDK (on Linux) all the way!

Thinking back to my previous job back in the days of AS2, having to debug all of those nasty third party .fla's with hundreds of layers containing nested movieclips and actionscript buried here, there and everywhere.....ugh! {shivers} Not a pretty time!

Coming from a C++ background, I much prefer dealing with classes and scripting everything myself.

As I've said, the timeline can be a handy tool from time to time. But from what I've seen, even in professional production code; it is frequently overused and/or abused, resulting in horrific, mind meltingly convoluted spaghetti-like sources. So personally, I'm more than happy to leave the timeline behind!

But that's just me! heh heh! ;)

JasonHippy 739 Practically a Master Poster

I'm not aware of any linux software that deals with flash, certainly nothing that will open .fla's. There are some attempts to make a linux port of Flashdevelop (a free Windows/.NET based IDE for the Flex 3 SDK), but I don't think they've got very far with it yet.

As Vishesh has already said, you could try using Wine to run one of the flash IDE's. Flash mx2004 will probably work well under wine, flash 8 might also work, but I have serious doubts that CS3 or CS4 will work properly.
The windows version of Flashdevelop might also run under wine.

Another usually overlooked alternative is the Adobe Flex3 SDK, which can be used to create flash content in Linux using pure AS3 or AS3 and mxml.

The flex3 SDK ships with some multi-platform command line tools, the bin folder of the SDK contains binaries for windows, mac and linux. To get it, all you need to do is download it from Adobe and unzip it somewhere on your system. And that's it, you're ready to start developing flash in Linux!

The only pre-requisites are that you need to have java installed on your Linux system...But that's not really a stretch, if your machine doesn't have Java, open up your package manager and download and install it from your linux distros repository.

To use the SDK in linux, you simply use a text editor like gEdit, vi or emacs to create your mxml and/or …

JasonHippy 739 Practically a Master Poster

That exhibits a curious optical illusion of gray circles when you look at the squares

Hey, I'd not noticed that before...But now that you mention it, woah, that really does your eyes in doesn't it?!
That was definitely an unintended side-effect. How did I not notice that before?

Suppose I'd better add a disclaimer..
"I accept no responsibility for any damage that may occur to your eyesight as a direct result of looking at this .swf!"
Or perhaps
"Abandon all eyesight, ye who look at this!"

Heh heh!

Making the borders the same colour as the bodies of the boxes might make the effect a little less noticeable (but it probably won't eliminate it entirely!).

i.e. Changing the SimpleBox.as constructor code to:

public function SimpleBox()
		{
			var col:Number = Math.random() * 0xffffff;
			graphics.lineStyle(0,col);
			graphics.moveTo( -10, -10);
			graphics.beginFill(col);
			graphics.lineTo(10, -10);
			graphics.lineTo(10, 10);
			graphics.lineTo( -10, 10);
			graphics.lineTo( -10, -10);
			graphics.endFill();
		}

hmm..Lets see..
Gah, as predicted; the effect is still there, but it's not as bad as when the boxes had the black border around them! heh heh!

Altering line 14 of MessingWithFiltersAndAlpha.as to make the background black helps to lessen the effect too:

[SWF(backgroundColor="0x000000", width="400", height="400", frameRate="30")]

J.

JasonHippy 739 Practically a Master Poster

Bugger, iamthwee got in there while I was writing my long winded reply...

Right I'll remove my explanation of crossdomain.xml and the playback security settings and make this short...

The other things to bear in mind are:
Have you definitely uploaded all of the files to the correct places keeping the filepaths intact? This is usually one of the main culprits for flash not working.

Also if checking the crossdomain.xml thing and changing the local playback security settings (allow access to network) doesn't work and you have uploaded everything to the correct paths, another thing to try would be using absolute paths rather than relative paths to the swf on your html page. i.e. 'http://www.mysite.com/final.swf' instead of 'final.swf'

JasonHippy 739 Practically a Master Poster

OK well, alpha is a public property of most if not all display object types in flash, so you should easily be able to write a script to randomly select a thumbnail and then modify it's alpha value.

Animating filters is quite straightforward too.

Here's an example of alpha and filter animation in pure AS3 code. (Note: I'm winging this completely...writing the AS3 code as I go, so this is a bit rushed and improvised on the spot. But the finished example files will work and will be attached at the end)

So, what I'm going to do is set up a class to draw a simple randomly coloured box..funnily enough the class is going to be called SimpleBox.as.
Here's the code:

package 
{
	import flash.display.Sprite;
	
	/**
	 * Draws a randomly coloured 20*20 box with the registration point in the centre
	 * @author Jason Trunks
	 * Feel free to do what you like with this code!
	 */
	public class SimpleBox extends Sprite  
	{
		
		public function SimpleBox()
		{
			graphics.lineStyle(2, 0);
			graphics.moveTo( -10, -10);
			graphics.beginFill(Math.random() * 0xffffff);
			graphics.lineTo(10, -10);
			graphics.lineTo(10, 10);
			graphics.lineTo( -10, 10);
			graphics.lineTo( -10, -10);
			graphics.endFill();
		}
	}
	
}

Now I'll set up a class to create a movie which will display a 10*10 grid of 100 randomly coloured boxes (see SimpleBox.as) with alphas of 50% (0.5).
The clip will randomly select one of the boxes and will animate it to 100% alpha (1.0) and then back down to 50% alpha (0.5) …

JasonHippy 739 Practically a Master Poster

I agree, Gimp and Inkscape are probably the best options.
Also Xara Extreme is another powerful (and free) vector GFX editor for Linux which might be worth trying.

Another supposedly good Linux GFX editor is Cinepaint (which is more aimed at photo and video editing I think!). I'm not sure whether this supports vector GFX though, I haven't tried it yet because Ubuntu don't seem to have it in their repository at the moment. So I'm currently trying to build it from source, but without much luck so far...Doh!

iamthwee commented: heads up on Xara +22
JasonHippy 739 Practically a Master Poster

you are absolutely right in your analysis. i have studied the code in detail.

the original developer has used different methods to load the xml data and make a scrollbar. the usual (correct) method he has used in all the flash files is the one in frame 9 which loads the mediacenter.xml into an instance of a dynamic text field and the scrollbar is setup to target the instance of the text field.

as per your suggestion, i have tried to modify the code in sprite67 to solve the problems of space after the text and the scrollbar thumb problem. i simply cannot figure out what to modify in fScrollUp() and fScrollDown() to properly constrain the distance that the objects can scroll. also, i have no idea how to add a sliding thumb and write supporting code for it.

i think the best thing for me to do is to duplicate the method used in frame 9. (whats your opinion?) i.e. load the news.xml into an instance of a dynamic text field and the scrollbar is setup to target the instance of the text field. i am working on this currently and would appreciate you pointing me in the right direction. i.e. what steps are needed to do this. i assume solving this should not be too difficult for me, but as i mentioned, i am a newbie in flash and may get stuck

many thanks for your kind efforts. you have really helped me a lot.

The developer wasn't …

JasonHippy 739 Practically a Master Poster

From what I can see it looks as if the original developer used two different methods to load the XML data.

In frame 9 (frame label "txt_b"), there is an example of the familiar scrollbar in layer 108.
The actionscript at the top of this frame loads the mediacenter.xml into an instance of a Dynamic text field on layer 107. The scrollbar has been set up to target the instance of the text field. All very familiar.

But in frame 1 (labelled "txt_a"), Sprite 67 (layer 107) loads the news.xml into itself and uses a scrollbar with only arrows to scroll. There is no thumb. Sprite 67 is a completely different custom control to the custom scrollbar component that you've seen elsewhere.

So that explains why mediacenter.xml scrolls with the thumb and news.xml does not.

On closer inspection, it would appear that sprite67 and the code it contains are creating a masked area, the XML is parsed and individual objects are being created for each news item and added to the masked area.
The scrolling is controlled by two arrows which scroll the news objects up and down.
It looks to me like the scrolling code is a bit dodgy, which is why you can scroll down way past the bottom of the list of news items.
To fix this you'll need to fix the code in fScrollUp() and fScrollDown() to properly constrain the distance that the objects can scroll. If you …

JasonHippy 739 Practically a Master Poster

This one was pretty straightforward...

Take a look at divisions.xml

If you look at the entry for "Eyesite" you can see that the "[CDATA[" tag at the start of the line hasn't been closed properly at the end.
The line currently ends with:

in an effective manner.</Option>

The end of this line of xml should read:

in an effective manner.]]></Option>

That will solve your extra space issue for this file....

In answer to your scrollbar question, the scrollbar appears to have been created by the original author of this .swf, created entirely from scratch. So it's not a standard flash UI scrollbar component.

Cheers for now,
Jas.

sandra21 commented: completely solved my problem +1
JasonHippy 739 Practically a Master Poster

this software is completely useless

I beg to differ there, I've used virtualdub and virtualdubmod for loads of video editing over the past few years (alongside loads of other free video editing tools). It's not at all useless. It's not particularly difficult to use, but I guess it can be a bit awkward when first starting out; and it certainly doesn't do everything. But once you've had a play with it and got your head around how to use it properly and where it's strengths lie, it's a great tool.

For something as simple as watermarking a video, it certainly beats paying shedloads of cash for similar software.
But then that's just my opinion, I guess we'll just have to agree to disagree, heh heh! :D

Cheers for now,
Jas.

JasonHippy 739 Practically a Master Poster

Well at first glance the code looks OK....
To confirm it, I just tried your code and it works for me on Windows and Ubuntu (both have Python 2.6 and wxPython 2.8 installed)

I can see the menu, mousing over the menu items causes text to be displayed in the status bar....So the question is why are you not seeing the status bar or the menu?

I don't know what to suggest. I can't think of anything that could cause you to see anything differently....hmmm! {scratches beard..}

JasonHippy 739 Practically a Master Poster

It's been a while since I've used photoshop. But generally speaking, if I need to find the RGB value of a pixel in any graphics package (usually gimp/paint.net/inkscape), I'd zoom right in on the image so I can see the pixel I'm after and use the colour picker tool (looks like a pippette / eye-dropper) to select the pixel.

This action will usually set your active colour (either the foreground or background colour) to the same colour as the pixel you clicked on with the colour picker. Next click on the colour (the one that changed when you used the colour picker) and you'll usually get a popup which shows more detailed info on the properties of the selected colour. (HSV, RGB, and HEX values).

Trust me it sounds much more long winded than it actually is...It only takes a second or two to do, so it is a pretty quick method!

Like I said, I haven't used photoshop in a long while, but the method I've described can be used in most decent photo editing software nowadays and I'd assume that photoshop will be no different!

Alternatively, there are loads of little tools that are freely available that will allow you to view the colours of pixels anywhere on your screen. If you're on windows, there is a little .NET based tool I've been using on my windows PC's called cpix.exe (google it and download it!).
This neat little tool opens a …

JasonHippy 739 Practically a Master Poster

Without seeing some code I don't think there's a lot we can do.

Perhaps try making a quick backup of what you've got there and then revert the changes you made to the seemingly unrelated page.

Once you've got the page back to it's previous condition, test the site to see what happens:

If the gallery works, then you'll know it's definitely something in your edits to the page which broke the gallery. In which case, start making your changes again, test regularly and analyse each change and it should be pretty easy to see what is breaking the gallery.

And if it doesn't work, at least you know that the changes you made to the page had no effect!

I'd be quite willing to take a look at the sources if need be, but unfortunately I don't own CS4. I use Flash 8 pro for AS1/AS2 and Flashdevelop for AS3 at the moment. So if the source files were originally done in CS4 then I'm afraid I'm out. But if it was done in CS3, I think I can hijack a friends PC with CS3 pro on it!

Have you tried putting any trace statements around the gallery code and the xml loading code? That way you'll at least be able to see what's going on there.

Cheers for now,
Jas.

JasonHippy 739 Practically a Master Poster

Dear Guys I Want To Generate A Random Number Between 2 Number BUT Without Generating 2 Same Number I Mean If For Example Already Generated Number "2" Next Time Did Not Generate It , Is There Any Solution :icon_question:

There are loads of ways to generate unique random numbers, but what language are you trying to this in? Javascript? Flash/Actionscript? C#? VB.NET? Python? PHP? etc etc....

Note: This is the web development->graphics and multimedia forum...
So if it's flash/actionscript related then you're in the right place. But if it's any of the other languages mentioned above, there are dedicated forums for them and you should probably ask there instead!

Cheers for now,
Jas.

JasonHippy 739 Practically a Master Poster

Thanks for the replies. It seems like there must be some roundabout way to do it. The text is selectable in the browser when the page is rendered.

But alas, maybe not.

No, I'm afraid not. The selectable text in the usage statistics is a part of the .swf itself.
In other words, when the myspace media player .swf was published from flash, the dynamic text fields in the .swf had their selectable property set to true (which is the default setting for dynamic text in flash!). This is the only reason the statistic text is selectable in the browser. If the creators of the myspace media player had set the property to false, the numbers in the usage stats would be unselectable!

So when you select the total plays text and copy it to your clipboard it is done via flash (But I'm not sure of the exact mechanisms employed!).

Again, I don't think that there is any way that you could access the contents of the .swf as the statistics are dynamically loaded at runtime. So simply finding the .swf in your browser cache and analysing the .swf with python wouldn't yield any results for you.

The only way I can think of, would probably be (and I'm clutching at straws here) to load the myspace page into your browser and examine the contents of your pcs memory once the media player .swf has loaded fully and started running.. You'd have to find the …

JasonHippy 739 Practically a Master Poster

The short answer is there is no way around it.

The flashvars that get passed into the myspace media player .swf are merely the parameters the player needs to be able to rettrieve the artists details and playlist from a database. The flashvars do not contain the total play count or any other usable information!

The database is the only place that'll have the artists total play data and you won't be able to access that because all of the database connection details for the media player will be encrypted and abstracted away somewhere out of sight, either in the swf itself or in another server side script...So the bottom line is you're not going to be able to do it!

Cheers for now,
Jas

JasonHippy 739 Practically a Master Poster

Sorry for adding to an already solved thread,
Generally the whoie camel case thing is just to make things more easily readable, but it's not at all mandatory as far as I'm aware.

You can make your variable names as long or short as you like (there may be an upper limit on the number of chars available for a variable name), the more descriptive they are, the easier it will be for others to understand your code.

I know in older versions of flash, having lots of variables with long names could cause a performance hit when running your final .swf, so shorter variable names were an advantage, but in AS3 I don't think it would make much difference as the AS3 engine is much faster and much more powerful!

With regard to styling code and camel case, most people start AS3 class names with capitals, and all other functions, properties and variables will be in camel case.
Some people insist on CAPITALISING the names of constant values, others insist on creating member variables with a leading underscore to differentiate between _classMembers and localVariables. Some people use camel case for classMemberVariables and functionNames and use all lowercase for local_variables, but at the end of the day it's down to you and how you find your code easier to read!

Most people tend to go with the CapitalsForClassNames and camelCaseForFunctions(), memberVariables and localVariables convention!
But as I said there's nothing stopping you from …

JasonHippy 739 Practically a Master Poster

Would you be able to upload your component and it's ancilliary folders/files to web-space on a different server and then embed the .swf into the html page in your yahoo web store?

That might get around the problem nicely!

JasonHippy 739 Practically a Master Poster

Well, I'm not familiar with the component you're on about, but generally the source folder and it's subfolders will contain the source files you'd need if you decided that you wanted to modify/customise the component. You don't need to put any of these files onto your server.

The stuff in the deploy folder (and any sub-folders) however will need to be copied to your server. In order for the component to work the file/directory structure on your server would have to be identical to the directory structure here.

It seems strange that you can't create sub-folders on your server....Without the appropriate files in the appropriate subfolders, your component will not work. It's as simple as that!

All you should need to do is duplicate the folder structure for the deploy folder of your component on your server, copy all of the relevant files and then embed the .swf into your page either manually with object/embed tags or by using a script like swfobject.js (a cross browser compatible script for auto detecting browser versions and embedding flash in html pages in a manner compatible with the browser - google it!)

The only other way to do it would be to edit the sources of your component so that it looks for the xml files and images in the same folder as the .swf instead of looking in the subdirectories, rebuild the component and move all of the xml files up to the root folder and …

JasonHippy 739 Practically a Master Poster

This tutorial should more or less be what you're looking for!
http://forum.videohelp.com/topic248307.html

The tutorial shows you how to watermark a video using Virtualdubmod, which is a modified version of Virtualdub. Virtualdub and Virtualdubmod are both free open source video editing software packages, there are loads of plugins and additional filters for 'em and they're both pretty easy to use.

Hope it is of some help!

Jas

JasonHippy 739 Practically a Master Poster

Ah of course, the instance names..The other factor in the timeline based flash development...Now you say that I remember a member of the dev team at my last job having errors pertaining to accessing undefined properties and the problem turned out to be a movieclip without an instance name. but that was AS2 and many years ago!
Heh heh!

Still, I'm glad you managed to get it sorted!

I've really got to try to scrape some cash together to get CS4 at some point. Flashdevelop is great and all, but sometimes some quick and dirty timeline stuff can be much easier than trying to code everything manually. I do miss it sometimes! It's been ages since I did any timeline based stuff, and as mentioned I haven't been able to try it with AS3....yet!

Oh yeah, and regarding my original post...I did a bit of digging and found that I was barking up completely the wrong tree with the function scope thing.

If you added you click handler code to your button by opening your button clip and adding code to its timeline, then your function would be scoped to the button object and would require the _parent. notation to access the main timeline (in traditional timeline based AS1/AS2 at least!). Whereas attaching the function to your button as you've done, from the main timeline allows you to directly use gotoAndStop to control the main timeline..So sorry about that.
I must be going senile! …

JasonHippy 739 Practically a Master Poster

That's really odd!

What class/classes are your buttons derived from?

It sounds as if addEventListener is not a valid property of your button class...I'm not sure what's going on there!

JasonHippy 739 Practically a Master Poster

In answer to this question:
Take a look at the actionscript on the scroll bar instance at frame 30 on layer 52..
The actionscript says:

onClipEvent (construct)
{
    _targetInstanceName = "txt5";
    horizontal = false;
}

Something struck me as odd while looking at this. The scrollbar in question has an instance name of txt5...Which seems very odd...The scrollbar is targeting itself?? That's not right!

From looking at the other instances of the scrollbar in other frames of the .fla, the other scrollbar instances have no instance name and their _targetInstanceName properties seem to refer to the instance names of the textboxes in the frames.

With this in mind, looking at the instance name of the textbox at frame 30 (layer 54) the instance name of the textbox is "detail_txt5".

So you have two options to fix this...
At frame 30 you can either:
1. Change the text box instance name to "txt5" and remove the scrollbars instance name.
OR
2. Alter the actionscript on the scrollbar to:

onClipEvent (construct)
{
    _targetInstanceName = "detail_txt5";
    horizontal = false;
}

Either way, that will solve your problem and the scrollbar will work.

Cheers for now,
Jas.

JasonHippy 739 Practically a Master Poster

Here's another version of your file...This time I've added an extra person..Take a look inside "sprite 145" and take a look inside the library and you'll see what I've done to add the extra person!

I knocked this up while waiting for a build to finish at work, took about 10 minutes to do.

Please find "NotTheOriginal2.fla" in the attached .zip!

Cheers for now,
Jas.

JasonHippy 739 Practically a Master Poster

Hey I recognise this,
You posted this a while ago. So the .fla you were using was decompiled from a .swf! No wonder there were so many badly named layers and objects in the library!

From what I can see, everything you need to do is inside the movieclip called "sprite 145".

Looking inside "sprite 145":
Layers 1, 5, 9 and 13 contain the movie clips with the details of the original 4 people. So adding two extra layers around here will be an idea (one for each additional person you want to add). in these layers you should add movie clips containing the personal details of the additional people and give them instance names of "five" and "six".

Layer 17 contains a movieclip which is an instance of sprite 135 with the instance name "ghum". This is a flashing effect to highlight the currently selected person. It looks like it slides and moves behind the selected persons name.

layer 19 contains the text for Vivek's name.
layer 24 contains the button and handler code for Viveks button
There are similar layers for the other people in the clip.

All you need to do to achieve your goal is to add a layer for the name-text, a layer for a button and a layer for the about clip (so three layers per extra person). You then need to copy the code from one of the other buttons and set the appropriate …

sandra21 commented: thank you for great help +1
JasonHippy 739 Practically a Master Poster

Hey dude,
Been away for a while (on holiday with the wife 'n kids!), so I've not been online much recently.

I've also not used the focus manager since AS2 (and then it was only once!), so I can't be of much help just yet. But I'll try to have a play with it when I get a chance and I'll see what I can find out for you!

I'm still using FlashDevelop for AS3 at the moment too, but I think one of my mates has a copy of CS3, so I'll try hijacking his machine at some point and see what I can do!

I'm not sure exactly what you're after. From reading the details you've posted:
When the form is visible/loaded into the content area, you want the tab manager to tab only through the controls on the form and ignore the other controls? Is that right?? Or have I missed something?

Cheers for now,
Jas.

JasonHippy 739 Practically a Master Poster

I guess the easiest way would be to either look up some AS3 tutorials on the web, or buy a couple of decent books on AS3.

"Friends of ED" (a publisher) do a few good books on AS3. A few which I own and recommend are:
Foundation Actionscript 3.0 Animation:Making Things Move!
Advanced Actionscript 3.0 Animation
Object Oriented Actionscript 3.0
The Essential Guide to Flex 2.0 with Actionscript 3.0

That last book might be a slightly outdated now as flex3 is the current version of flex. Plus the flex4 beta is also out, but FOE may have an updated version of the book for Flex3!

Note: None of these books list every single available AS3 class, but they will give you a good grounding in the AS3 classes you're most likely to use often in your projects.

The flash livedocs on the Adobe site are also a good reference point. They've proved extremely handy when trying to use some of the more obscure classes in AS3.

Once you've got the very basics nailed down, the best way to learn the more advanced stuff is to PLAY!

They say that the best form of exercise to improve your swimming is simply to get to a pool and swim. Likewise, to improve your AS3 programming skills you need to program some AS3..Just have a play. Create some random flash apps and mess with the available classes and functionality. If you get really …

JasonHippy 739 Practically a Master Poster

To expand on MidiMagic's post,
You could use the Python programming language with the wxPython library (pythons wrapper around the wxWidgets library) to create graphics like the example you've shown.

The Software Development->Python forum here on daniweb has plenty of tutorials on programming Python/wxPython.

The Python language and the wxPython libraries are both freely available and the python language is very easy to learn, so as long as you know all of the maths you require for your image, you should be off and away in next to no time!

Another option would be to use C++ with OpenGL or DirectX. But that would involve getting a C++ compiler, learning C++ and then learning about OpenGL or DirectX.. Which is a much more complicated and time consuming route to take for the sake of creating an image.

Alternatively, I'm sure if you do some googling you'll be able to find some visualisation software which can create images from mathematical functions (GNUPlot is one example I can think of).

There are also several programs out there that can create fractal images (Apophysis is a free one that springs to mind, plus there are several commercial apps available), not sure if something like that would be of any use to you.

Cheers for now,
Jas.

JasonHippy 739 Practically a Master Poster

Believe it or not, I think it's your gotoAndStop() calls in your click handlers that are causing the error.

If memory serves correctly, when you use addEventListener to attach an event handler function to an instance of an object of any class, I think the code in the handler function refers to the attached object. So the handler has the objects scope rather than global scope.

In other words, your gotoAndStop() calls are trying to make your buttons gotoAndStop at the specified frame rather than making the parent movieclip stop at the specified frame in the timeline.

Now, you've said that you're using your own custom button class. I know if it was me, I'd derive from Sprite, so I'm assuming you've done the same....
If this is the case, then you should be informed that gotoAndStop is not a property of the Sprite class. Which is most likely why you're getting the error you mentioned! A Sprite is basically a MovieClip without a timeline, so there is no need for things like stop(), play(), gotoAndStop() or gotoAndPlay().

If your buttons are derived from MovieClip, it could be because your button clip doesn't have thirty-something frames!

So how do you get around it and access the timeline of the parent clip?
Well, I know that in traditional timeline based flash programming (in AS1/AS2) you'd use _parent to refer to the parent clip.
So to access the main timeline from your button instance …

JasonHippy 739 Practically a Master Poster

Inside the command prompt, to go back to the root level, i.e. C:\ you just need to type:

cd\
JasonHippy 739 Practically a Master Poster

i tried this, result is different but not as expected either.

byte = abc.B_ABC_Function02(hex(p2), hex(p3))

Do you need to convert the returned value to hex perhaps??
i.e.

byte = hex( abc.B_ABC_Function02(hex(p2), hex(p3)) )

The above code should set the value of byte to be a hexadecimal representation of the value returned by your abc.B_ABC_Function02() call.
Does that give you the expected result?
Jas.

JasonHippy 739 Practically a Master Poster

Sorry to continue a thread that's been marked solved, but I thought I'd better note that the solution I posted would only match a single block of numbers.
If we changed the value of myStr to "abc123def456", the examples I previously posted would only pick up the first block of digits (123).

In case you've got more than one block of digits in the string and you want to get them all you'd need to use findall() instead of search()....(See below)

import re

myStr="abc123def456"

result = re.findall('[0-9]+', myStr)

numDigits = 0
for i in result:
    numDigits+=len(i)

print "String:", myStr
print "Digits found:", result
print "Number of digits =", numDigits

Thought I'd better mention it! :)

JasonHippy 739 Practically a Master Poster

Shadwickmans solution using filter is a very good one!
Another way is to use regular expressions...

Without further ado, here's a simple example using regular expressions:

#example using regular expressions
import re

# here's the string we'll be searching:
myStr = "abc123def"

# search through the string using a regular expression
# this regex will return any decimal digits (0-9) it finds in the string
temp = re.search('[0-9]+', myStr)
# you could also use the following regex:
# m = re.search('\d+', myStr)
# which is another way of writing the above expression

# now lets process the results of the search...
result = temp.group()

numDigits = len(result)

print "In the string:", myStr, "- There were", numDigits, "numerical digits found, the digits were", result

The code above is a little clunky and inelegant as we're storing variables we probably don't need to be..But it is only an example!

If you only wanted to know the number of digits in the string you could shorten the above example to 3 lines of code:

# regular expressions example 2
import re

myStr="abc123def"

print "Number of digits =", len( (re.search('[0-9]+', myStr)).group() )

As you can see, in the above code we're munging several operations into one command at the end of the print statement.

If you want to find out more about using regular expressions check out the documentation that ships with python (hit F1 in idle!) and search for 'regular expression' you'll find out all you need …

JasonHippy 739 Practically a Master Poster

I have already changed include library options.

Sorry, I didn't notice that in the OP.

If you have definitely got the paths to the lib/header folders set up properly in VS (best double check it to make sure!), then it is one of two things as far as I see it:

1. The order of the additional libraries/includes - perhaps try making it so that MD5Sum is the 1st entry in the list of additional libs and additional headers..Sometimes the order of the additional includes/libs is important because some libs may depend on other libs to be present.

Otherwise:

2. Please don't get angry with me for suggesting this but...
I just realised...My previous post assumed that you already had the prebuilt libs/dlls for the MD5Sum library..

However, if you downloaded a source package for this library, it is possible that you may need to build the library before you can use it in your own project.

A lot of cross-platform libs especially those that originated on *nix usually only come with source and makefiles (and sometimes VC project files if you're lucky!) but not the binaries.

So that could be the other problem...Maybe you've got VS set up correctly, but you just don't have the binaries for the library because you haven't built them yet!

It's ok to admit it, it's happened to me in the past! I downloaded a library once a few years ago. I unzipped it, altered …

JasonHippy 739 Practically a Master Poster

encryption error LNK2001: unresolved external symbol "public: __thiscall MD5Sum::MD5Sum(unsigned char const *,unsigned int)" (??0MD5Sum@@$$FQAE@PBEI@Z)

encryption error LNK2001: unresolved external symbol "public: class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > > __thiscall MD5Sum::Calculate(unsigned char const *,unsigned int)" (?Calculate@MD5Sum@@$$FQAE?AV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@PBEI@Z)

encryption error LNK2001: unresolved external symbol "struct RC4_Key_Struct * __cdecl RC4CreateKey(unsigned char const *,unsigned int,struct RC4_Key_Struct *,bool)" (?RC4CreateKey@@$$FYAPAURC4_Key_Struct@@PBEIPAU1@_N@Z)

i don't like what these messages say!
these are my errors, start with a coffee

When you get an 'unresolved external symbol' linker error it means that your linker was unable to find the library where the object referred to in the error message is defined.

In a very general fashion, what's happening when you build your project is:
Your compiler is finding the appropriate header file/s for MD5Sum and is compiling your code with no errors, but because the linker doesn't know where the MD5Sum library is, the link part of the build process is failing and throwing errors

What you need to do is alter your compilers settings so that it knows where to find the appropriate header and libary files for the MD5Sum library.

You might want to take a look at this thread I posted yesterday for starters...It explains how to register additional include/library paths in VS:
http://www.daniweb.com/forums/thread198756.html

Note: The library I posted instructions for yesterday was a completely different library (I.e. Not MD5Sum) but the process itself will be exactly the same.

Anyways, I hope that is of some help!
Cheers for now,

JasonHippy 739 Practically a Master Poster

If you're using the windows version of Python3.0 and for some reason you haven't got the shortcuts to idle (i.e. the installer failed to create them, you accidentally deleted them or you used a source package rather than the installer) you can create them manually by right-clicking on your desktop and selecting new->shortcut.
Next, navigate to idle.pyw and select OK and the shortcut will be created...

On a typical windows python install, you'll find idle in the following directory:
C:\python30\lib\idlelib\idle.pyw

If you're on *nix, you'll have to either download and install the idle-python3.0 package with your OS's package manager or via the command line (see shadwicks post for ubuntu cmd line example!)

Cheers for now,
Jas.

p.s. If you used a source package and/or you can't find idle.pyw, try downloading the windows installer and install it that way instead!

JasonHippy 739 Practically a Master Poster

I'm not sure what's causing the problem, but it also occurs in IE7!

I usually use firefox, but I took a peek at the site in IE7 (nice site BTW!) and had exactly the same problem you described in IE8.

The page flashed up and then disappeared and IE showed an error saying that it couldn't load the page..refreshing didn't work..going back/forwards and entering the URL manually didn't work either.

I deleted my cache and reloaded the page and lo and behold it worked...

The only difference I had in IE7 was that afterwards I could refresh the page and navigate away and return to it with no problem. So it only happened the first time for me!

Viewing the source, everything looks more or less ok..I can't see anything obvious in there!
Perhaps it's a bug in IE. It may be worth having a look on the Microsoft site to see if it's a known issue and if there are any workarounds...

Alternatively, perhaps put a front page/intro on your site (one of those 'click here to enter' kinda deals) with a disclaimer stating that the site is best viewed using ANYTHING other than IE, or perhaps more something more constructive like instructing IE users to delete their cache if the site fails to load for them!

Other than that, I'm pretty much out of ideas!

Cheers for now,
Jas.

JasonHippy 739 Practically a Master Poster

What (if anything) do I need to check with the organization that hosts my website to make sure Flash works as expected?

You might want to check that your hosts allow .swf files to be uploaded to their servers. Most web hosts nowadays allow .swf files, but I suppose it wouldn't hurt to check!

Also if you want a coldfusion database to be hosted on your site, it might be worth checking that your host supports that too.

On the subject of your original post...If you can't afford Flash CS4 (because it is expensive!) there are some free / low cost alternatives:

For starters there's the free Flex3 SDK from Adobe, which will enable you to create flash movies using pure AS3 and MXML.
With the Flex3 SDK, basically you create .as files for your AS3 classes and perhaps some MXML files with your favourite text editor and then use the SDK's command line tools to compile your .swf. The SDK is available for almost all platforms I believe (win/mac/most *nix variants).

If the idea of building your .swfs manually seems a bit daunting or you just can't be arsed (which I certainly couldn't!), then there are a few GUI's/IDE's available for the Flex3 SDK.

These include:
Adobe's Flex builder (Not free, but much cheaper than CS4)
Eclipse (free) - I think you need a plugin as well as the Eclipse IDE
NetBeans (free) - I think there's a plugin to use Flex with …

JasonHippy 739 Practically a Master Poster

I don't know why when I use this functions from WAVEMIX.h,in my program I meet some errors:

error LNK2019: unresolved external symbol "unsigned short __stdcall WaveMixGetInfo(struct WAVEMIXINFO *)" (?WaveMixGetInfo@@YGGPAUWAVEMIXINFO@@@Z) referenced in function "int __cdecl MixTest_OnCreate(struct HWND__ *,struct tagCREATESTRUCTA *)" (?MixTest_OnCreate@@YAHPAUHWND__@@PAUtagCREATESTRUCTA@@@Z)

main.obj : error LNK2019: unresolved external symbol "void * __stdcall WaveMixConfigureInit(struct MIXCONFIG *)" (?WaveMixConfigureInit@@YGPAXPAUMIXCONFIG@@@Z) referenced in function "int __cdecl MixTest_OnCreate(struct HWND__ *,struct tagCREATESTRUCTA *)" (?MixTest_OnCreate@@YAHPAUHWND__@@PAUtagCREATESTRUCTA@@@Z)

I've never used this library, so I don't know anything about it. But the error messages you're getting are saying that the linker is unable to find the wavemix library...You most likely just need to update your project settings/compiler options to include paths to the wavemix libraries and headers.

From the looks of your error message it looks like one of the MS VC++ compilers, so the way to register the wavemix libraries and headers with the compiler will depend on the version of Visual Studio that you are using.

For VC++6 (and earlier), you'd need select 'tools->options' in the top menu. Then in the popup dialog, select the 'Directories' tab.
Select 'Include files' in the 'Show directories for' dropdown and add the path to wavemix.h to the list of paths.

Then select 'Library files' in the 'Show directories for' dropdown and add the path to wavemix.lib to the list of paths. Then hit OK to accept the changes.

For VC++2003 (and later) the best bet would probably be to right click on your project (in the solution explorer in …

JasonHippy 739 Practically a Master Poster

I've just noticed a few more errors in my post, but I've exceeded the 30 min edit window....Doh! edits are in bold:

But if the user closes the initial text box with cancel, your code drops to the elif statement where ShowModal is called a second time, creating a 2nd dialog.. In the 2nd call, whether the dialog returns via ok or cancel it will be destroyed.
So it is the call to ShowModal in the elif that is the problem!

What you need to do is alter your code so that you're making one call to ShowModal and then see what value was returned..

Sorry about the DoModal's in my previous post please ignore them...I meant to put ShowModal!

DoModal() is a Windows C++ dialog call, whereas ShowModal() is the wxPython equivalent!

I can't blame my stupid, fat drummer fingers for that...I think it was my stupid, empty drummer cranium! heh heh :P