SourceTec Software

It is currently Thu Apr 24, 2014 1:06 am

All times are UTC + 8 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sun Jun 05, 2011 2:01 am 
Offline
Member

Joined: Sun Jun 05, 2011 1:46 am
Posts: 4
Hello friends I am new to Sothink. I cannot play a SWF FILE in Sothink SWF Quicker
It is giving the following error

ERROR: Scene 1, Layer 1, Frame 3, Line 44: Syntax error.
thisname = parseInt(tmpthis._name.substr("content".

How can I get rid of this.
Please help me out.
Regards,
Mob.


Top
 Profile  
 
PostPosted: Sun Jun 05, 2011 2:15 am 
Offline
Guru
User avatar

Joined: Wed Feb 18, 2009 12:33 am
Posts: 402
It seems to me that the ")" symbol is missing...


Top
 Profile  
 
PostPosted: Sun Jun 05, 2011 12:40 pm 
Offline
Member

Joined: Sun Jun 05, 2011 1:46 am
Posts: 4
Thanks for your replay.
Please can you elaborate? Because I am not from software background.
Regards,
Mob


Top
 Profile  
 
PostPosted: Sun Jun 05, 2011 12:58 pm 
Offline
Member

Joined: Sun Jun 05, 2011 1:46 am
Posts: 4
There is error in the 44th line marked with a :?: mark
Please can any one help



function init()
{
rightmargin = Stage.width - rightmargin;
setimage();
setcontainer();
populatecontent();
} // End of the function
function setpagetitle()
{
this.attachMovie("content_mc", "page_title", 1);
this.page_title._y = marginfromtop;
this.page_title._x = leftmargin;
this.page_title.html = true;
this.page_title.txt = "<font size=\'16\' color=\'#336699\'>" + Page_Title + "</font>";
this.page_title.content_txt.autoSize = true;
} // End of the function
function setcontainer()
{
container_mc._y = img_mc._y = this.page_title._y + this.page_title._height + 20;
container_mc._x = this.page_title._x;
} // End of the function
function setimage()
{
trace (rightmargin);
img_mc._x = rightmargin - img_mc._width;
} // End of the function
function attachcontent_mc(tmpelements)
{
container_mc.attachMovie("content_mc", "content" + tmpelements, tmpelements + 10);
if (TextElement[tmpelements].charAt(0) == "•")
{
container_mc["content" + tmpelements]._x = bulletmargin;
} // end if
container_mc["content" + tmpelements]._visible = false;
container_mc["content" + tmpelements].content_txt.selectable = false;
container_mc["content" + tmpelements].content_txt.multiline = true;
container_mc["content" + tmpelements].content_txt.html = true;
container_mc["content" + tmpelements].content_txt._width = 550;
container_mc["content" + tmpelements].txt = TextElement[tmpelements];
container_mc["content" + tmpelements].content_txt.autoSize = true;
} // End of the function
function onContRollover(tmpthis)
{
thisname = parseInt(tmpthis._name.substr("content".length, tmpthis._name.length - "content".length)); :?:
popup_mc.txt = Content.course.ContentPage[0].TextElement[thisname].popText[0]._innerData;
popup_mc._x = container_mc._x + tmpthis._x + linkpopupmargin;
if (container_mc._y + tmpthis._y + popup_mc._height > Stage.height)
{
popup_mc._y = container_mc._y + (tmpthis._y - popup_mc._height);
}
else
{
popup_mc._y = container_mc._y + tmpthis._y + tmpthis._height;
} // end else if
} // End of the function
function makelink(tmpelements)
{
container_mc["content" + tmpelements]._x = container_mc["content" + tmpelements]._x + linkcontentmargin;
container_mc["content" + tmpelements].txt = "<font color=\'#000099\'><b>" + container_mc["content" + tmpelements].txt + "</b></font>";
popup_mc.html = true;
container_mc["content" + tmpelements].onRollOver = function ()
{
onContRollover(this);
};
container_mc["content" + tmpelements].onReleaseOutside = function ()
{
popup_mc._x = -1000;
};
container_mc["content" + tmpelements].onRollOut = function ()
{
popup_mc._x = -1000;
};
} // End of the function
function populatecontent()
{
for (nelements = 0; nelements < TextElement.length; nelements++)
{
attachcontent_mc(nelements);
if (Content.course.ContentPage[0].TextElement[nelements].popText[0]._innerData != undefined || Content.course.ContentPage[0].TextElement[nelements].popText[0]._innerData != null)
{
makelink(nelements);
} // end if
if (container_mc._x + container_mc["content" + nelements].content_txt._width > img_mc._x - contentimagemargin)
{
container_mc["content" + nelements].content_txt._width = img_mc._x - contentimagemargin - container_mc._x;
container_mc["content" + nelements].content_txt.multiline = true;
container_mc["content" + nelements].content_txt.wordWrap = true;
} // end if
container_mc["content" + nelements].openpopup = function ()
{
};
container_mc["content" + nelements]._y = container_mc["content" + (nelements - 1)]._y + container_mc["content" + (nelements - 1)]._height;
container_mc["content" + nelements]._visible = true;
} // end of for
} // End of the function
stop ();
init();
pgTitle = new TextFormat();
pgTitle.font = pagetitlefont;
pgTitle.size = pagetitlefontsize;
pgTitle.Color = pagetitlecolor;


Top
 Profile  
 
PostPosted: Sun Jun 05, 2011 8:50 pm 
Offline
Guru
User avatar

Joined: Wed Feb 18, 2009 12:33 am
Posts: 402
substring seems to be deprecated. Try String.substring(start, end);


Top
 Profile  
 
PostPosted: Sun Jun 05, 2011 11:09 pm 
Offline
Member

Joined: Sun Jun 05, 2011 1:46 am
Posts: 4
Thanks for your replay. As I said I don’t know the ABCD of programming please can you reframe the corrected line?
Where to put String.substring(start, end);
Please can you write down the corrected line?
Regards


Top
 Profile  
 
PostPosted: Mon Jun 06, 2011 3:19 am 
Offline
Guru
User avatar

Joined: Wed Feb 18, 2009 12:33 am
Posts: 402
Unfortunately I cannot: I use AS3 and not AS2.

Anyway on line 44 instead of substring you need to place String.substring and change the reference inside "()" that need to be "start" and "end".

I recommend you to start learning ActionScript from easy exercise and only then try to modify hard codes. ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group