ThemeForest

Posts by doru

5301 posts
  • Community Superstar
  • Italy
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Beta Tester
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Author had a Free File of the Month
+2 more
doru says
How to get a cow on the moon using only AS3 … :D
moon.addChild(cow); Done! :D

brilliant :D

5301 posts
  • Community Superstar
  • Italy
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Beta Tester
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Author had a Free File of the Month
+2 more
doru says

you get no answer because you ask a general question. to explain how to do it its like writing a tutorial only for you. And people don’t have time to do it. You should use google to search tutorials for flash and probable you will find one that show you step by step how to build something like this.

5301 posts
  • Community Superstar
  • Italy
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Beta Tester
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Author had a Free File of the Month
+2 more
doru says

yeah that’s nice. its a combination of timeline animation and actionscript code navigation.

5301 posts
  • Community Superstar
  • Italy
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Beta Tester
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Author had a Free File of the Month
+2 more
doru says
Because they are not global, they are public properties of your movieclip instances… mcA.background is different than mcB.background…

Yes, and they are working as you said.

I have to say that I will not lose my day on this, its not essential for my file to export to actionscript those background or arrows symbols, but I just want to bring to attention this strange behavior and maybe understand something from it myself.

5301 posts
  • Community Superstar
  • Italy
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Beta Tester
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Author had a Free File of the Month
+2 more
doru says
Are you exporting the backgrounds with different linkage name?

yes. because they are different symbols. So when I check the export option I have to give it a class name and the base class. It auto completes this fields with the name of the symbol from the library as Class and flash.display.MovieClip as Base class.

Then you don’t need to declare the var background, everything on the stage is a public instance.

Its my wacky ways of doing things. I need to declare that variable so Flash Builder provide me with auto complete code feature. I do not initialize that var anyway. Just declare it in the class. I do not use Flash Builder compiler, I just use it as a code editor only. I compile with Flash. (this works with out a problem)

edit:

if its public instance why I can have two different symbols with the same instance name (inside different movieclips)? and its working. But if touch the export option of those MovieClips its all got nuts.

5301 posts
  • Community Superstar
  • Italy
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Beta Tester
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Author had a Free File of the Month
+2 more
doru says

please excuse my spamming thread :|

Using the situation from my first post I write in my external custom class this.

public var background:Sprite;

If I use private I get ugly errors. but with public the previous error don’t show up anymore even if the export for actionscript its checked. What I get its this warning

Warning: All instances named ‘background’ will be automatically declared as PreviousButtonBackground in symbols that use background as their base class. In symbols that are linked to user-defined base classes, instances with the same name must be of the same type.”

I didn’t understand a thing from this error but the program compile.

5301 posts
  • Community Superstar
  • Italy
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Beta Tester
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Author had a Free File of the Month
+2 more
doru says

huh ??? letting only one of the two background movieclip with the export option checked, extending Movieclip class (or Sprite) get me the error

TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip@10f584c1 to PreviousButtonBackground.

5301 posts
  • Community Superstar
  • Italy
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Beta Tester
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Author had a Free File of the Month
+2 more
doru says

I hate you :D

5301 posts
  • Community Superstar
  • Italy
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Beta Tester
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Author had a Free File of the Month
+2 more
doru says

in fact without the export thing its working, but I don’t understand why it will not work anymore if I check the export option.

I know what you say about that the Sprite have no timeline. I didn’t touch the timeline and theres only a graphic inside each of them. I also made a test with out change to “extend Sprite class” letting the MovieClip thing. I get the same error.

For some reason the duplicated instance name, in different movieclips matters if I check the export option for those movieclips.

5301 posts
  • Community Superstar
  • Italy
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Beta Tester
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Author had a Free File of the Month
+2 more
doru says

The situation its this. Have patience :|

I have two movieclips on stage, let’s say MovieclipA and MovieclipB.

Both have the base class path in the properties menu set it to a custom external class that I’ve made. This external class have only the package path defined and the constructor function. Practically this do nothing for now, its empty.

Inside each movieclip there’s two other movieclips one a background and one an arrow. So in the flash library I have two arrows and two backgrounds so practically each of the two main Movieclips have different graphics.

Now the strange thing.

In each of the movieclips I give an instance name of “background” for the Movieclip that represents the background. Basically I give the same instance name, but inside different Movieclips. The reason I want to do that its for controlling the alpha properties of the elements from my custom class, using the fact they have the same instance name. For semplicity I leave the arrows with out instance name for now.

each of the previous described movieclips are checked for export for actionscript as follows: the two main Movieclips(call them for now buttons) extend my custom class called Simple Button

the other four Movieclips, backgrounds and arrows, each extends the Sprite class.

all of the movieclips are already on stage, so they are not created with code.

When i compile i get a Error #1034: Type Coercion failed. cannot convert (first Movieclip Background) NextButtonBackground@10e3f671 to (second Movieclip Background) PreviousButtonBackground.

For some strange reason flash don’t like symbols with the same instance name even if they are in different Movieclips.

But if I don’t use the “export for ActionScript” in the properties panel for the two Movieclips that represent the background, flash compile successfully and I can control the alpha of the two different backgrounds using the unique instance name, “background” from my custom class.

Ideas?

by
by
by
by
by