Log in

View Full Version : new to flash 2004 mx



Pages : 1 [2]

Medyman
05-08-2008, 04:02 AM
what is offset?
The highlighted:

panel1._x = panel1._x - 100; // move panel1 to the left by 2px
panel2._x = panel2._x - 100; // move panel2 to the left by 2px


Some of the words on the logos looked blur when its is moving.
Well moving things are going to look blurry. That's just basic physics. You'll have to play around with the offest/frame rate to see what looks the best. Tweening engines usually produce smoother motion but, at this rate, it would have taken well into next year to integrate.



this.onEnterFrame = function() {
if(_ymouse<x.yMin || _ymouse>x.yMax) {
panel1.onEnterFrame = Scroll;
this.onRollOver = stopScroll;
}
}
}

This code says that when the mouse position is either above or below the panel movieclip, start the scrolling again. Bascially, it mimics the onRollOut behavior without using a onRollOut mouse event. Flash doesn't support nested rollovers so it has to be done this way.

hyk
05-08-2008, 04:08 AM
Tweening engines usually produce smoother motion but, at this rate, it would have taken well into next year to integrate.

Sorry, I quite slow with my learning progress. With just another week or 2, i will have to submit it. :D Maybe the next person who took my part will have something added to it

Medyman
05-08-2008, 04:11 AM
Sorry, I quite slow with my learning progress. With just another week or 2, i will have to submit it.

No worries. Learn at your own speed. What's the rush? :D


Maybe the next person who took my part will have something added to it

Someone else is taking it over now? Quite an efficient system you got going there. Make sure you point them to this thread:p

hyk
05-08-2008, 04:19 AM
Someone else is taking it over now? Quite an efficient system you got going there. Make sure you point them to this thread

I suppose so. Since i taking over from the previous student. maybe the next person will had to do other stuffs. nah, i will not point them (longest thread for a single qns on flash). I will introduce him/her to dynamicdrive. :D

here is the website where the marquee might be used in ( lol, i blow my cover ) I go check it out with my teacher
http://www.securitytechcommunity.com.sg/Partners.aspx

medyman, how do think the marquee can be further improved? :D

Medyman
05-08-2008, 12:19 PM
1. XML and/or CMS integration
2. User-initiated navigation (user should be able to scroll manually, not having to wait for the whole thing to complete to view one)
3. Powering it with a tweening engine
4. Add onRollOver effects to the logos

The marquee right now just looks amateur. A lot of that has to be with the graphics used. Considering how confusing this was for you, I didn't want to get into more things like tweening engines, further conditional statements, more complicated math.

I can't post the site that I made my marquee for -- for legal reasons. When we launch next month, I'll be sure to post a link for you so you can see a full featured "marquee".

hyk
05-08-2008, 12:54 PM
lol, i only gt another 1 week + to submit though, pity the next person who do it:p



The marquee right now just looks amateur

spare me medyman, i got a total of 12wks to do this thing orginally( based on my school system) But, firstly i was only given this marquee thing on week 4. Actually i could have done it in javascript but seeing its code nah don`t dare to take the risk since flash is more popular in creating marquees. as for the other reasons, i suppose i put in my the old posts. I don`t really want to bored you with my old stories. well i be my making my presentation on my progress & demo in 2wks time, after that i be going on my attachment(internship). :D

Well if* my teacher decide he fine with it, i suppose this thread can take a break .:)

A full marquee,wow i be looking forward to it. Let me guess if you don`t mind, the mascots will take the center stage at the beginning, when you mouseOver it the mascots disappear. So i suppose its more of a movie/slideshow den a simple marquee(like mine)

Medyman
05-08-2008, 01:23 PM
Whoa, easy tiger! I didn't mean to offend. But the images you use makes a huge difference. If you used higher resolution, clearer, crisper images and maybe added an onRollOver effect, the change would be dramatic.

As far as mine, it's not quite what you say. The example I posted was a fairly slimmed down version of what I created for a client. I can't very well just give away things that I'm paid to make. I'm trying to run a business here :D

To your point about javascript, a simple "marquee" probably should be done in javascript. You haven't really used the power of ActionScript here. Seperate technoligies exist for seperate reasons. Just because you can create the same thing in Flash and javascript shouldn't be a reason for you to. This applies more to HTML/Flash, though.

If you don't mind, I'm just curious about something. You say that this is for some class/presentation? Is it independant study or something? Or are you using teacher as a euphamism for boss?

hyk
05-08-2008, 01:50 PM
If you don't mind, I'm just curious about something. You say that this is for some class/presentation? Is it independant study or something? Or are you using teacher as a euphamism for boss?

its more of an independent study or report kinda of stuff(learning experiences etc etc). For example background of project, using what kind of software to do , what your problems faced etc etc there some more to it but i better dun bore you with it. Well in school terms we called them lecturers, in my last year(which is now) we called them project supervisors. you could say boss in a way if you like(since they are in-charge of us):D. But firstly i not being paid & secondly we are doing something for the school(sort of a learning process& training us for work in the future)
I could post you the link of my school if you don`t mind taking a look. that the least i could do

remember my friend with the flash8? he doing e-learning materials for a subject.

Medyman, don`t worry i not offended, just wondering why you had such an interest. the only thing i lied* till now is my nick.

Actionscript:i still got alot of things to try& learn if i want to learn it.this marquee is just hmm lets see 1% of as? :p


If you don't mind, I'm just curious about something. You say that this is for some class/presentation? Is it independant study or something? Or are you using teacher as a euphamism for boss?

lets sidetrack abit, I am really curious(more curious than the few lines above) to know if he* was my boss how will you react. How did you had this thought btw?

ps: hey some of the parts lets just keep it in this thread, if you are curious about any more parts i could explain. Thanks :D.

Medyman
05-08-2008, 03:55 PM
I was just curious man. He could be your boss, teacher, mother, father...doesn't matter to me.

You just kept saying teacher and then mentioned that it was going on a site, so I was just curious. I didn't mean to insinuate that you lied or something like that :p Sorry if it came off that way.

I suppose you think that I would be offended if you were getting paid for this. But I wouldn't be. You can take the code I gave, rip out the credits, plaster your own and sell it as a product for all I care. I wouldn't appreciate or condone that kind of action. But I'm not going to go out of my way to prevent it. If someone does that (not talking about you, just in general) it's on their conscience. I just tried to help you out to learn a little Flash and ActionScript. Hopefully I was a little successful. What you do with that information is your business.

;)

hyk
05-08-2008, 04:09 PM
You just kept saying teacher and then mentioned that it was going on a site, so I was just curious. I didn't mean to insinuate that you lied or something like that Sorry if it came off that way

ah ic. well that the problem is with words we don`t exactly know what the other party is trying to say completely. no harm is being done :) sorry not accepted:D

