Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
doug777 #1
More tutorial problems
In another tutorial I get the following compile error:
Error /tutorials/tutorial2.mxml
A file found in an source-path must have the same package structure '',
as the definition's package, 'samples.contact'.
There is a file called Contact.as, but I don't know where it should be
located to be in a flex classpath.
The file tutorial2.mxml contains the line:
import samples.contact.Contact;
Anybody know how to solve this problem?
Doug
doug777 Guest
-
Tutorial environment problems
I'm stuck on something basic. Running through CF Getting Started tutorial I could not connect successfully to Access db with standard Access... -
Coldfusion- problems with previewing pages of tutorial
Hey, I'm a total newbie to Coldfusion (mostly working with Html and flash) and I've been following the tutorials for getting started (the... -
Blend problems with Adobe Tutorial
I'm having a blending problem with one of the Illustrator tutorials. Instead of creating such a lengthy note here, I've explained my problem on my... -
[FLA MX] Map tutorial
Hello I'm currently looking for a map tutorial under flash Mx (or 5) with possibility of zoom and scale it. thank you P.A. -
WZ2K Tutorial Update - Latest Dynamic Dreamweaver video tutorial
Hi, The latest Dreamweaver video tutorial has been added this evening, covering the following techniques: Expanding the MySQL database... -
ntsiii #2
Re: More tutorial problems
I think Contact.as must have its packge defined :
package samples.contact {
Does it? I am just getting used to this package concept myself.
Tracy
ntsiii Guest
-
doug777 #3
Re: More tutorial problems
Yes you are right I think (can't be absolutely certain as I still have
an error). Adding the mxml files to a correctly defined project (see
below) gets rid of the error I had before.
I am confused though about the difference between a project and a package.
I have found that if I use the same name for an mxml file in different
projects, any errors that occur in either file are all shown in the
problems panel when either file is selected, and neither will run. Both
generate a page can't be found error e.g. tutorial1.html cannot be found
(followed by the location) whereas I can see that this file definitely
does exist at this location. Deleting either of the files allows the
other to run correctly.
In the project definition, I had to change from the default server
(default\flex) to default\samples - I think this is what the tutorial
writer means when he talks about a 'samples web application'.
For anyone else trying to follow these tutorials:
Put the Contact.as file into a contact folder in the default\samples
directory and then in that file and any other mxml file where it is
mentioned, change samples.contact.Contact to just contact.Contact.
However, I still have an error:
In the completed1.mxml file downloaded from MM, there is the following code:
public function changeHandler(event:ObjectEvent)
{
log.text = noteProxy.noteText;
}
This generates the error:
Type was not found or was not a compile-time constant: ObjectEvent
I think this tutorial was written for an earlier beta and has not been
amended to reflect the changes in later betas. It looks as though there
is no longer a type called ObjectEvent in beta3. Does anyone know what
this should be changed to?
Doug
doug777 Guest
-
doug777 #4
Re: More tutorial problems
I seem to have overcome the ObjectEvent problem by changing this type to
Event. Whether this will ultimately work or not I don't yet know, as I
still have a problem.
In my last post I wrote:
The errors from two same named files from different projects all> I have found that if I use the same name for an mxml file in different
> projects, any errors that occur in either file are all shown in the
> problems panel when either file is selected, and neither will run. Both
> generate a page can't be found error e.g. tutorial1.html cannot be found
> (followed by the location) whereas I can see that this file definitely
> does exist at this location. Deleting either of the files allows the
> other to run correctly.
appearing in the problems panel for either file is NOT connected to the
error 404 problem.
I am still getting this problem and I think that although the required
html file is at the location shown, it is derived from the server 'flex'
whereas I think it should be using the 'samples' server.
I have changed every server reference from flex to samples that I can
find in the project properties and this has certainly allowed the file
to compile with no errors, but it seems that something above the project
level is still pointing the browser to the flex server.
Does anyone know how to solve this problem?
Doug
doug777 Guest
-
doug777 #5
Re: More tutorial problems
Having now read through most of the help files in Flex, I now understand
what a project is and can see that it is nothing to do with packages
which are just collections of classes.
I also realize that the problems panel displays the errors in any file
in any open project. I didn't know that you can close projects that are
not being used to stop irrelevant errors showing up. (File/Close Project).
These tutorials were I think not written for AS3, so I have stopped
trying to get them to work.
What would help a lot is a list of all the properties in AS2 that are
not included in AS3 each with a list of the possible alternatives that
could potentially serve the same purpose in AS3.
For example in the 'Use ColdFusion Event Gateway Adapter' tutorial
(which I would particularly like to get working) there is the following
line:
import mx.messaging.messages.Message;
But there is no Message property in mx.messaging.messages in AS3. Anyone
know what this should be changed to?
In addition, the following lines generate a weird error:
pro = new mx.messaging.Producer();
pro.destination = "gateway1";
pro.resendAttempts = 5;
pro.resendInterval = 5000;
resendAttempts and resendInterval are valid read/write properties of
mx.messaging.Producer, and yet generate the error:
Access of possibly undefined property resendAttempts through a reference
with static type mx.messaging:Producer.
and the same for resendInterval.
destination, which is inherited from a superclass, does not error, yet
it otherwise looks to be identical to the other two in the way it is to
be used.
Anyone know how to solve this error?
Doug
doug777 Guest
-
doug777 #6
Re: More tutorial problems
P.S I have tried changing this (since the error implies that these are
static properties):
to this:> pro.resendAttempts = 5;
> pro.resendInterval = 5000;
mx.messaging.Producer.resendAttempts = 5;
mx.messaging.Producer.resendInterval = 5000;
but the error is unchanged.
Doug
doug777 Guest
-
ntsiii #7
Re: More tutorial problems
Check out this page ofr some good resources for migrating:
[url]http://labs.adobe.com/wiki/index.php/Flex:Migrating[/url]
Note especially the Migration Guide pdf, the Actionscript 2 to 3 comparison,
and the Tips for Learning Actionscript.
Tracy
ntsiii Guest



Reply With Quote