lol, he a vip to me till for the next 2 wks. at the end of it, i need to present to him & some other folks.

If you are curious about other stuffs, feel free to let me know.



I suppose you think that I would be offended if you were getting paid for this.

i misunderstood you. (now i suppose to say sorry instead). well you are paid to design sites etc etc. lol if i took your code& use it for (selling etc), it will be very unfair to you. that from my point of view

;)

Medyman
05-08-2008, 04:18 PM
i misunderstood you. (now i suppose to say sorry instead).

That's the problem with words -- we don't always know what the other person is trying to say :p:D:p


well you are paid to design sites etc etc. lol if i took your code& use it for (selling etc), it will be very unfair to you. that from my point of view
If only other people shared your conscience. Some people just like taking the cheap/easy way out I guess. This marquee thing did take a while longer than it probably should have but seriously I applaud you for actually wanting to learn and sticking with it. Most people wouldn't do that.

hyk
05-08-2008, 04:30 PM
This marquee thing did take a while longer than it probably should have but seriously I applaud you for actually wanting to learn and sticking with it. Most people wouldn't do that.

*gulp* ya its sure looks long enough :p .nah the applaud i should give you instead. your patience of eh 2x+ pages (more to come maybe)& i such a pain in the *** sometimes(jumping to conclusions, syntaxs etc. hey you forgetten another part, the appearance of certain project save me. who knows, i might have gave up long ago.:p


Some people just like taking the cheap/easy way out I guess

lol, i admit .I would do that. But i would like thank the person & give the person due credit. .Its really make a person`s day when someone said, hey thanks to you i can do "......" :D

What the difference between cs3& flash8??

Medyman
05-08-2008, 07:22 PM
What the difference between cs3& flash8??

In a nutshell...ActionScript3 & AIR.
There are other things like interface changes and some advanced features but the biggest thing is that it supports ActionScript 3 and AIR.

(Flash 8 might support AIR now too, not sure).

hyk
05-09-2008, 02:46 AM
al`right, he was quite happy with the result. I can say i 70% done with what i been tasked with. now i just need to do reports etc etc. :D THANKS!!!
medyman, can you provide a few links ??? AIR sounds like a whole new language to me.

a side qns on the marquee. :D i was thinking of making an marquee ( with the same old functions etc) but the image will move a step when its is pointed (regardless left or right) . Is it very hard? Its is not for my project, just for my own interest or you could call it amusement if you want. Could flash read gif,png files?

Sorry in advance, i not even sure what in the world am i talking about with regards to the marquee. i better show you an example here (http://www.jeremywilken.com/projects/carousel/carousel.html)

Medyman
05-09-2008, 12:56 PM
Eh could you please tell me which part i would need to comment? Sorrie. the highlighted part, I put it there in case I might need it. Well i got 2 vers of it now.
You can comment whichever part you want. Comment is really only for your purposes. Is someone going to be looking at the source?

The highlighted can probably go. It'll probably cause more problems rather than prevent them.


Could flash read gif,png files?
Of course.



i was thinking of making an marquee ( with the same old functions etc) but the image will move a step when its is pointed (regardless left or right) . Is it very hard? Its is not for my project, just for my own interest or you could call it amusement if you want.

Sorry in advance, i not even sure what in the world am i talking about with regards to the marquee. i better show you an example here

Do you want to create that kind of "3d" carousel? Of course it's possible but I wouldn't start with the same code that you have for the marquee

I *could* walk you through how to make one. But I find it's easier to learn when you have some visuals (at least for me). So let me point you towards Lee Brimelow's tutorials on how to create these:

Creating 3D Carousels (http://gotoandlearn.com/player.php?id=32) (Length: 32:16)
Learn how to create slick looking 3D carousels using Actionscript.

Creating 3D Carousels 2 (http://gotoandlearn.com/player.php?id=33) (Length: 31:26)
In part 2 we dynamically create carousel items using XML and show tooltips.

Creating 3D Carousels 3 (http://gotoandlearn.com/player.php?id=34) (Length: 31:57)
In part 3 we animate our carousel and create a mini, interactive Flash site


You'll definitely want to complete the first two tutorials. The third one might not be of any use to you depending on what you want to use this for. If you have any questions, feel free to ask here (might be better to create another thread for it though).



medyman, can you provide a few links ??? AIR sounds like a whole new language to me.
Actually, it's not really a whole new language. Well, AIR in itself isn't a language at all but there are certainly AIR-specific methods within various languages (http://livedocs.adobe.com/flex/3/langref/index.html). AIR (Adobe Integrated Runtime (http://www.adobe.com/products/air/)) is a runtime environment (cross OS) that lets you take Flash, Flex, HTML and Ajax applications from the browser to the desktop. You can create some really dynamic desktop applications but the things that I'm seeing in AIR right now are little gadgets/widgets. You can view some of these applications at freshAIRapps.com (http://freshairapps.com/).

Again, I'll point you towards Lee Brimelow and the following tutorials.

Developing AIR in Flash (http://gotoandlearn.com/player.php?id=41) (Length: 15:01)
In this tutorial I show you how you can develop AIR using Flash CS3 Professional.

Drag and Drop in AIR (http://gotoandlearn.com/player.php?id=42) (Length: 15:07)
Learn how to drag and drop files from the desktop onto your AIR applications.

Webcams, PNGs, and AIR (http://gotoandlearn.com/player.php?id=44) (Length: 16:21)
Build an AIR application that takes webcam shots and saves them to the desktop.

You might also want to check his blog (http://www.theflashblog.com) as he has some other applications that he's released open source. Lee Brimelow, by the way, is a technology evangelist for Adobe (specifically for Flash & AIR) so that's why his stuff is probably some of the most accurate and reliable tutorials out there.

Again, AIR can only be developed in CS3 with ActionScript 3 (if you want to go the Flash app route). So, the first task would be to learn ActionScript 3 and then move to AIR. :D
Happy Learning!

hyk
05-09-2008, 01:14 PM
medyman, wow 3D marquee . i was looking more in a 2D kinda of marquee, since i thought i just play around with my present code. I can`t be writing my reports all day long.:D I like the 3D marquees, kind of cool & intersting to play with.

noobie qns here: i seriously thought flash 8 could do 3D kind of design, never thought flash mx could do it:eek:, I could bad comments from my IT side friends though


You can comment whichever part you want. Comment is really only for your purposes. Is someone going to be looking at the source?

I not too sure about that. . I thought maybe the next person might need it


Could flash read gif,png files?

Of course.

so i just need to put the pic in the image folder, & write the name down in the textfile right? i did that, but it did not work. so does it means i need to write down extra code? (i try again when i get back to school on mon)

since he never saw my code( just the textfile), i print out the whole as & ask him if i need to keep the highlighted* part, since with/without the marquee can still work. he said it will be best if the marquee can accept the png etc

Medyman
05-09-2008, 01:24 PM
medyman, wow 3D marquee . i was looking more in a 2D kinda of marquee, since i thought i just play around with my present code.

We'll it's not really 3D...it's 2D with some visual trickery to get it to look 3D. For truly 3D experiences, you need to use something like PaperVision3d (http://blog.papervision3d.org/) or Sandy (http://www.flashsandy.org/).

Edit: I think I misunderstood what you were going for before. I just reread your post and I think you just want the marquee to follow the mouse. If that's the cause, I'll point you towards another Lee Brimelow and gotoandlearn() tutorial:

Scrolling Thumbnail Panel (http://gotoandlearn.com/player.php?id=25) (Length: 17:45)
Learn how to create a scrolling panel of thumbnails that react to the user's mouse.

You might have seen this before since I've linked to it in this thread. It didn't fit your needs before but it will now. You'll have to intergrate the XML bits into the technique he's showing you, though.



I not too sure about that. . I thought maybe the next person might need it
When releasing things to the general public, I usually comment out each line (unless it's blatently obvious what it's doing...or I'm feeling lazy :p).


so i just need to put the pic in the image folder, & write the name down in the textfile right? i did that, but it did not work. so does it means i need to write down extra stuff?

Yup. That should work. Make sure the file names & extentions are correct and that it's in the same folder as all the other images.

Edit: I just edited my last post with the AIR info you asked about.

hyk
05-09-2008, 01:31 PM
hey thanks, you found some things for me to work on :D


When releasing things to the general public, I usually comment out each line (unless it's blatently obvious what it's doing...or I'm feeling lazy ).


i think i could learn* that from you. some of the lines, i not even sure how in the world should i explain


Yup. That should work. Make sure the file names & extentions are correct and that it's in the same folder as all the other images.

i go check it out. Since you say its should work, it looks likes its my mistake again:p

Medyman
05-09-2008, 01:59 PM
i think i could learn* that from you. some of the lines, i not even sure how in the world should i explain

:D
Sure...let me know which lines you need help explaining. You might also want to refer to the version I released that was commented out. Some of the same code still applies.

hyk
05-09-2008, 02:22 PM
You might also want to refer to the version I released that was commented out. Some of the same code still applies.

that what i be doing . if you ask me,the loading part is more or less the same:D


Edit: I think I misunderstood what you were going for before. I just reread your post and I think you just want the marquee to follow the mouse. If that's the cause, I'll point you towards another Lee Brimelow and gotoandlearn() tutorial:

Scrolling Thumbnail Panel (Length: 17:45)
Learn how to create a scrolling panel of thumbnails that react to the user's mouse.

You might have seen this before since I've linked to it in this thread. It didn't fit your needs before but it will now. You'll have to intergrate the XML bits into the technique he's showing you, though.

oh ya, that the one i talking about ( i prefer 3D though, but seeing how stupid & dumb i was 27 pages & counting, lol forget it medyman i don`t want to scare you away from DD, 30++ pages coming up, the mods are going to ban me for this if this happens):D. Sorry to make you double-read my post. i download the source yesterday. oh it must be done with xml. can`t it be used with the same method?

oh ya, talking about the effects. i went to the library to take a look on some books. i saw a book on flash graphics(think that was its name) just some maths & the effects will show. amazing o.0

Medyman
05-09-2008, 05:59 PM
that what i be doing . if you ask me,the loading part is more or less the same

Yeah, it is. Actually, almost exactly in terns of functionality. The syntax changed because of the two panels but it's doing the same thing.

The Scroll() and stopScroll() function would be what's new.


oh ya, that the one i talking about ( i prefer 3D though, but seeing how stupid & dumb i was 27 pages & counting, lol forget it medyman i don`t want to scare you away from DD, 30++ pages coming up, the mods are going to ban me for this if this happens). Sorry to make you double-read my post. i download the source yesterday. oh it must be done with xml. can`t it be used with the same method?
Well, the tutorial isn't using XML. You can use XML if you want. My meaning was that if you want to use XML, you'll have to add that yourself. The code that Lee shows does not use it. But you can if you want. The important thing to learn from the tutorial is how he makes it move.


oh ya, talking about the effects. i went to the library to take a look on some books. i saw a book on flash graphics(think that was its name) just some maths & the effects will show. amazing o.0
Yeah, you can do some amazing things with Flash. If you're lookiing for a book on Flash animation, the definitive book for any serious Flash user is Making Things Move! (http://www.amazon.com/Foundation-ActionScript-Animation-Making-Things/dp/1590595181/ref=pd_bbs_sr_2?ie=UTF8&s=books&qid=1210355892&sr=8-2) by Keith Peters. That's like the holy grail of flash animation. Also, if you don't know about FWA, you should check out their site (http://thefwa.com/). It's a gallery of well-done Flash pieces. I thing that a lot of those sites are Flash overkill and kind of degrade user experience. But there are some gems in there.

hyk
05-10-2008, 06:58 AM
:D. how did you find so much interesting stuffs???

Medyman
05-10-2008, 05:16 PM
:D. how did you find so much interesting stuffs???

Years of Googling :p

hyk
05-11-2008, 07:03 AM
I thing that a lot of those sites are Flash overkill and kind of degrade user experience
mind explaining wat does Flash overall means??

If you're lookiing for a book on Flash animation, the definitive book for any serious Flash user is Making Things Move! by Keith Peters
i not exactly looking for a book. just that, returning some books to the library on the way past by the web designing section, took a peek & saw the graphics stuffs:D

Medyman
05-11-2008, 07:27 AM
mind explaining wat does Flash overall means??

I meant that some of those sites went overboard with the Flash. Again, going back to the just because you can doesn't mean you should argument. There are some really nice sites on the FWA, but I find a great many to be too "flashy". But that might just be my personal style. I'm of the sophisticated simplicity school-of-thought.


i not exactly looking for a book. just that, returning some books to the library on the way past by the web designing section, took a peek & saw the graphics stuffs
I figured as much but if you ever are, you have my recommendation :D

hyk
05-11-2008, 10:12 AM
I find a great many to be too "flashy". But that might just be my personal style. I'm of the sophisticated simplicity school-of-thought.


:D its in line with your kiss theory

hyk
05-12-2008, 01:22 AM
hi medyman, when by i put the gif image in the rawdata folder& the name in the textfile. there a blank in where i insert the image. its animated btw.

Edited: i tried another gif without amination, but i had the same results.

Medyman
05-12-2008, 02:06 AM
hi medyman, when by i put the gif image in the rawdata folder& the name in the textfile. there a blank in where i insert the image. its animated btw.

Edited: i tried another gif without amination, but i had the same results.

Hmm...do you mind sending me the image? I just tried with a gif and it works perfectly. Or better yet, you can try with the image I was testing with (it's attached). An animated .gif won't work within Flash. You can import one, but it will only show the first frame. It won't animate.

1760

hyk
05-12-2008, 03:11 AM
haha. nope it did not work. i type down what i tried 1st & you see if i am correct

Edited: you were right. the code i posted a few days back is quite troublsome because of it ,when i run it did not have errors

method1 : test.gif in (rawdata) test.gif in (logos.text)
method2: Test.gif in (rawdata) Test.gif in (logos.text)(

both of them can work*. there is no errors or anything , but i could not see the gif when i run the marquee. It could be the old version of Flash :D Maybe you could do it in Flash 8


"file:///C|/Documents%20and%20Settings/hyk/Desktop/marquee/marquee/rawdata/"

that the error after i deleted that piece of code. lol what is the problem now?

Medyman
05-12-2008, 03:27 AM
That *should* work. It does for me with the same exact code. I don't think it's anything version related. I'm using CS3 right now and it works. I don't have access to Flash 8 or lower to test. But as far as I know, .gifs have always been supported in Flash.

You shouldn't have any problems. Let me do some research on this and get back to you.

How are you adding them into your text file?

hyk
05-12-2008, 03:39 AM
wow. there so much stuff you can do in cs3.


Let me do some research on this and get back to you.


It better be the problem with the software or i going to make you go on a wild goose chase :p


textfile i put Test.gif
For the |http..... I leave it for later. I put the t in caps since all the words were caps in the 1st letters

Medyman
05-12-2008, 03:54 AM
For the |http..... I leave it for later. I put the t in caps since all the words were caps in the 1st letters

That has to match the actual filename. I think you tested both ways, but just in case you didn't...

try with lower cased T.

Also, try adding it to the middle of the list instead of the first one or something. Make sure that it's not just going by so fast that you can't see it.

Sorry if these are stupid suggestions. I'm just baffled as to why this isn't working for you. I'll ask my head developer tomorrow. He's much more knowledgeable about these obscure technicalities than I am.

hyk
05-12-2008, 04:06 AM
try with lower cased T. ya i tried that too. lol, its t, so its in the middle
I tried changing both the name of test.gif /Test.gif in the image folder & also textfile :D

Sorry if these are stupid suggestions. I'm just baffled as to why this isn't working for you. I'll ask my head developer tomorrow. He's much more knowledgeable about these obscure technicalities than I am.
lol, In the meantime, i tried it out on my friend Flash8 but there an error. lol what wrong? Maybe its my fault? :( my teacher said it will be best if the marquee can "read" the other images formats.
i baffled as well, since gif is quite a popular format in images, flash should be able to read it

Medyman
05-12-2008, 12:47 PM
i baffled as well, since gif is quite a popular format in images, flash should be able to read it

Flash can read it. There shouldn't be ther problem



i tried it out on my friend Flash8 but there an error

What's the error? That would help a lot in figuring out the problem.



lol what wrong? Maybe its my fault?
Did you change something?

hyk
05-12-2008, 01:02 PM
What's the error? That would help a lot in figuring out the problem
its the same error as my mx. the error was something rawdata. Sorry don`t really remember the whole line


Did you change something?

Nope, i meant i could have mistype etc :p I think just to be safe i re-copied the code again since i add the extra code(which you say was quite useless.)

Another thing, my friend`s Flash8 shows the error in chinese(lol don`t ask me why). No offence though, i doubt you could read it judging from your idenify. :D

Medyman
05-12-2008, 01:10 PM
its the same error as my mx. the error was something rawdata. Sorry don`t really remember the whole line

Was it something like:

Error opening URL 'file:///C|/Documents%20and%20Settings/Username/Desktop/marquee/rawdata/Test.gif'

If so, that means that either you typed the name of the filename wrong or you didn't put the .gif in the same folder as the rest of the images.

hyk
05-12-2008, 01:47 PM
its was like that in flash mx but i don`t remember seeing the test.gif.


Error opening URL 'file:///C|/Documents%20and%20Settings/Username/Desktop/marquee/rawdata/Test.gif'

Medyman
05-12-2008, 02:43 PM
its was like that in flash mx but i don`t remember seeing the test.gif.

Well, something is up with how you're entering it into the text file. It's not a Flash issue, as I suspected.

If you want me to take a look at your text file, post it here and I'll take a look.

hyk
05-13-2008, 01:06 AM
here it is. Thanks alot. I just tried it again using the completed one (without the extras code) but the pic did not show up( just a blank in its place

medyman, just to check with you something regarding the code, some of the variables i still not sure about it


loadContainers // push all the rawdata etc into the container*
panel // where you will see the images
i still not quite sure of the symbol,thumb& what is the difference between image& images

sorry in advance if my comments are quite lousy& its an insult to your codes :p

1 more thing, i kept forgetting about it. When you run the flashplayer. it will pop up the marquee. when you stretch the window, the images get bigger & if you skrink it, its get smaller. Is there a way to control the flashplayer?

Medyman
05-13-2008, 02:12 AM
here it is. Thanks alot. I just tried it again using the completed one (without the extras code) but the pic did not show up( just a blank in its place
I don't know what to tell you. It works for me with the same exact code and the same text file that you're using. You're 100% positive that you're adding the image to directory, right?

If you want, zip everything up and post it. I'll check if it's a Flash version thing, though I highly doubt it. I've been told by several people that .gifs were indeed supported in MX 2004.


i still not quite sure of the symbol,thumb& what is the difference between image& images

Have you every played a trick on your friends/family where you have a small present to give them and you pack the gift in a small box and then you put it in a larger box and then you put that box in an even larger box? Well, even if you haven't, this is kind of like that. image is the movieclip that the images load into. Thumb is a movieclip that contains the image. Think of it like matting around a picture. And symbol is the frame that they all hang in.

Why so many containers? Well, remember my original code with the mascots (http://dynamicdrive.com/forums/showpost.php?p=139759&postcount=75)? And how I had those onRollOver effects? Well that effected needed multiple containers. That's why there are three left...kind of legacy code.

You only need two -- the actual image and it's frame (using the picture frame analogy again). You can get rid of the "thumb" bit if you want.

Here is some modified code. I changed the name of "symbol" to "logo", so it's more applicable to this application. If you swap out your loadContainers function with this, it'll still do the same thing, just less overhead.


function loadContainers() {
for(j=1;j<=2;j++) {
for(i=0;i<images.length-1;i++) {
var logo:MovieClip = this["panel"+j].createEmptyMovieClip("logo"+i, i);
var image:MovieClip = this["panel"+j]["logo"+i].createEmptyMovieClip("image", i);

this["panel"+j]["logo"+i]._x = 202*i
this["panel"+j]["logo"+i]._y = Stage.height/4;

var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();

mclL.onLoadComplete = function() {
count++;
if(count == ((rawdata.length-2)*2)) {
_root.onEnterFrame = position;
}
}

mcl.loadClip("rawdata/"+images[i], this["panel"+j]["logo" +i]["image"]);
mcl.addListener(mclL);

this["panel"+j]["logo"+i].id = i;
this["panel"+j]["logo"+i].onRelease = function() {
getURL(urls[this.id]);
}
}
}
}

I removed one line and changed all the references of symbol to logo and removed all references to thumb.

So now (referencing the new code), logo refers to the picture frame. And image is the actual image of the logo.

Make sense?



sorry in advance if my comments are quite lousy& its an insult to your codes
To each his own. As long as they work for you, that's all that matters.


When you run the flash player. it will pop up the marquee. when you stretch the window, the images get bigger & if you skrink it, its get smaller. Is there a way to control the flashplayer?
Yeah...
In Flash, go to File > Publish Settings > HTML > Scale > No Scale

That'll fix it when you embed it into a webpage.

If you want to do it to the actual .swf, add

stage.scaleMode = "noScale"
to the AS.

Medyman
05-13-2008, 02:43 AM
Oh, and you asked about the difference between image and images.

images is an array that holds the filenames for all of the images in the entire marquee
image is a movieclip that holds the logo's image

See the plural, singular relationship there? To me - it's logical. I've found out that it confuses a lot of people though. I'll have to remember to keep away from that naming convention when I post code for people.

hyk
05-13-2008, 02:52 AM
If you want to do it to the actual .swf, add

Code:
stage.scaleMode = "noScale"to the AS.


this["panel"+j]["logo"+i]._x = 160*i
this["panel"+j]["logo"+i]._y = Stage.height/4;
where do i add it in the as? right here?


I don't know what to tell you. It works for me with the same exact code and the same text file that you're using. You're 100% positive that you're adding the image to directory, right?

If you want, zip everything up and post it. I'll check if it's a Flash version thing, though I highly doubt it. I've been told by several people that .gifs were indeed supported in MX 2004.


lol, if it was my mistake, i might get a dressing-down. :p *gulp* i post it in the morning(your time) since i having the same old problem. Actually, at the beginning of the whole thing, i was told .gifs was not supported.



it's logical. I've found out that it confuses a lot of people though. I'll have to remember to keep away from that naming convention when I post code for people.

LOL, you can`t blame them can you. you were the one who wrote it, so you must very clear about it:D They sure look similar

Medyman
05-13-2008, 02:58 AM
where do i add it in the as? right here?

At the very top is a good place. It has to be outside all the functions and all that.


i post it in the morning(your time)
Ok.


LOL, you can`t blame them can you. you were the one who wrote it, so you must very clear about it They sound simliar
No, I can't. I know it's confusing. It's different when you're making something for yourself and for other people to read. I have no problem understanding it because I wrote it. But, I can see why someone else might. Now, if I can only remember not to be confusing.

hyk
05-13-2008, 03:03 AM
eh, the stage thing i put at the 1st line of the whole as. Does`t really seems to work :p.


Yeah...
In Flash, go to File > Publish Settings > HTML > Scale > No Scale

That'll fix it when you embed it into a webpage

thanks for your tip. I open it in html form. the whole marquee was quite ugly* in a way. The marquee length is not long enough. & there a very big square. below the whole marquee. :D When i click the marquee, the whole marquee freeze. why is that so?

Could I borrow your ideas on how to better improve the marquee? If its fine with you, would you mind explaning this part? I could use it in my report :p. Hopefully, the next person is well-versed in flash if he./she had to modify the marquee i did

here is the link (http://www.mediafire.com/?7w9ez2tyeqt) for the file. Thanks for taking a look.

.
1.XML and/or CMS integration (i google on it, but its sounds greek to me, if you have an easier explaination i be glad to hear it)
2. User-initiated navigation (user should be able to scroll manually, not having to wait for the whole thing to complete to view one)
3. Powering it with a tweening engine
4. Add onRollOver effects to the logos

Medyman
05-13-2008, 12:41 PM
eh, the stage thing i put at the 1st line of the whole as. Does`t really seems to work

Did you also change it in the publish settings? In needs to be in both places to properly work.


When i click the marquee, the whole marquee freeze. why is that so?
Well, the marquee is set up to stop when you mouse over it. When you click, a webpage opens. But that doesn't start the marquee again. You have to mouse off the marquee for it to restart.

If you mean that your computer is actually freezing and not just stopping, then it's probably has to do with your computer and it's processing power.



Could I borrow your ideas on how to better improve the marquee
No, I hold strict copyright over ideas I give on on other people's projects. Contact me via email for licensing options. :p

I'm kidding of course. Feel free to use anything and everything that I give/show you. You don't have to ask :D


1.XML and/or CMS integration (i google on it, but its sounds greek to me, if you have an easier explaination i be glad to hear it)
Greek or geek? :p CMS stands for Content Management System. Wikipedia (http://en.wikipedia.org/wiki/Content_management_system) does a good job explaining it.

Did you also want explanitions on the rest of my "tips"?


here is the link for the file. Thanks for taking a look.
Yeah, so I figured out the problem. It turns out that my sources were wrong and it is a Flash version problem. It's hard to believe but there doesn't seem to be much GIF support in Flash MX 2004 and before. I've asked some people if there are solutions but it might just be unsupported.

I opened your file in Flash CS3 and tested it - it didn't work. I tried changing the image to see if that was the issue. It wasn't. Then, figuring that all else was the same, I went into the output settings. I changed the output to Flash Player 8 and voila it worked! It turns out that the MovieClipLoader class didn't support GIFs until Flash 8.

You can compare the versions here: Flash 8 (http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002538.html) vs Flash MX 2004 (http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00001577.html)
I'll let you know if there is a solution. But otherwise, you can tell your teacher that you simply can't do it with Flash MX 2004. Tell them to buy you Flash 8 and you'll certainly do it :p

The code works -- unchanged -- with gifs in Flash Player 8.

Medyman
05-13-2008, 01:14 PM
Yeah, after some research what I said above is true. Importing GIF (or PNG) files is not supported with Flash Player 7 (and thus MX 2004). The only solution would be to conver the .gif and .png files into .swf movies and import them that way.

hyk
05-13-2008, 01:20 PM
Did you also change it in the publish settings? In needs to be in both places to properly work
Mind explaining it?


Well, the marquee is set up to stop when you mouse over it. When you click, a webpage opens. But that doesn't start the marquee again. You have to mouse off the marquee for it to restart.

If you mean that your computer is actually freezing and not just stopping, then it's probably has to do with your computer and it's processing power.


ya i know that. Its seems like it my school computer problem. when i tried to click the images, a messenge box pops up saying adobe flash & the whole thing freeze. If i do not know the 1st part, you going to strangle me:D


The only solution would be to conver the .gif and .png files into .swf movies and import them that way.

would you mind tell me where the source. with this kind of evidence, i could go on & on. i finish half the report just now, but it seems like i keep running around in circles

CMS stands for Content Management System. Ya i read that from 1 of your post.when i google xml& cms, the infos sounds geek* for me Sure, i could fill up half the page with your lecture on the rest:D


But otherwise, you can tell your teacher that you simply can't do it with Flash MX 2004. Tell them to buy you Flash 8 and you'll certainly do it

did i told you my teacher say gifs can`t be used with flash mx? Well, its neither our faults.By the time they got me flash8, i don`t think i had a chance to use it. be at internship. I could use that method in my recommdation pages. Thanks

Last but not least, i finally suprised you with a question which you can`t answer :D

Medyman
05-13-2008, 10:37 PM
Mind explaining it?
The publish settings are what i told you to change to get it to work in the HTML page. File > Publish Settings


when i tried to click the images, a messenge box pops up saying adobe flash & the whole thing freeze. If i do not know the 1st part, you going to strangle me
lol. Yeah, without that error, I can't help much. It might be a sandbox security warning.


would you mind tell me where the source.
Umm, the source would really be those two links to the Flash livedocs that I linked. The MovieClipLoader class and the loadMovie() (http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00001519.html) method are the only two ways to dynamically import other media assets into Flash. As you can tell my the documentation, they don't support GIF files. They do support .SWF files, though. So, importing .swfs will work. Hence, my suggestion.


CMS stands for Content Management System. Ya i read that from 1 of your post.when i google xml& cms, the infos sounds geek* for me Sure, i could fill up half the page with your lecture on the rest
Well, take the olympics example I showed you. It's powered by XML (the devs changed it). But I don't really want our client going in and having to edit XML. Especially because we're making an entire site for her. So, if she has to upload content to her site, upload media etc.. in all different places, it's really confusing and hard to keep track of. So, we've developed a centralized content management system (ExpressionEngine with a lot of CodeIgniter extensibility).

So, in the case of the marquee. A user could use a basic HTML form to upload an image and enter the link. This information would then be stored in a database. Some PHP scripts could be used to either write out XML or edit a text file, and this way the client never has to touch that messy text file. As you know, it's really easy to make a typo or something like that in that text file (especially with that formatting).



did i told you my teacher say gifs can`t be used with flash mx? Well, its neither our faults.By the time they got me flash8, i don`t think i had a chance to use it. be at internship. I could use that method in my recommdation pages. Thanks
Wait...so he knew it couldn't be done but still asked you to do it?


Last but not least, i finally suprised you with a question which you can`t answer
I never claimed to know anything. It won't take much to get to the limit of my knowledge. But in all fairness, I did answer it :p (after several tries).


3 more replies and we get to 300, yes!!

hyk
05-14-2008, 01:12 AM
No, I hold strict copyright over ideas I give on on other people's projects. Contact me via email for licensing options. 3 more replies and we get to 300, yes!!
:p. you going to charge me for your services from 301? I better ask more then.


lol. Yeah, without that error, I can't help much. It might be a sandbox security warning.

what do you mean by that? Anw, i tried using my ff last night, though I have that error too (same as my school IE), at least the marquee won`t freeze after clicking [adobe flash has detected an unsafe operation & had to be close. I had to change the setting etc. When i click the settings button, it links me to here (http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html)

Wait...so he knew it couldn't be done but still asked you to do it?The only solution would be to conver the .gif and .png files into .swf movies and import them that way.
YA. ok, he told me Flash Mx was bad.how do you convert the .gif to .swf ??
Edited: put that on hold 1st :D


Ya my scale became to no scale

Medyman
05-14-2008, 01:27 AM
you going to charge me for your services from 301? I better ask more then.
Good idea! What do you think is a fair rate?


When i click the settings button, it links me to here
That's the sandbox security error I was talking about. Follow the instructions on that page, that should solve your problems. When you embed the marquee on a website, you won't get the error. It only happens in local testing (until you fix it, instructions are on that page u linked to).


do you convert the .gif to .swf ??
File > Import
save as .swf

There might be some freeware/shareware out there to do it. But it's so much easier to conver a .gif to a .jpg rather than a .swf. I would go that route, if I were you.

300!

hyk
05-14-2008, 01:37 AM
Good idea! What do you think is a fair rate?

your rates is quite high right?I google abit on your company. :D i prefer free consultion. Or do you have a student price?? :p

Medyman
05-14-2008, 01:43 AM
your rates is quite high right?I google abit on your company. :D i prefer free consultion. Or do you have a student price?? :p

Actually...we do have some community forums where people can ask about the various tutorials we post on the site. The site is currently down because I'm redesigning it at the moment.

So, free consultation works.

And for the record, I think our prices are quite competitive - quite lower than counterparts in the industry with far inferior work. But we're not really trying to target large clients (though have had some...took them on more to pay the bills than anything else. They're a huge pain to do deal with). I much prefer working with small companies, artists, non-profits, etc...

But that's neither here or there.

hyk
05-14-2008, 02:54 AM
lol, i can`t afford to pay you.
And for the record, I think our prices are quite competitive opps, sorrie i not sure of the prices.


But we're not really trying to target large clients (though have had some...took them on more to pay the bills than anything else. They're a huge pain to do deal with
lol, sometimes the smaller ones are the most easiest to work with :D.

ps: sorrie to go out of point as usual:p

Medyman
05-14-2008, 03:00 AM
lol, sometimes the smaller ones are the most easiest to work with

In some ways, yes. Others, no. But I find it gratifying to make someone's first website, for example because that has a tangible result and purpose. Plus the whole corporate, capitalist culture really turns me off.

I'd rather make a site for a non profit doing good work and break even on it rather than make a lot on a large corporate site. That's just me, though. I just find it more rewarding.


lol, sometimes the smaller ones are the most easiest to work with
lol, i don't mind. just wish that a mod doesn't come in here and shut us down. lol. Do you realize that the next largest thread in this entire form has like 50 posts max. :p

hyk
05-14-2008, 03:11 AM
lol, i don't mind. just wish that a mod doesn't come in here and shut us down. lol. Do you realize that the next largest thread in this entire form has like 50 posts max.

yes. I knew it when its was around a month back. this could be 1 of the longest thread in DD. but if it is in flash, both of us won hands down. what other web technology can be intergrated with flash? i know there is html,javascript & xml.
My bad:p

remember I ask you about the sandbox ?when i open the link, i saw this line.
If you are a designer or developer creating applications for Flash Player, see Global security settings for content creators instead.

al`right it could work at home, i using ff btw. :p, how do i make the flash-box smaller & the marquee stretchs across the whole length?. I think you had that example, when i uploaded the file?

Medyman
05-14-2008, 01:08 PM
what other web technology can be intergrated with flash? i know there is html,javascript & xml.

PHP, ASP, SQL, Ajax, Flex
You can do things with server communications -- multi-player games, etc... Of course there are the streaming capabilities -- audio/video. The most exciting thing, at least for me, now is AIR.

In the online world, there is very little that can't be done with Flash (with the aid of some of these other technologies). Of course, again, it shouldn't be used for a lot of these applications. I didn't say that Flash can do it all well, but i can be done. Now that Adobe is making Flash open source, it can only grow.

hyk
05-14-2008, 02:25 PM
when i click the settings, I just need to need to click always allow right? Do i need to add in folders etc? Its works in ff, but when i tried it with IE7, the whole thing freezes after the mouseover( i took away the mouse from the marquee). but i could link to the website by clicking

Medyman
05-14-2008, 03:45 PM
when i click the settings, I just need to need to click always allow right? Do i need to add in folders etc? Its works in ff, but when i tried it with IE7, the whole thing freezes after the mouseover( i took away the mouse from the marquee). but i could link to the website by clicking

I'm really not sure about those settings. I've not had to change them but once.

hyk
05-15-2008, 01:21 AM
Its works with IE6 suprisely. But with IE6 i had this big box. the rest i tried, do not have this problem. Is there anything I can do?

Medyman
05-15-2008, 01:37 AM
Yes, embed with SWFObject (http://code.google.com/p/swfobject/). There is a code generator here (http://www.swffix.org/swfobject/generator/), documentation here (http://code.google.com/p/swfobject/wiki/documentation), and some examples here (http://code.google.com/p/swfobject/wiki/test_suite).

hyk
05-15-2008, 02:42 AM
Ok. Thanks. So i just need to edit some of the details in the code generator, generate it & copy & paste the code into my html?

Medyman
05-15-2008, 03:09 AM
Yup. Don't forget to link to the external JS in the <head> as well.

hyk
05-15-2008, 04:09 AM
What is a external JS? Is it something like this here (http://www.javascripter.net/faq/externa2.htm) :D


var logo:MovieClip = this["panel"+j].createEmptyMovieClip("logo"+i, i);
var image:MovieClip = this["panel"+j]["logo"+i].createEmptyMovieClip("image", i);

the 1st line is called logo array & 2nd is called image array. right?

this.id The id means idenify?

Medyman
05-15-2008, 01:24 PM
What is a external JS? Is it something like this here
Yes, but the HTML generator adds it. I didn't realize that when I posted. So if you copied/pasted from the HTML generator, you don't have to worry about it.


the 1st line is called logo array & 2nd is called image array. right?
No, they're variables. Not arrays.


this.id The id means idenify?
Sure. You can define it however you want. It's an arbitrary property that I created to create a reference. You can't access the array index within an onRelease function, so this is the metod you have to use. See this post (http://www.dynamicdrive.com/forums/showpost.php?p=142961&postcount=6) for a (better?) explanation.

hyk
05-15-2008, 01:56 PM
ya i did that. copied the whole chunk in. The only things i did to that page was chang the name of the .swf, size of the pics & delete the <a herf> thing. So the
embedding is done right? Now if i want put the header etc, do i do it the css way? my teacher gave me a shock. He say for my demo, i need to show him a proper marquee in html. So the box can`t be remove right? Sorry this sounds like
a dumb question :p

[/QUOTE]No, they're variables. Not arrays.[/QUOTE]
i see,my bad. I read from the one you send me, its says arrays(looks very similar)

Edited: opps, you answer my header question in html. I just saw it. html, i should be fine with it. Never really touch it for a year. I just need to show how its looks in the web, i suppose:p

Medyman
05-15-2008, 02:00 PM
i see,my bad. I read from the one you send me, its says arrays(looks very similar)
Yeah, again images with an S is the array.


ya i did that. copied the whole chunk in. The only things i did to that page was chang the name of the .swf, size of the pics & delete the <a herf> thing. So the
embedding is done right? Now if i want put the header etc, do i do it the css way? my teacher gave me a shock. He say for my demo, i need to show him a proper marquee in html. So the box can`t be remove right? Sorry this sounds like
a dumb question
Yeah, the HTML/CSS way. This question would probably be better suited for the HTML/CSS forums. So why don't you post there. I'm not sure about the outline. I'll need to see your code to see what's causing it.

hyk
05-16-2008, 08:36 AM
Thanks, i get what you mean. we need to declare 2 createEmptyMovieClip is because we need the frame(logo) &pictures(image) in it
why are there 2 Is in the logo?

var logo:MovieClip = this["panel"+j].createEmptyMovieClip("logo"+i, i);
var image:MovieClip = this["panel"+j]["logo"+i].createEmptyMovieClip("image", i);


Mind if i drop you an e-mail? then I clariy the codes all at one go:D

Medyman
05-16-2008, 05:07 PM
Thanks, i get what you mean. we need to declare 2 createEmptyMovieClip is because we need the frame(logo) &pictures(image) in it
why are there 2 Is in the logo?

var logo:MovieClip = this["panel"+j].createEmptyMovieClip("logo"+i, i);
var image:MovieClip = this["panel"+j]["logo"+i].createEmptyMovieClip("image", i);

No, you're confusing the two. The code that you posted is the frame + picture bit. The two createEmptyMovieClip lines are because of the continuous motion. Think of it like a conveyor belt. The top of belt is panel1 and the bottom is panel2. They're connected and move in a loop. But they're exact copies of each other. This creates the continuous motion (or the perception of it, at least).


Mind if i drop you an e-mail? then I clariy the codes all at one go:D
No, I don't mind.

hyk
05-22-2008, 08:49 AM
Hi I am back, I embed the the marquee in the html. But when the images is clicked, the present window will show the homepage. How could i make a new window pop up instead?

Medyman
05-22-2008, 02:40 PM
Yeah sure,

the getURL() method takes several paramters:


getURL(url:String, [window:String, [method:String]]) : Void

So, add the second parameter, like this:

getURL(urls[this.id], "_blank");

hyk
05-22-2008, 03:31 PM
this["panel"+j]["logos"+i].id = i;
this["panel"+j]["logo"+i].onRelease = function() {
getURL(urls[this.id]);




getURL(urls[this.id], "_blank");

I add this line after the 1st getURL?:D

Medyman
05-22-2008, 04:15 PM
this["panel"+j]["logos"+i].id = i;
this["panel"+j]["logo"+i].onRelease = function() {
getURL(urls[this.id]);





I add this line after the 1st getURL?:D

hmm...no! it is the the getURL! Just replace it.

hyk
05-22-2008, 04:23 PM
opp.my bad:p. I took a look again. It is exactly the same + the , "_blank".

Thanks

hyk
05-23-2008, 01:06 AM
opps. I forgetten to ask you another part. Ya, I can open the new window but how do i read the url of the image & transfer it to the new window? I read about someting to do with javascript though

Medyman
05-23-2008, 01:22 AM
Why would you want to send the url of the image to the next page? The pages you're linking to are company's homepages, right? They wouldn't be able to read whatever javascript you transmit.

If you explain what you're trying to do, there might be a better way to do it.

But in any case...regarding your question:

If you can figure out how to do it with regular html/javascript, I'll show you how to add it to flash.

I don't know enough JS (I'm trying to learn though), to help with the JS part of that. But yes, it would be possible.

hyk
05-23-2008, 02:22 AM
Okie. Everything went smoothly. Well we can finally close this thread :D. Thanks a ton Medyman for what you taught & guided me for the last 2 to 3 months.

Medyman
05-23-2008, 11:41 AM
You're very welcome :D.